apify-search-rank-lead-intel
Reverse-engineer local search rankings for any industry with Apify, preserve input query/location/rank metadata, classify fit, roll up companies by place ID, and prepare accepted businesses for enrich
SKILL.mdapify-search-rank-lead-intel/SKILL.md
GitHubApify Search Rank Lead Intel
Use this workflow to discover which companies appear for target local searches and where they rank.
Procedure
- Configure search terms, include terms, exclude terms, and rank buckets.
- Prepare a city/county/state location grid.
- Run
src/rank_discovery.py --dry-run. - Run one paid batch with
--max-batches 1. - Inspect raw JSON, parsed rank CSVs, and confidence classifications.
- Run
src/rollup_rankings.pyto dedupe companies while keeping all query/rank appearances. - Send accepted rows to website/contact/email enrichment.
Guardrails
- Preserve
input_query,query_location, andresult_rankbefore dedupe. - Dedupe company records by
place_id, but keep a separate rank-appearances table. - Exclude off-audience rows before paid enrichment.
- Keep API tokens only in
.envor runtime environment variables.