Skip to main content
Enrich company data with additional information and find associated people.

Endpoint

POST https://api.sixtyfour.ai/enrich-company

Request

Headers

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

Body

FieldTypeRequiredDescription
target_companyobjectYesCompany data to enrich
structobjectYesFields to collect
lead_structobjectNoCustom schema to define the structure of returned lead data.
find_peoplebooleanNoWhether to find people associated with the company
research_planstringNoOptional strategy describing how the agent should search for information
people_focus_promptstringNoDescription of people to find, typically includes the roles or responsibilities of the people you’re looking for

Research Plan vs People Focus Prompt

  • research_plan: Focuses on the methodology of finding data. Use this to guide the agent on where to look (e.g., “Check the ‘About Us’ page and LinkedIn Company People tab”).
  • people_focus_prompt: Focuses on the criteria for the people you want to find. Use this to filter by role, department, or seniority (e.g., “Find the VP of Marketing and the CTO”).

Example Request

{
  "target_company": {
    "company_name": "Pacific View Studios",
    "address": "1234 Ocean View Dr, La Jolla, CA 92037",
    "phone_number": "+16195551234",
    "website": "https://pacificview.studio"
  },
  "struct": {
    "instagram_url": "Instagram url for the photography company",
    "num_employees": "How many employees work there, give approximation if you don't have exact number"
  },
  "lead_struct": {
    "name": "Full name of the person",
    "email": "Work email address",
    "title": "Job title",
    "linkedin": "LinkedIn profile URL"
  },
  "find_people": true,
  "research_plan": "Check their website, online profiles, and linkedin for the people. Looking for the individual portfolios of the employees can help too",
  "people_focus_prompt": "Find me the owners of the company and the office manager"
}

Response

Deprecated field: findings

The findings field is deprecated. It currently returns an empty list and will be removed in a future update.

Success Response (200)

Returns enriched company data including leads if requested.
{
  "notes": "Pacific View Studios is a boutique photography company based in La Jolla, California. They specialize in luxury wedding photography, high-end portrait sessions, and commercial work for local businesses. The company has a strong social media presence and professional website. The business operates with a small, dedicated team of photographers and support staff.",
  "structured_data": {
    "company_name": "Pacific View Studios",
    "address": "1234 Ocean View Dr, La Jolla, CA 92037",
    "phone_number": "+16195551234",
    "website": "https://pacificview.studio",
    "num_employees": "5-10 employees",
    "instagram_url": "https://www.instagram.com/pacificview.studio",
    "leads": [
      {
        "name": "Sarah Chen",
        "email": "[email protected]",
        "title": "Creative Director & Lead Photographer",
        "phone": "+16195551234",
        "score": 9,
        "linkedin": "https://www.linkedin.com/in/sarah-chen-photography"
      },
      {
        "name": "Michael Rodriguez",
        "email": "[email protected]",
        "title": "Office Manager",
        "phone": "+16195551234",
        "score": 8,
        "linkedin": "https://www.linkedin.com/in/michael-rodriguez-pvs"
      }
    ]
  },
  "findings": [],
  "references": {
    "https://pacificview.studio": "Official company website with services and portfolio",
    "https://www.instagram.com/pacificview.studio": "Company Instagram profile showing recent work",
    "https://www.linkedin.com/in/sarah-chen-photography": "LinkedIn profile of the Creative Director",
    "https://www.linkedin.com/in/michael-rodriguez-pvs": "LinkedIn profile of the Office Manager"
  },
  "confidence_score": 9.5
}

Score Definitions

FieldDescriptionRange
confidence_scoreGlobal Quality Score: Measures the overall quality, consistency, and correctness of the returned data.0-10
scoreRelevance Score: Measures the likelihood of the person to match the prompt or be helpful (returned per lead).0-10

Error Response (400)

{
  "error": "Bad Request",
  "message": "Invalid company data"
}

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 https://api.sixtyfour.ai/enrich-company-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 https://api.sixtyfour.ai/job-status/{task_id}

Response

Pending/Processing:
{
  "status": "pending",
  "processed_items": 0,
  "total_items": 0,
  "task_type": "enrich_company"
}
Completed:
{
  "status": "completed",
  "result": {
    "notes": "Pacific View Studios is a boutique photography company based in La Jolla, California...",
    "structured_data": {
      "company_name": "Pacific View Studios",
      "address": "1234 Ocean View Dr, La Jolla, CA 92037",
      "phone_number": "+16195551234",
      "website": "https://pacificview.studio",
      "num_employees": "5-10 employees",
      "instagram_url": "https://www.instagram.com/pacificview.studio",
      "leads": [
        {
          "name": "Sarah Chen",
          "email": "[email protected]",
          "title": "Creative Director & Lead Photographer",
          "phone": "+16195551234",
          "score": 9,
          "linkedin": "https://www.linkedin.com/in/sarah-chen-photography"
        }
      ]
    },
    "findings": [],
    "references": {
      "https://pacificview.studio": "Official company website with services and portfolio"
    },
    "confidence_score": 9.5
  },
  "task_type": "enrich_company"
}

Example Async Usage

import requests
import time

# Start async job
response = requests.post(
    'https://api.sixtyfour.ai/enrich-company-async',
    headers={
        'x-api-key': 'your_api_key',
        'Content-Type': 'application/json'
    },
    json={
        "target_company": {
            "company_name": "Pacific View Studios",
            "website": "https://pacificview.studio"
        },
        "struct": {
            "instagram_url": "Instagram url for the photography company",
            "num_employees": "How many employees work there"
        },
        "find_people": true
    }
)

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 target_company 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""Pacific View Studios"
"int" or "integer"50, 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:
{
  "target_company": {"num_employees": 25, "is_public": true},
  "struct": {
    "num_employees": {"type": "str"},  // Overrides original int type
    "industry": "Primary business sector"  // New field as string
  }
}
// Output: {"num_employees": "25", "is_public": true, "industry": "Photography"}
Explicit Type Definition:
{
  "struct": {
    "employee_count": {"description": "Number of employees", "type": "int"},
    "is_verified": {"description": "Verification status", "type": "bool"}
  }
}
// Output: {"employee_count": 25, "is_verified": true}
Type Inference from Values:
{
  "struct": {
    "rating": 4.5,        // Inferred as float
    "is_remote": false,   // Inferred as bool
    "founded_year": 2020  // Inferred as int
  }
}

Example Usage

import requests

response = requests.post(
    'https://api.sixtyfour.ai/enrich-company',
    headers={
        'x-api-key': 'your_api_key',
        'Content-Type': 'application/json'
    },
    json={
        "target_company": {
            "company_name": "Pacific View Studios",
            "address": "1234 Ocean View Dr, La Jolla, CA 92037",
            "phone_number": "+16195551234",
            "website": "https://pacificview.studio"
        },
        "struct": {
            "instagram_url": "Instagram url for the photography company",
            "num_employees": "How many employees work there"
        },
        "find_people": true,
        "people_focus_prompt": "Find me the owners of the company"
    }
)

results = response.json()