API DOCUMENTATION / COMPANIES ENDPOINTS

Companies endpoints

List, search and read companies, and page the jobs of one company by its ID.

List companies

GET /v1/companies returns {data, next_cursor}. Optional query fields are name (a 1 to 200 character substring), limit (1 to 100, default 50) and cursor. Unknown or repeated fields return 400. Companies come back in order of normalized name, then ID.

curl --fail-with-body -sS "https://api.headcountlabs.com/v1/companies?name=cloudflare&limit=20" \
  -H "Authorization: Bearer $HEADCOUNTLABS_API_KEY"

Search companies

POST /v1/companies/search takes a JSON body with optional name, two-letter country, status (active, retired or merged), limit (1 to 100, default 50) and cursor. The body can be up to 16,384 bytes and unknown fields are rejected.

curl --fail-with-body -sS -X POST "https://api.headcountlabs.com/v1/companies/search" \
  -H "Authorization: Bearer $HEADCOUNTLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"cloudflare","country":"US","status":"active","limit":3}'

The response is {data: [company], next_cursor}.

Read one company

GET /v1/companies/{companyId} returns {data: company}. A merged ID answers 308 with a Location header and no body; an unknown ID answers 404.

{
  "company_id": "3483b509-5f22-4535-a907-19c285f3b460",
  "name": "Cloudflare",
  "country": "US",
  "status": "active",
  "region": "CA",
  "address_source": "sec",
  "identifiers": [{"scheme": "ticker", "value": "NET", "exchange": null, "source": "sec"}, ...],
  "industries": [{"system": "naics", "code": "541519", "source": "sam_gov"}, ...]
}

See company data for every field.

List the jobs of one company

GET /v1/companies/{companyId}/jobs pages the jobs of one company. It accepts the job filters, fields and include, and returns the same envelope as GET /v1/jobs. A merged company redirects to its replacement. If you send company_id as well, it must equal the path.

curl --fail-with-body -sS "https://api.headcountlabs.com/v1/companies/3483b509-5f22-4535-a907-19c285f3b460/jobs?limit=50&fields=job_id,title,locations" \
  -H "Authorization: Bearer $HEADCOUNTLABS_API_KEY"

Cursors

A company cursor is tied to the filters and page size that produced it and reads the company release it started on, so paging stays steady while the registry updates. Company list responses do not carry snapshot_watermark; the jobs list for a company does. Treat every cursor as opaque.

Errors you may see

  • 400 invalid_request for an unknown or repeated field, a limit outside 1 to 100, or a cursor that does not belong to the request.
  • 401 invalid_api_key for a missing or invalid key.
  • 404 for an unknown company ID.
  • 429 when you are over your request rate or allowance. Wait for Retry-After.
  • 503 while the company data is being updated. Retry shortly.

Choosing between list and search

Use GET /v1/companies for a quick name lookup. Use POST /v1/companies/search when you also filter by country or status. Company routes count as ordinary requests. See rate limits.

Continue in the reference

Read the company fields.

Company data API reference
All API documentation