Anvesh
API Reference

Automation

Start, stop, and manage lead scraping automation tasks

Automation API

Control the lead scraping automation engine to find high-value businesses with zero online presence.

Quick Start

# Start a scraping task
curl -X POST http://localhost:8000/automation/start \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"industry": "restaurants", "locations": ["Mumbai", "Delhi"], "limit_per_location": 50}'

# Check task status
curl http://localhost:8000/automation/tasks/{task_id} \
  -H "X-API-Key: your-api-key"

# Stop all running tasks
curl -X POST http://localhost:8000/automation/stop \
  -H "X-API-Key: your-api-key"

Endpoints

MethodEndpointDescription
POST/automation/startStart a new scraping task
POST/automation/stopStop all running tasks
POST/automation/tasks/{task_id}/stopStop a specific task
GET/automation/tasksList all tasks
GET/automation/tasks/{task_id}Get task details
GET/automation/exportExport leads to CSV

On this page