Save a list of search queries as a draft run, with no prompt to interpret. The country searched is the one the queries name unless gl is set. Run it with /bulk/{id}/run; read its leads through /campaigns/{campaign_id}/results once it has a campaign.
Headers
- Idempotency-Keystring
Optional single header, 1-255 printable ASCII characters. Workspace-owned keys expire after 24 hours. Same canonical JSON body, method, route and campaign ID replay the stored response; different request returns 422 idempotency_key_reused. Live work returns 409 idempotency_in_progress and Retry-After: 1. A 5xx is not stored.
max 255 characters
Bodyapplication/json
- limitintegerrequired
most leads to deliver across all queries
- queriesstring[]required
1-1000 search queries, each as typed into Google Maps
- field_idsstring[]
place-field IDs to return; default the standard set
- glstring
country code to search in; default the country the queries name
- langstring
- namestring
- qualifierany
same shape as a campaign's: deliver and charge only leads with any/all of these channels
Response201application/json
Headers: Idempotent-Replayed, Location
- campaign_idstring
The campaign holding the run's leads; read them at /campaigns/{campaign_id}/results.
- completed_atstring
When the run finished (UTC); null until it does.
- created_atstring
When the draft was created (UTC).
- errorstring
Why the run failed, if it did.
- idstring
Bulk run ID; the {id} in every /bulk path.
- limitinteger
Most leads to deliver across all queries.
- linksBulkLinks
Paths to this run, its results and export, and its page in the app.
- appstring
The run's page in the LocalICP app.
- exportstring
Its leads as one file.
- resultsstring
Its leads, page by page, once it has a campaign.
- selfstring
This run.
- namestring
The run's name.
Errors
curl -X POST "https://app.localicp.com/api/v1/bulk" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: 00000000-0000-4000-8000-000000000000" \
-H "Content-Type: application/json" \
-d '{
"limit": 0,
"queries": []
}'{
"campaign_id": "string",
"completed_at": "string",
"created_at": "string",
"error": "string",
"id": "string",
"limit": 0,
"links": {
"app": "string",
"export": "string",
"results": "string",
"self": "string"
},
"name": "string",
"queries": [
{
"error": "string",
"found": 0,
"position": 0,
"query": "string",
"saved": 0,
"state": "string"
}
],
"queries_done": 0,
"query_count": 0,
"result_count": 0,
"started_at": "string",
"status": "string"
}