> For the complete documentation index, see [llms.txt](https://docs.webz.io/llms.txt). Any docs page is also available as markdown at `https://docs.webz.io/markdown/<environment>/<slug>`.

# Errors, Rate Limits & Credits

Requests are metered two ways - how fast you call, and what you spend: credits on contract plans, dollars on pay as you go.

## Request rate

Requests are rate-limited per token, about **1 request per second**. Sending faster returns `429` with the `X-RateLimit-Reason: rate_limit` header.

## Credits (contract plans)

- Every request costs **1 credit** - including a request that returns 0 records and a request on a `pending` domain.
- The Non-Human Identities (NHI) API has its own credit balance, separate from the Data Breaches API. `requestsLeft` in every response shows what remains.
- When credits run out, requests return `429` with the `X-RateLimit-Reason: insufficient_credits` header.

## Pay as you go

Pay-as-you-go accounts are billed in USD from their balance, per request and per record returned:

| | Price |
| --- | --- |
| Per request (including an empty page or a `pending` domain) | **$0.25** |
| Per secret record returned | **$0.85** |

- Responses carry `cost` and `balance` instead of `requestsLeft` - see [Response Format](https://docs.webz.io/docs/webz/nhi-response-format). Add `size` (`1`-`100`, default `100`) to control how many records a page returns.
- Requests are accepted while your balance is above $0; a request that costs more than what is left takes the remainder. At $0, requests return `429` with `X-RateLimit-Reason: insufficient_credits`. Top up or enable auto-recharge at [app.webz.io/playground/settings/credits](https://app.webz.io/playground/settings/credits).
- You can only query domains verified in your Assets - see [Search Scope](https://docs.webz.io/docs/webz/data-breach-scope) in the Data Breaches API. An unverified domain returns `403` with `X-RateLimit-Reason: unverified_asset`.

> [!WARNING]
> Pay-as-you-go results are **partially masked**: the matched secret, its parts, the secret inside the evidence context, device details, and the publication source keep only their first character, for example `A********`. The domain, token type, service type, severity, verification status, and dates stay in clear. You learn *that* a secret leaked, not the secret itself. Contract plans receive full records - contact **sales@webz.io**.

## Domains

On contract plans any valid registered domain can be queried; the first query starts monitoring it (see [Response Format](https://docs.webz.io/docs/webz/nhi-response-format)). If Webz.io cannot take on a new domain at the moment, the request returns `503` - existing domains are unaffected.

## Error responses

Errors return `{ "errorCode": <code>, "errors": ["message", ...] }`.

| Status | When |
| --- | --- |
| `400` | Missing, unknown, duplicated, or malformed parameter; a `domain` that is not a valid registered domain; or an invalid `next` cursor. |
| `401` | Missing or invalid token, or your account lacks the Non-Human Identities (NHI) API permission. |
| `402` | Account email is not verified. |
| `403` | Pay as you go: the domain is not a verified asset (`X-RateLimit-Reason: unverified_asset`). |
| `404` | Endpoint not found, or no user for the token. |
| `429` | Rate limit exceeded, or insufficient credits / balance (see `X-RateLimit-Reason`). |
| `500` | Internal error. |
| `503` | Service temporarily unavailable, or no capacity to monitor a new domain right now. |

> [!TIP]
> Need access, more credits, or full records? Contact **sales@webz.io**.

