Before you start
Create an API key at app.companyenrich.com/access-keys. The SDK examples assume aclient created like this, with the key in the COMPANYENRICH_API_KEY environment variable:
YOUR_API_TOKEN with your key.
Get current headcount by department
Look up a company by domain. The response has the observed employee count, the estimated size range, and a headcount for each department. This costs 1 credit.id in cURL and JavaScript, company_id in Python and Ruby, and companyId in PHP. The CLI accepts either a domain or an ID as its argument.
Read the last 12 months of history
The same response includeshistory: the months in the last year where headcount changed, newest first.
date of the first day of its month, an observedEmployeeCount, and a departmentHeadcount.
Go back further than 12 months
When older history exists, the response includesnextCursor. Send it as cursor to get the preceding 12 months. Each earlier page costs 1 credit.
--years 2 fetches two pages for you.
Get headcount with the company profile
Theworkforce expansion adds the same headcount data to a company record, so you get the profile and the headcount in one request. This enrichment costs 2 credits: 1 for the company and 1 for the expansion.
Find companies that are growing
TheworkforceGrowth filter on company search matches headcount change over a period. This search finds SaaS companies in the United States whose headcount grew at least 20% in the last year.
period is m6, y1, or y2, for 6 months, 1 year, or 2 years. A ratio of 0.2 means 20%. The search costs 1 credit per company, with no extra charge for the filter.
Find companies that are shrinking
A negative growth ratio means headcount fell. This search finds companies with 201 to 1,000 employees whose headcount dropped 10% or more in the last 6 months.Find companies by department size
TheworkforceSize filter matches headcount ranges, overall or for one department. This search finds companies in Germany with at least 50 people in engineering.
workforceSize to set several ranges at once. Department names in the workforce filters use underscores, such as engineering_technical.
Related pages
Company Headcount API
Response fields, history paging, pricing, and limits.
Company Search API filters
The headcount and growth filters in full.
Company Enrichment API examples
Enrich companies with expansions, in batches or in bulk.
Credits
What each lookup and expansion costs.