# List US states

`GET https://api.answerline.dev/v1/states`

Lists the US state codes `state` takes: the 50 states and DC, each a two-letter code. Every engine accepts `state`. ChatGPT and Gemini answer as a person in that state sees it; every other engine answers for the whole US. States exist only for the US; any other country value yields an empty array. See https://answerline.dev/docs/coverage#states

## Parameters

- `country` (string, in query, required): Country as an ISO 3166-1 alpha-2 code. Results are available only for "US".

## Responses

- 200: States that are supported
- 400: Bad Request: country parameter absent or not valid
- 401: Unauthorized - authentication failed
- 429: Too Many Requests - the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`), which returns `Retry-After` without any limit headers, or one address presented too many unknown keys (`RATE_LIMIT_EXCEEDED`, with `Retry-After`)
- 500: Internal Server Error

## Request

curl:

```bash
curl -X GET "https://api.answerline.dev/v1/states" \
  -H "Authorization: Bearer $API_KEY"
```


## Example responses

200:

```json
[
  {
    "code": "AL",
    "name": "Alabama"
  },
  {
    "code": "AK",
    "name": "Alaska"
  },
  {
    "code": "AZ",
    "name": "Arizona"
  },
  {
    "code": "CA",
    "name": "California"
  },
  {
    "code": "DC",
    "name": "District of Columbia"
  },
  {
    "code": "NY",
    "name": "New York"
  },
  {
    "code": "TX",
    "name": "Texas"
  }
]
```

400:

```json
{
  "success": false,
  "error": "Request validation failed",
  "details": [
    {
      "field": "prompt",
      "message": "Prompt must not be empty"
    }
  ]
}
```

