API
One API call. The people behind the business.
Send a business name and address. Get back names and job titles as JSON.
# 1. Start a search (1 credit)
curl -X POST https://server.localcontact.ai/api/v1/search \
-H "Authorization: Bearer $LOCALCONTACT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"company": "Bramblewood Bakery", "address": "Austin, TX", "titles": ["Owner", "Founder"]}'
# 2. When GET /api/v1/tasks/{task_id} says "completed", read the people
curl https://server.localcontact.ai/api/v1/tasks/$TASK_ID/results \
-H "Authorization: Bearer $LOCALCONTACT_API_KEY"import os, time
import requests
API = "https://server.localcontact.ai/api/v1"
headers = {"Authorization": f"Bearer {os.environ['LOCALCONTACT_API_KEY']}"}
task = requests.post(f"{API}/search", headers=headers, json={
"company": "Bramblewood Bakery",
"address": "Austin, TX",
"titles": ["Owner", "Founder"],
}).json()
while True:
status = requests.get(f"{API}/tasks/{task['task_id']}", headers=headers).json()["status"]
if status in ("completed", "failed"):
break
time.sleep(2)
people = requests.get(f"{API}/tasks/{task['task_id']}/results", headers=headers).json()["data"]const API = "https://server.localcontact.ai/api/v1";
const headers = {
Authorization: `Bearer ${process.env.LOCALCONTACT_API_KEY}`,
"Content-Type": "application/json",
};
const { task_id } = await fetch(`${API}/search`, {
method: "POST",
headers,
body: JSON.stringify({ company: "Bramblewood Bakery", address: "Austin, TX", titles: ["Owner", "Founder"] }),
}).then((r) => r.json());
let status = "pending";
while (!["completed", "failed"].includes(status)) {
await new Promise((r) => setTimeout(r, 2000));
({ status } = await fetch(`${API}/tasks/${task_id}`, { headers }).then((r) => r.json()));
}
const { data: people } = await fetch(`${API}/tasks/${task_id}/results`, { headers }).then((r) => r.json());Response · GET /api/v1/tasks/{id}/results
{
"data": [
{
"name": "Maria Lopez",
"title": "Owner",
"company_name": "Bramblewood Bakery",
"company_domain": "bramblewood.example",
"company_type": "Bakery",
"company_address": "Austin, US"
},
{
"name": "Daniel Lopez",
"title": "Co-owner",
"company_name": "Bramblewood Bakery",
"company_domain": "bramblewood.example",
"company_type": "Bakery",
"company_address": "Austin, US"
}
],
"meta": { "total": 2, "page": 1, "per_page": 20, "last_page": 1 }
}-
Same price as the app
1 credit per business searched. Every person found is included.
-
A stable contract
/api/v1 keeps its URLs, headers and fields. Changes only ever add things.
-
Bulk and webhooks
Send a whole CSV in one call, or get results posted to your webhook URL.
API access comes with the Scale plan. Need high volume or help? Book a demo
Get started
Three calls to your first result
-
Step 1
Get an API key
Buy the Scale plan, then create a key in the app under API.
-
Step 2
Start a search
POST /api/v1/search with a business name, an address and up to 5 job titles.
-
Step 3
Read the people
Poll the task, then GET its results as JSON. Or pass a webhook URL.
Stop emailing info@. Find who actually decides.
Name and address in. The people who run the business out.