入门
快速开始
创建任务,轮询直到 completed,再读取线索——全程普通 HTTP。
1. Submit a scrape job
cURL
curl https://api.mapleads.ai/v1/scrape-jobs \
-X POST \
-H "Authorization: Bearer mapleads_xxx" \
-H "Content-Type: application/json" \
-d '{"keyword":"design agencies","location":"New York, NY","options":{"maxResults":100}}'The response is a job in the pending state with an id.
2. Poll until it finishes
cURL
curl https://api.mapleads.ai/v1/scrape-jobs/JOB_ID \
-H "Authorization: Bearer mapleads_xxx"Repeat until status is completed (or failed). To avoid polling, register a scrape_job.completed webhook instead.
3. Read the leads
cURL
curl "https://api.mapleads.ai/v1/scrape-jobs/JOB_ID/leads?limit=100" \
-H "Authorization: Bearer mapleads_xxx"Or download them as a file via GET /v1/scrape-jobs/JOB_ID/export.