Skip to main content
To get a company’s headcount history, call the Company Headcount API, GET /v2/companies/workforce. Each response covers 12 months and lists the months in which the headcount changed, overall and by department. Send the nextCursor from a response to get the 12 months before it. Each 12-month page costs 1 credit.

Get the last 12 months

The history is in history, newest first. This example is shortened and shows a fictional company.
How to read it:
  • The window. historyFrom is the first month covered, and historyTo is the end of the window and is not included.
  • Only changes are listed. history has one point for each month in which the headcount changed, not one for every month. Each point’s date is the first day of its month.
  • The first point. A point at the start of the window carries forward the last known earlier headcount when there is one.
The later examples on this page reuse the client and the workforce response from this one.

Build a month-by-month series

Because history lists only the months with a change, fill the gaps by carrying each value forward until the next change. This example turns one response into one row per month.
A month before the first point has no known value, so the series leaves its count empty. Dates are YYYY-MM-DD strings, which sort correctly as text.

Go back further than 12 months

When older history exists, the response includes nextCursor. Send it as cursor to get the 12 months before. This example fetches up to three years and stops early when the history runs out.
Things to know about paging:
  • Each page is charged. Three years of history cost 3 credits. Setting a limit, as this example does, caps the spend.
  • A cursor expires. Use nextCursor within 30 minutes of the first page.
  • The end of the history. When a response has no nextCursor, there is no older history. A page that does not exist costs nothing.

Save the history as a CSV file

The CLI writes the history to a file in one command. The format follows the file extension.

Common questions

How far back does the headcount history go?

It depends on the company. Keep requesting earlier pages with nextCursor until a response has none.

Why are some months missing from the history?

history lists only the months in which the headcount changed. A month that is not listed had the same headcount as the point before it. See Build a month-by-month series.

Does the history include departments?

Yes. Each point has a departmentHeadcount with the same 14 department keys as the current headcount. See Track headcount growth by department.

Can I get the history for many companies?

The workforce expansion on enrichment and search includes the latest 12 months for each company, at 1 extra credit per company. For earlier years, call the workforce endpoint for each company with the nextCursor from its expansion.

What does headcount history cost?

1 credit for each 12-month page. A company that is not found, an invalid cursor, and a page that does not exist cost nothing.

Company Headcount API

Response fields, history, search filters, pricing, and limits.

Get a company's employee count

The current count and size range for one company or a list.

Track headcount changes at your accounts

Find the accounts on your list that grew or shrank.

Company schema

Every field in the workforce object.