# 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.placekey.io/documentation/api-overview/error-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
