Lead Enrichment
Batch-enrich a list of leads with LinkedIn URLs and verified emails
A worked example: take a CSV of name,company_domain rows and enrich each with the LinkedIn profile URL and verified professional email.
What this example does
- Reads a list of leads.
- For each lead, calls
get_linkedin_profile_url(5 tokens) andget_email(5 tokens) in parallel. - Writes the enriched output as JSON.
Cost: 10 tokens per lead (~$0.10).
Code
Sample output
Notes
- Concurrency: 5 is safe. Going above 10 risks
429s on the email endpoint. - Non-ok results:
emailisnullwheneverstatusisn’tok, and thereasonsays why (catch_all,no_mx,unverifiable_provider,no_pattern_verified). Branch on those rather than treating a missing address as a transient failure. See Why is get_email returning not_found?. - Failed calls still cost: the token cost is debited before the tool reaches its provider, so an upstream
5xxor atry_again_lateris charged. Honorretry_after_secondsinstead of retrying tightly. - Cost: 10 tokens per lead × 100 leads = 1,000 tokens = $10.