The Companies API LogoThe Companies API Logo
APIUse casesCompanies
LoginLogin
Get started
Authentication
Errors
Rate limits
Webhooks
Datapoints
Companies
Enrich from domain
Enrich from email
Enrich from social network
Count companies
Search companies
Search by name
Search by prompt
Search similar
Ask company
Fetch context
Find email patterns
Fetch analytics
Export analytics
Industries
Search industries
Find similar industries
Lists
Fetch lists
Create list
Fetch companies
Toggle companies
Locations
Search cities
Search counties
Search countries
Search states
Search continents
Actions
Request action
Fetch actions
Teams
Fetch team
Technologies
Search technologies
Utilities
API health
OpenAPI spec
Get started
Authentication
Errors
Rate limits
Webhooks
Datapoints
Companies
Enrich from domain
Enrich from email
Enrich from social network
Count companies
Search companies
Search by name
Search by prompt
Search similar
Ask company
Fetch context
Find email patterns
Fetch analytics
Export analytics
Industries
Search industries
Find similar industries
Lists
Fetch lists
Create list
Fetch companies
Toggle companies
Locations
Search cities
Search counties
Search countries
Search states
Search continents
Actions
Request action
Fetch actions
Teams
Fetch team
Technologies
Search technologies
Utilities
API health
OpenAPI spec

Errors

Learn how to handle errors when using The Companies API.

The Companies API uses conventional HTTP response codes to indicate the success or failure of an API request.

Generally, codes in the 2xx range indicate success.

Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted).

Codes in the 5xx range indicate an error with our servers (these are rare).

Some 4xx errors that can be handled programmatically include an error code that briefly explains what happened.

Signup to access all the features

Get your API token and start implementing the API in your product with 500 free credits.

No credit card required

Error object
error. codestring

For some errors that could be handled programmatically, a number indicating the error code reported.

403

error. messagestring

A message providing more details about the error.

Missing API token

error. typestring

The type of error returned (see the list on your right).

apiConnectionError

Possible values

apiConnectionError
apiError
authenticationError
invalidRequestError
noCreditsRemaining
rateLimitError
HTTP status code summary
200 - OKThe request was successful.
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - UnauthorizedNo valid API token provided.
402 - Request FailedThe parameters were valid, but the request failed.
403 - ForbiddenThe API token doesn't have permission to perform the request.
404 - Not FoundThe requested resource doesn't exist.
409 - ConflictThe request conflicts with another request (perhaps due to using the same idempotent key).
429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server ErrorsSomething went wrong on our end. These rare errors should be reported, but we catch them with PostHog and fix them as soon as they occur.
HTTP errors types summary
apiConnectionErrorFailure to connect to The Companies API.
apiErrorAPI errors cover any other type of problem (e.g., a temporary problem with The Companies API's servers) and are extremely uncommon.
authenticationErrorFailure to properly authenticate yourself in the request.
invalidRequestErrorInvalid request errors arise when your request has invalid parameters.
noCreditsRemainingYou have no remaining credits to make this request.
rateLimitErrorToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.

Authentication

Learn how to authenticate your requests to The Companies API.

Rate Limiting

Learn how rate limiting works with The Companies API.

A glowing background image to highlight the titleA glowing background image to highlight the title
© 2025 The Companies API
  • Updates
  • Terms
  • Privacy
  • FAQ
  • Status

Fast-growing SaaS companies with remote teams