Anvesh
API ReferenceAutomation

Start a new automation task

Start a new lead scraping automation task. The task runs in the background and scrapes Google Maps for businesses matching your criteria. **How it works:** 1. Provide an industry keyword (e.g., "restaurants", "gyms") 2. Specify one or more locations to search 3. Optionally set a limit per location The task will run asynchronously and you can monitor its progress using the `/automation/tasks/{task_id}` endpoint.

POST
/automation/start

Header Parameters

X-API-Key*string

Request Body

application/json

industry*string

The industry or business type to search for

locations*array<>

List of locations/cities to scrape leads from

limit_per_location?integer

Maximum number of leads to scrape per location. Use -1 for unlimited.

Default-1
Range-1 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8000/automation/start" \  -H "X-API-Key: string" \  -H "Content-Type: application/json" \  -d '{    "industry": "restaurants",    "limit_per_location": 50,    "locations": [      "Mumbai",      "Delhi"    ]  }'
{
  "data": {
    "id": 1,
    "name": "Example"
  },
  "error": false,
  "message": "Operation completed successfully",
  "success": true
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}
{
  "data": {
    "errors": [
      "field -> error message"
    ]
  },
  "error": true,
  "message": "Validation error",
  "success": false
}