> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blitz-api.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> BlitzAPI is the B2B Data API for GTM Builders: company and people search, enrichment, verified emails, US phone numbers and job postings behind one API key.
> Its data infrastructure holds 1B+ records: 550M+ professional profiles, 65M+ companies, 65M+ verified emails, 100M+ job postings and 45M+ US phone numbers.
> Pricing: Start $99, Scale $499, Build Your Infra from $999; every endpoint on every plan; fair use policy in records per month; rate limits per endpoint. Details: https://docs.blitz-api.ai/guide/concepts/pricing
> Company and product facts: https://www.blitz-api.ai/llms.txt

# Errors: HTTP Status Codes and 422 Validation

> HTTP status codes returned by BlitzAPI and how to handle each one. A 422 names each unknown or invalid request field and uses no records.

> Errors return JSON with `success: false` and a readable `message`, except a `423` and an unknown path (see below). A `422` also lists each invalid field, and every JSON error body carries a `fair_usage` block.

> **Agents & LLMs**: a Markdown version of this page is available by appending `.md` to the URL, and the full documentation index is at [llms.txt](https://docs.blitz-api.ai/llms.txt).

## Status codes

| Code | Meaning | What to do |
| :- | :- | :- |
| `400` | Bad Request | The request body is not valid JSON. Send a JSON object with the header `Content-Type: application/json`. |
| `401` | Unauthorized | Missing or invalid `x-api-key` header. A valid key also gets a `401` (`"message": "You do not have access to this route"`) when your plan does not include the endpoint: check `allowed_apis` in [`GET /v2/account/key-info`](https://docs.blitz-api.ai/guide/getting-started/authentication#verifying-your-key). |
| `402` | Payment Required | Account limit reached. Upgrade your plan. `fair_usage` gives your `records_remaining` and `next_reset_at`. |
| `404` | Not Found | The path does not exist (plain-text `NOT_FOUND` body, not JSON). On `GET /v2/account/key-info`, no billing account was found for your key (`"message": "Customer not found"`). |
| `422` | Unprocessable Entity | A request field is unknown or has an invalid value. Fix the fields listed in `errors` and resend. See [below](#validation-errors-422). |
| `423` | Locked | Your account was locked after unusual activity. The body is `{"blocked": true, "message": "..."}`, without `success`. Contact support to unlock it: retrying does not help. |
| `429` | Too Many Requests | Exceeded an endpoint's rate limit. Throttle client-side to your plan's `max_requests_per_seconds`. |
| `500` | Internal Server Error | Transient server error. Retry with exponential backoff. |
| `503` | Service Unavailable | The service is temporarily unavailable. Retry with exponential backoff. A `503` uses no records. On search, TAM and distribution endpoints the body is `{"success": false, "found": false, "message": "Service temporarily unavailable, please try again"}`. |

Only `429`, `500`, and `503` are worth retrying as-is. A `400` or `422` fails the same way until you change the request.

***

## Usage block on errors

Every JSON error body of a `/v2` endpoint carries `fair_usage`, the same block as on a successful response:

```json 401 theme={null}
{
  "success": false,
  "message": "Missing API key, please provide a valid API key in the 'x-api-key' header",
  "fair_usage": {
    "records_used": 0,
    "request_id": "019bae09-0055-7441-b2ea-16086e499219"
  }
}
```

| Field | Always present | Description |
| :- | :- | :- |
| `request_id` | Yes | Id of the request. Quote it when you contact support. |
| `records_used` | Yes | Records the failed request used. |
| `records_remaining` | No | Records left on your plan: a number, or `"unlimited"`. |
| `next_reset_at` | No | When your record balance resets. |
| `rate_limit` | No | `requests_per_second` and `remaining_this_second` on the endpoint. |

Read the last three fields as optional: they are absent when the request stops before your plan is read, such as on a `401`.

***

## Response headers

Every response, errors included, carries an `X-Request-Id` header: quote it when you contact support. On a `200` and in every JSON error body, `fair_usage.request_id` holds the same value.

| Header | Sent on | Value |
| :- | :- | :- |
| `X-Request-Id` | Every response | Unique id of the request (UUID v7). |
| `x-records-used` | Metered endpoints, when the request runs | Records the request used. |
| `x-records-remaining` | Metered endpoints, when the request runs | Records left on your plan. |
| `RateLimit-Limit` | Rate-limited endpoints | Requests allowed per second on this endpoint. |
| `RateLimit-Remaining` | Rate-limited endpoints | Requests left in the current 1-second window. |
| `RateLimit-Reset` | Rate-limited endpoints | Always `1`: the window is 1 second. |
| `RateLimit-Policy` | Rate-limited endpoints | The limit and its window, such as `10;w=1`. |
| `Retry-After` | `429` only | Seconds to wait before retrying: `1`. |

***

## Validation errors (422)

The API checks the request body before it runs the request, so a `422` never uses records. A body is rejected when it contains:

* **A field the endpoint does not define**, at any depth. A misspelled filter such as `company.industry.includes` returns a `422` instead of being ignored.
* **A value outside an accepted list**, such as an industry, job level, or employee range. These values are case-sensitive, except industries, which ignore case and also accept other known spellings of a label: copy them from [Field Normalization](https://docs.blitz-api.ai/guide/reference/normalization.md).
* **A wrong type or an out-of-range value**, such as a string for `max_results` or more than 50 items in a filter list.
* **A combination that cannot match**, such as a range with `min` above `max`, or `include_active_jobs` and `include_past_jobs` both set to `false`.

```json Invalid value theme={null}
{
  "success": false,
  "message": "Invalid request body. company.industry.include[0]: Invalid value \"Software\". Did you mean \"Computer Software\", \"Software Development\" or \"Embedded Software Products\"?",
  "errors": [
    {
      "field": "company.industry.include[0]",
      "message": "Invalid value \"Software\". Did you mean \"Computer Software\", \"Software Development\" or \"Embedded Software Products\"?"
    }
  ]
}
```

| Field | Type | Description |
| :- | :- | :- |
| `success` | `boolean` | Always `false`. |
| `message` | `string` | One-line summary of the first three errors, for logs. |
| `errors` | `array` | One item per problem, up to 20. |
| `errors[].field` | `string` | Path to the problem. Dots mark nesting and `[n]` marks an array item, e.g. `company.industry.include[0]`. |
| `errors[].message` | `string` | What is wrong. When the input is close to a valid field or value, it suggests the closest match. Otherwise a short list of allowed fields or values is given in full. |

For an unknown field, `field` is the full path to the unknown key (a top-level key gives its own name, such as `compnay`) and `message` suggests the closest valid field, or lists the allowed fields when none is close:

```json Unknown field theme={null}
{
  "success": false,
  "message": "Invalid request body. company.industry.includes: Unknown field. Did you mean \"include\"?",
  "errors": [
    {
      "field": "company.industry.includes",
      "message": "Unknown field. Did you mean \"include\"?"
    }
  ]
}
```

A `null` reads the same as leaving the field out, at any depth, including inside the objects of a list: the field's default applies (`max_results: null` gives the endpoint's default, `country_code: null` on Employee Finder gives `["WORLD"]`, and `cascade[].location: null` on Waterfall ICP searches the whole world), and an unknown field set to `null` is ignored instead of returning a `422`. A `null` on a required field, or a `null` item inside a list, still returns a `422`.

> [!TIP]
>
> Read `errors[].field` to find what to fix, and treat `message` as text for humans: its wording can change.

> [!NOTE]
>
> Free-text filters such as `name`, `keywords`, `job_title`, `city`, and `country_code` are not checked against a list. A typo in one of them is not an error: the search runs and returns 0 results. Only the length of a `country_code` is checked: a value that does not have two letters, such as `USA` or `United Kingdom`, returns a `422` (`WORLD` is the one exception). See [Country Codes](https://docs.blitz-api.ai/guide/reference/normalization/geography.md#country-codes) and [Troubleshooting](https://docs.blitz-api.ai/guide/reference/normalization.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.