> For the complete documentation index, see [llms.txt](https://docs.placekey.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.placekey.io/documentation/api-overview/error-codes.md).

# Error Codes

The API uses standard HTTP status codes to communicate success or failure.

| Code | Title                 | Description                                                                                                |
| ---- | --------------------- | ---------------------------------------------------------------------------------------------------------- |
| 200  | OK                    | The request was successful. Note that individual queries may still contain an `error` field (see below).   |
| 400  | Bad Request           | The request body is malformed or missing required structure.                                               |
| 401  | Unauthorized          | Your API key is invalid. Verify you are using the correct `apikey` header.                                 |
| 429  | Too Many Requests     | You have exceeded your rate limit. Check [your dashboard](https://dev.placekey.io/home) for usage details. |
| 50x  | Internal Server Error | An error occurred within the API. If this persists, please [contact us](https://placekey.io/feedback).     |

## Query-Level Errors

When the API cannot match a query, the response will have HTTP status 200 but the individual result will contain an `error` field instead of a `placekey`:

```json
{
  "query_id": "0",
  "error": "Invalid address"
}
```

```json
{
  "query_id": "0",
  "error": "Not enough fields provided"
}
```

## Authentication Errors

A 401 response returns a different structure:

```json
{
  "message": "Unauthorized",
  "request_id": "451ce12ff30aec58e644321a54ef4c63"
}
```
