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.
Header Parameters
Request Body
application/json
The industry or business type to search for
List of locations/cities to scrape leads from
Maximum number of leads to scrape per location. Use -1 for unlimited.
-1-1 <= valueResponse 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
}Get task status
Retrieve the current status and details of a specific automation task. **Possible statuses:** - `idle` - Task is queued but not yet started - `running` - Task is currently scraping - `completed` - Task finished successfully - `stopped` - Task was stopped by user - `error` - Task encountered an error
Stop all running tasks
Send a stop signal to all currently running automation tasks. Tasks will gracefully stop after completing their current operation. This is useful when you want to halt all scraping activity at once.