Skip to main content
POST
https://api.whizo.ai
/
v1
/
ai-enrichment
AI Enrichment API
curl --request POST \
  --url https://api.whizo.ai/v1/ai-enrichment \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": [
    {
      "data[].email": "<string>",
      "data[].additionalFields": {}
    }
  ],
  "fields": [
    {
      "fields[].name": "<string>",
      "fields[].prompt": "<string>",
      "fields[].type": "<string>"
    }
  ],
  "options": {
    "options.concurrency": 123,
    "options.includeDiscovery": true,
    "options.includeProfile": true,
    "options.timeout": 123,
    "options.skipInvalidEmails": true
  }
}
'
{
  "success": true,
  "data": {
    "jobId": "enr_abc123xyz789",
    "status": "queued",
    "totalRows": 2,
    "estimatedCredits": 6,
    "estimatedTime": 45,
    "createdAt": "2025-01-06T10:30:00Z"
  }
}
The AI Enrichment API uses a sophisticated multi-agent system to automatically enrich email lists with detailed company information, contact profiles, and custom data extraction. Perfect for sales prospecting, lead qualification, and B2B data enrichment.

Authentication

Authorization
string
required
Bearer token using your API key: Bearer YOUR_API_KEY

Request Body

data
array
required
Array of records to enrich. Each record must contain at least an email address.
fields
array
required
Array of field definitions for data extraction
options
object
Configuration options for enrichment behavior

Response

success
boolean
Indicates if enrichment job was created successfully
data
object
Job information for tracking enrichment progress

Example: Basic Lead Enrichment

curl -X POST "https://api.whizo.ai/v1/ai-enrichment" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": [
      { "email": "[email protected]" },
      { "email": "[email protected]" }
    ],
    "fields": [
      {
        "name": "company_name",
        "prompt": "Extract the full company name",
        "type": "text"
      },
      {
        "name": "industry",
        "prompt": "Identify the company'\''s industry sector",
        "type": "text"
      },
      {
        "name": "employee_count",
        "prompt": "Estimate the number of employees",
        "type": "number"
      }
    ],
    "options": {
      "concurrency": 3,
      "includeDiscovery": true,
      "includeProfile": true
    }
  }'
{
  "success": true,
  "data": {
    "jobId": "enr_abc123xyz789",
    "status": "queued",
    "totalRows": 2,
    "estimatedCredits": 6,
    "estimatedTime": 45,
    "createdAt": "2025-01-06T10:30:00Z"
  }
}

Monitoring Job Progress

Get Job Status

curl "https://api.whizo.ai/v1/ai-enrichment/{jobId}" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "id": "enr_abc123xyz789",
    "status": "processing",
    "totalRows": 100,
    "rowsProcessed": 45,
    "rowsSucceeded": 43,
    "rowsFailed": 2,
    "creditsUsed": 129,
    "progress": 45,
    "estimatedTimeRemaining": 120,
    "createdAt": "2025-01-06T10:30:00Z",
    "startedAt": "2025-01-06T10:30:05Z"
  }
}

Real-Time Progress with SSE

Stream real-time progress updates using Server-Sent Events (SSE):
const eventSource = new EventSource(
  `https://api.whizo.ai/v1/ai-enrichment/${jobId}/stream`,
  {
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
  }
);

eventSource.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log(`Progress: ${data.progress}% - ${data.rowsProcessed}/${data.totalRows}`);

  if (data.status === 'completed') {
    eventSource.close();
    console.log('Enrichment completed!');
  }
};

eventSource.onerror = (error) => {
  console.error('SSE error:', error);
  eventSource.close();
};

Downloading Results

Once the job status is completed, download enriched data:
curl "https://api.whizo.ai/v1/ai-enrichment/{jobId}/results?format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o enriched-data.json
[
  {
    "email": "[email protected]",
    "domain": "acmecorp.com",
    "company_name": "Acme Corporation",
    "industry": "Manufacturing & Industrial Equipment",
    "employee_count": 5000,
    "enrichment_status": "success",
    "credits_used": 3,
    "processing_time_ms": 4523
  },
  {
    "email": "[email protected]",
    "domain": "techstartup.io",
    "company_name": "TechStartup Inc.",
    "industry": "Software & Technology",
    "employee_count": 25,
    "enrichment_status": "success",
    "credits_used": 3,
    "processing_time_ms": 3891
  }
]

Multi-Agent Enrichment System

The AI Enrichment API uses a sophisticated multi-agent architecture:

Discovery Agent (Free)

  • Extracts domain from email address
  • Validates email format
  • Performs DNS lookups
  • Cost: 0 credits

Profile Agent (1-3 credits)

  • Scrapes company website
  • Extracts structured company data
  • Analyzes website content
  • Cost: 1-3 credits per row (based on website complexity)

General Agent (configurable)

  • Processes custom field prompts
  • Applies AI extraction to company data
  • Returns structured responses based on field type
  • Cost: Included in Profile Agent cost

Credit Costs & Pricing

ComponentCost (Credits)Notes
Discovery Agent0Always free
Profile Agent1-3Per successful row
Failed Enrichment0No charge for failed rows
Batch ProcessingNo extra feeSame per-row cost
Estimated Costs:
  • 100 rows with basic enrichment: ~150-300 credits
  • 1000 rows with advanced fields: ~1500-3000 credits
Optimization Tips:
  • Set skipInvalidEmails: true to avoid processing bad data
  • Use lower concurrency for better accuracy vs. speed trade-off
  • Test with small batches before processing large datasets

Field Design Best Practices

Effective Prompt Writing

Good Prompts:
  • ✅ “Extract the company’s primary industry sector”
  • ✅ “Identify if the company is B2B or B2C focused”
  • ✅ “Estimate annual revenue range in millions USD”
  • ✅ “List the company’s main product categories”
Poor Prompts:
  • ❌ “Tell me everything about the company” (too broad)
  • ❌ “Get info” (vague)
  • ❌ “Company” (unclear)

Field Type Selection

TypeUse CaseExample
textNames, descriptions, addressesCompany name, industry
numberCounts, measurements, estimatesEmployee count, revenue
booleanYes/no questionsIs B2B?, Has API?
jsonComplex structured dataProduct list, locations array

Error Handling

Status CodeError CodeDescription
400INVALID_EMAIL_FORMATEmail addresses don’t match required format
400MISSING_FIELDSRequired fields array is empty
400INVALID_FIELD_TYPEField type not supported
401UNAUTHORIZEDInvalid or missing API key
402INSUFFICIENT_CREDITSNot enough credits for estimated job
429RATE_LIMIT_EXCEEDEDToo many concurrent enrichment jobs
500ENRICHMENT_ERRORInternal enrichment processing error
{
  "success": false,
  "error": "INSUFFICIENT_CREDITS",
  "message": "Not enough credits. Required: 300, Available: 150",
  "data": {
    "required": 300,
    "available": 150,
    "shortfall": 150
  }
}

Rate Limits

PlanConcurrent JobsMax Rows per JobRate Limit
Free11005 jobs/hour
Starter350020 jobs/hour
Pro105000100 jobs/hour
Enterprise5050000Unlimited

Job Cancellation

Cancel a running enrichment job to stop processing and avoid further credits:
curl -X POST "https://api.whizo.ai/v1/ai-enrichment/{jobId}/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"
Note: Already processed rows will still be charged. In-progress rows may complete before cancellation.

Use Cases

Enrich prospect lists with company data to prioritize high-value leads:
  • Extract company size and industry
  • Identify decision-maker roles
  • Assess technology stack
  • Estimate budget/revenue range
Build comprehensive account profiles for targeted campaigns:
  • Company firmographics
  • Product/service offerings
  • Recent news and updates
  • Organizational structure
Research portfolio companies and investment opportunities:
  • Market positioning
  • Competitive landscape
  • Growth indicators
  • Technology adoption
Enhance candidate profiles with employer information:
  • Company culture indicators
  • Industry trends
  • Career growth potential
  • Compensation benchmarks

Support

Questions about AI Enrichment? Contact [email protected] or visit our documentation.