Enrich lead information with additional details such as contact information, social profiles, and company details.

Endpoint

POST /enrich-lead

Request

Headers

NameTypeRequiredDescription
x-api-keystringYesYour Sixtyfour API key
Content-TypestringYesMust be application/json

Body

FieldTypeRequiredDescription
lead_infoobjectYesInitial lead information as key-value pairs
structobjectYesFields to collect about the lead
research_planstringNoOptional research plan to guide enrichment

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": [
    "Saarth Shah is CEO & Co-Founder of Sixtyfour AI",
    "Company website: https://www.sixtyfour.ai/",
    "LinkedIn profile: https://www.linkedin.com/in/saarthshah",
    "Located in San Francisco, California",
    "GitHub profile: https://github.com/SaarthShah",
    "Background includes UC Berkeley, Y Combinator, and AI-related roles"
  ],
  "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
}

Error Response (400)

{
  "error": "Bad Request",
  "message": "Invalid lead information"
}

Async Endpoint

For longer-running enrichment tasks, you can use the async endpoint to submit a job and retrieve results later.

Start Async Job

POST /enrich-lead-async

Request

The request format is identical to the synchronous endpoint.

Response

Returns a task ID that can be used to check job status and retrieve results.
{
  "task_id": "bdd69815-a1c0-480d-bfa5-d5fbb9745893",
  "status": "pending"
}

Check Job Status

GET /job-status/{task_id}

Response

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": [
      "Saarth Shah is CEO & Co-Founder of Sixtyfour AI",
      "Company website: https://www.sixtyfour.ai/",
      "LinkedIn profile: https://www.linkedin.com/in/saarthshah",
      "Located in San Francisco, California",
      "GitHub profile: https://github.com/SaarthShah",
      "Background includes UC Berkeley, Y Combinator, and AI-related roles",
    ],
    "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"
        }
    }
)

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_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

  1. Explicit Type Definitions (Highest Priority) - Specified in struct field definitions
  2. Original Input Types - Types from lead_info when not explicitly overridden
  3. Inferred Types - From example values in struct
  4. Default to String (Lowest Priority)

Supported Types

TypeExample 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
  }
}

Rate Limits

The API is rate limited to 1000 requests per minute per API key.

Example Usage

import requests

response = requests.post(
    'https://api.sixtyfour.ai/enrich-lead',
    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",
            "github_url": "url for their github profile",
            "github_notes": "Take detailed notes on their github profile."
        }
    }
)

results = response.json()