# Errors, Limits & Credits

Failed requests are not charged. The API charges the account only after an answer is produced successfully.

## Query limits

- Maximum 750 characters
- Maximum 100 words
- Empty or whitespace-only questions are rejected

## Errors

| HTTP status | When it happens |
| --- | --- |
| `400` | The query is empty or exceeds the character or word limit |
| `401` | The API token is missing, invalid, or lacks the required permission |
| `402` | The account does not have enough credits or PAYG balance |
| `403` | The account is inactive, blocked, or its trial has ended |
| `422` | The JSON request body or a parameter type is invalid |
| `429` | The token exceeded its request-rate limit |
| `5xx` | The news search or answer service is temporarily unavailable |

```json
{
  "detail": "Query is too long. Please use at most 750 characters (your query has 800)."
}
```

## Rate limits

Rate limits are configured per API token. If you exceed the limit, the API returns HTTP `429`. Contact Webz support if you need a higher limit.

## Credits and PAYG pricing

| Answer type | Request value | Subscription credits | PAYG cost |
| --- | --- | ---: | ---: |
| Standard | `"detailed": false` or omitted | 5 | $0.005 |
| Detailed | `"detailed": true` | 8 | $0.008 |

Subscription responses include `credits_used` and `requests_left`. PAYG responses include `cost` and the remaining `balance`.

