Bulk uploads
Results of a completed bulk task as CSV
GET /api/v1/bulk/tasks/{taskId}/download
Columns: Company Name, Company Domain, Company Type, Location, Person Name,
Job Title. UTF-8 with a byte-order mark. Sent as an attachment named
<file name>_<YYYYmmdd_His>_results.csv.
Parameters
| Name | Type | Description |
|---|---|---|
taskId Required · in path | string | — |
Responses
-
200 The CSV file
-
400 The task is not completed yet
-
401 The API key is missing or unknown
-
403 No active Scale or Enterprise plan bought in the last 30 days
-
404 No task with this id belongs to you
-
429 More than 1,500 requests with this key in the last hour
curl -X GET "https://server.localcontact.ai/api/v1/bulk/tasks/0f8c3a52-7f4e-4c1e-9b8a-2a5d6c1e9f00/download" \
-H "Authorization: Bearer $LOCALCONTACT_API_KEY"import os
import requests
headers = {"Authorization": f"Bearer {os.environ['LOCALCONTACT_API_KEY']}"}
response = requests.get("https://server.localcontact.ai/api/v1/bulk/tasks/0f8c3a52-7f4e-4c1e-9b8a-2a5d6c1e9f00/download", headers=headers)
open("results.csv", "wb").write(response.content)const headers = { Authorization: `Bearer ${process.env.LOCALCONTACT_API_KEY}` };
const response = await fetch("https://server.localcontact.ai/api/v1/bulk/tasks/0f8c3a52-7f4e-4c1e-9b8a-2a5d6c1e9f00/download", { headers });
const csv = await response.text();The response is the CSV file itself.
Error examples
400 · The task is not completed yet
{
"error": "File not ready"
}401 · The API key is missing or unknown
{
"error": "API token missing"
}403 · No active Scale or Enterprise plan bought in the last 30 days
{
"error": "API access requires an active Scale or Enterprise plan.",
"upgrade_url": "https://localcontact.ai/dashboard/billing"
}404 · No task with this id belongs to you
{
"message": "No query results for model [App\\Models\\SearchTask]."
}429 · More than 1,500 requests with this key in the last hour
{
"error": "Rate limit exceeded. Max 100 requests per hour.",
"retry_after": 3600
}