Use Case
Turn partial lead records into full contact profiles for sales outreach, CRM enrichment, or lead qualification.
Endpoint
POST https://api.sixtyfour.ai/enrich-lead
Important: timeouts and parallelization
This endpoint performs deep research and is a long‑running operation. Typical P95 runtime is about 5 minutes and it can take up to 10 minutes in some cases. We are actively working on making performance improvements on this endpoint.
- Set client timeouts appropriately: If you call the sync endpoint, configure your HTTP client with a timeout of at least 15 minutes.
- Prefer async in production: Use
POST /enrich-lead-async and poll GET /job-status/{task_id}.
- Parallelize for throughput: Submit multiple async jobs in parallel (bounded concurrency) rather than waiting for each to complete sequentially.
Request
| Name | Type | Required | Description |
|---|
| x-api-key | string | Yes | Your Sixtyfour API key |
| Content-Type | string | Yes | Must be application/json |
Body
| Field | Type | Required | Description |
|---|
| lead_info | object | Yes | Initial lead information as key-value pairs |
| struct | object | Yes | Fields to collect about the lead |
| research_plan | string | No | Optional research plan to guide enrichment |
The struct field defines exactly what data you want back. Each key is a field name you want returned in structured_data, and its value is either a plain-English description (e.g., "The individual's email address") or an object with description and optional type (e.g., {"description": "Person's age", "type": "int"}). The agent uses these descriptions to guide its research.
Example Request
{
"lead_info": {
"name": "Saarth Shah",
"title": "CEO & Co-Founder @ Sixtyfour AI",
"company": "Sixtyfour AI",
"location": "San Francisco",
"linkedin": "https://www.linkedin.com/in/saarthshah"
},
"struct": {
"name": "The individual's full name",
"email": "The individual's email address",
"phone": "The individual's phone number",
"company": "The company the individual is associated with",
"title": "The individual's job title",
"linkedin": "LinkedIn URL for the person",
"website": "Company website URL",
"location": "The individual's location and/or company location",
"industry": "Industry the person operates in",
"github_url": "url for their github profile",
"github_notes": "Take detailed notes on their github profile."
}
}
Response
Success Response (200)
Returns enriched lead data with detailed information and sources.
{
"notes": "Saarth Shah is the Co-Founder and CEO of Sixtyfour AI, an AI company focused on building AI agents to help GTM (Go-To-Market) teams sell better and faster to SMBs. He is based in San Francisco, California. His LinkedIn profile is https://www.linkedin.com/in/saarthshah, which shows 500+ connections and highlights his education with Y Combinator and UC Berkeley...",
"structured_data": {
"name": "Saarth Shah",
"email": "saarth@sixtyfour.ai",
"phone": "",
"company": "Sixtyfour AI",
"title": "CEO & Co-Founder",
"linkedin": "https://www.linkedin.com/in/saarthshah",
"website": "https://www.sixtyfour.ai/",
"location": "San Francisco, California, USA",
"industry": "Artificial Intelligence and Sales Technology",
"github_url": "https://github.com/SaarthShah",
"github_notes": "Saarth Shah's GitHub profile demonstrates technical expertise with projects related to AI and full-stack development. Notable repositories include search spelling correction, AI chatbots, and data science models, corroborating his data science background."
},
"findings": [],
"references": {
"https://www.linkedin.com/in/saarthshah": "Saarth Shah LinkedIn profile with current role, location, and background information.",
"https://www.sixtyfour.ai/": "Sixtyfour AI official company website detailing services and confirming company location and focus area.",
"https://github.com/SaarthShah": "GitHub profile showing Saarth Shah's repositories and technical projects related to AI and full-stack development.",
"https://www.saarthshah.com/": "Personal website of Saarth Shah with bio, projects, and contact email saarth@sixtyfour.ai."
},
"confidence_score": 9.5
}
The findings field is deprecated. It currently returns an empty list and will be removed in a future update.
Score Definitions
| Field | Description | Range |
|---|
confidence_score | Global Quality Score: Measures the overall quality, consistency, and correctness of the returned data. | 0-10 |
Error Response (400)
{
"error": "Bad Request",
"message": "Invalid lead information"
}
Sync Usage
Make a direct request and wait for the response. This is the simplest approach, but note that enrichment can take several minutes depending on depth of research.
curl -X POST "https://api.sixtyfour.ai/enrich-lead" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lead_info": {
"name": "Saarth Shah",
"title": "CEO & Co-Founder @ Sixtyfour AI",
"company": "Sixtyfour AI",
"location": "San Francisco",
"linkedin": "https://www.linkedin.com/in/saarthshah"
},
"struct": {
"name": "The individual'\''s full name",
"email": "The individual'\''s email address",
"phone": "The individual'\''s phone number",
"company": "The company the individual is associated with",
"title": "The individual'\''s job title",
"linkedin": "LinkedIn URL for the person",
"website": "Company website URL",
"location": "The individual'\''s location and/or company location",
"industry": "Industry the person operates in",
"github_url": "url for their github profile",
"github_notes": "Take detailed notes on their github profile."
}
}'
Async Usage
For production workflows, use the async endpoint to submit a job and retrieve results later. This avoids long-lived HTTP connections.
Start Async Job
POST https://api.sixtyfour.ai/enrich-lead-async
The request body is identical to the sync endpoint.
Response:
{
"task_id": "bdd69815-a1c0-480d-bfa5-d5fbb9745893",
"status": "pending"
}
Check Job Status
GET https://api.sixtyfour.ai/job-status/{task_id}
Pending/Processing:
{
"status": "pending",
"processed_items": 0,
"total_items": 0,
"task_type": "enrich_lead"
}
Completed:
{
"status": "completed",
"result": {
"notes": "Saarth Shah is the Co-Founder and CEO of Sixtyfour AI, an AI company focused on building AI agents to help GTM (Go-To-Market) teams sell better and faster to SMBs. He is based in San Francisco, California. His LinkedIn profile is https://www.linkedin.com/in/saarthshah, which shows 500+ connections and highlights his education with Y Combinator and UC Berkeley...",
"structured_data": {
"name": "Saarth Shah",
"email": "saarth@sixtyfour.ai",
"phone": "",
"company": "Sixtyfour AI",
"title": "CEO & Co-Founder",
"linkedin": "https://www.linkedin.com/in/saarthshah",
"website": "https://www.sixtyfour.ai/",
"location": "San Francisco, California, USA",
"industry": "Artificial Intelligence and Sales Technology",
"github_url": "https://github.com/SaarthShah",
"github_notes": "Saarth Shah's GitHub profile demonstrates technical expertise with projects related to AI and full-stack development. Notable repositories include search spelling correction, AI chatbots, and data science models, corroborating his data science background."
},
"findings": [],
"references": {
"https://www.linkedin.com/in/saarthshah": "Saarth Shah LinkedIn profile with current role, location, and background information.",
"https://www.sixtyfour.ai/": "Sixtyfour AI official company website detailing services and confirming company location and focus area.",
"https://github.com/SaarthShah": "GitHub profile showing Saarth Shah's repositories and technical projects related to AI and full-stack development.",
"https://www.saarthshah.com/": "Personal website of Saarth Shah with bio, projects, and contact email saarth@sixtyfour.ai."
},
"confidence_score": 9.5
},
"task_type": "enrich_lead"
}
Example Async Usage
import requests
import time
# Start async job
response = requests.post(
"https://api.sixtyfour.ai/enrich-lead-async",
headers={
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"lead_info": {
"name": "Saarth Shah",
"title": "CEO & Co-Founder @ Sixtyfour AI",
"company": "Sixtyfour AI",
"location": "San Francisco",
"linkedin": "https://www.linkedin.com/in/saarthshah"
},
"struct": {
"name": "The individual's full name",
"email": "The individual's email address",
"phone": "The individual's phone number",
"company": "The company the individual is associated with",
"title": "The individual's job title",
"linkedin": "LinkedIn URL for the person",
"website": "Company website URL",
"location": "The individual's location and/or company location",
"industry": "Industry the person operates in"
}
}
)
response.raise_for_status()
task_info = response.json()
task_id = task_info["task_id"]
# Poll for results
while True:
status_response = requests.get(
f"https://api.sixtyfour.ai/job-status/{task_id}",
headers={"x-api-key": "YOUR_API_KEY"}
)
status_response.raise_for_status()
status_data = status_response.json()
if status_data["status"] == "completed":
results = status_data["result"]
break
elif status_data["status"] == "failed":
print(f"Job failed: {status_data.get('error', 'Unknown error')}")
break
time.sleep(10) # Wait 10 seconds before checking again
Type Casting
The API automatically handles type casting for structured data output with intelligent type preservation and conversion.
Type Priority Order
- Explicit Type Definitions (Highest Priority) - Specified in
struct field definitions
- Original Input Types - Types from
lead_info when not explicitly overridden
- Inferred Types - From example values in
struct
- Default to String (Lowest Priority)
Supported Types
| Type | Example Values |
|---|
"str" or "string" | "John Doe" |
"int" or "integer" | 30, 1000 |
"float" | 95.5, 3.14 |
"bool" or "boolean" | true, false |
"list" | ["item1", "item2"] |
"list[str]" | ["item1", "item2"] |
"list[int]" | [1, 2, 3] |
"list[float]" | [1.5, 2.7, 3.14] |
"dict" | {"key": "value"} |
Examples
Type Override:
{
"lead_info": {"age": 30, "is_active": true},
"struct": {
"age": {"type": "str"}, // Overrides original int type
"location": "Current location" // New field as string
}
}
// Output: {"age": "30", "is_active": true, "location": "New York"}
Explicit Type Definition:
{
"struct": {
"age": {"description": "Person's age", "type": "int"},
"is_verified": {"description": "Status", "type": "bool"}
}
}
// Output: {"age": 30, "is_verified": true}
Type Inference from Values:
{
"struct": {
"score": 95.5, // Inferred as float
"active": false, // Inferred as bool
"count": 42 // Inferred as int
}
}