Enrich a file of domains and save the results as CSV
Start with a text file nameddomains.txt that has one domain per line. This example creates a bulk job from the file, waits for it to finish, and saves the results to enriched.csv.
index, input_domain, status_code, request_state, success, and error, followed by the company fields.
Things to know before you run a large list:
- The balance check comes first. The API returns
402unless your balance covers every domain in the job. Credits are not reserved, and you are charged as results complete. - Duplicates are separate requests. A bulk job sends one request for every line and charges for each one, so remove duplicate domains before you send the list.
- Your script does not have to keep running. The job runs on CompanyEnrich’s side. Save the batch
idand download the results from any later session.
client created here.
Add funding, headcount, and tech stack to every row
Name the data you want inexpand. Each expansion adds 1 credit for every company found, so this job costs up to 4 credits per domain. A list of 500 domains costs at most 2,000 credits.
stream methods read the results one record at a time, which suits large jobs. Each record looks like this. The example is shortened and shows a fictional company.
financial, keywords, naicsCodes, technologies, and workforce. See Get funding, headcount, and tech stack in one call for what each one returns.
See which domains were not enriched
Every result has asuccess flag. A record with success set to false has the HTTP statusCode and an error in place of the company.
404 means no company was found for that domain, and it costs nothing. For any other status, the error field says what went wrong.
Enrich 50 domains or fewer in one request
For a short list, a batch request returns every result in the same response, with no job to wait for. The CLI reads the same file and sends the domains 50 at a time:Enrich more than 10,000 domains
A bulk job takes at most 10,000 domains and a request body of 10 MiB. Split a longer list into parts and create one job for each part:Common questions
How much does it cost to enrich a list of domains?
1 credit for each company found, plus 1 credit per company for each expansion. Domains with no match cost nothing. For example, if you send 1,000 domains with thetechnologies expansion and 900 are found, the job costs 900 × 2 = 1,800 credits.
How do I enrich a CSV file that has other columns?
Read the domain column into a list, enrich the list, and join the results back by position. Results come back in input order, and each record has theindex of its input row.
Can I enrich a list of company names?
Batch requests and bulk jobs take domains only. To enrich by name, send one request per company. See Find a company’s domain from its name.Which format should I download?
Use CSV for spreadsheets and data imports. Use NDJSON for large jobs that you read one record at a time, and JSON for small jobs that you load in one piece.Related pages
Bulk jobs and exports
Job status, progress, downloads, and cancelling.
Company Enrichment API
Lookup methods, parameters, pricing, and limits.
Company schema
Every field in a company record.
Credits
What each lookup and expansion costs.