> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List of states

> Returns a list of US states supported for state-level geo-targeting. Only US is currently supported — other country values return an empty array.

Returns the states available for state-level geo-targeting, which is supported for the US only. [State-level targeting](https://cloro.dev/docs/guides/providers.md#state-level-targeting) lists the providers that accept `state` and what it costs; Google Search and Google AI Mode use the `location` / `uule` parameters for sub-country precision instead.

## Example usage

```bash cURL theme={null}
curl -X GET "https://api.cloro.dev/v1/states?country=US" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python Python theme={null}
import requests

response = requests.get(
    "https://api.cloro.dev/v1/states",
    params={"country": "US"},
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
states = response.json()
# [{"code": "AL", "name": "Alabama"}, {"code": "AK", "name": "Alaska"}, ...]
```

```javascript Node.js theme={null}
const response = await fetch('https://api.cloro.dev/v1/states?country=US', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const states = await response.json();
// [{"code": "AL", "name": "Alabama"}, {"code": "AK", "name": "Alaska"}, ...]
```

```json Response theme={null}
[
  { "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" }
]
```

## Using states in monitor requests

Pass the `code` value as `state` alongside `country: "US"`:

```bash cURL theme={null}
curl -X POST "https://api.cloro.dev/v1/monitor/chatgpt" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "best Italian restaurants near me",
    "country": "US",
    "state": "CA"
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.cloro.dev/v1/monitor/chatgpt",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "prompt": "best Italian restaurants near me",
        "country": "US",
        "state": "CA"
    }
)
```

## Common questions

### Can I use `state` with a non-US country?

It depends on the operation:

* **`GET /v1/states?country=GB`** (or any non-US country) — returns an empty array, no error.
* **`state` field in a monitor request** (e.g., `POST /v1/monitor/chatgpt`) with a non-US `country` — returns a **400 validation error**. The `state` field is only accepted when `country` is `"US"`.

### How does state targeting work?

cloro routes your request through a proxy located in that US state, which changes the local results, regional content, and location-specific information the AI provider returns.


## OpenAPI

````yaml api-reference/openapi.json GET /v1/states
openapi: 3.1.0
info:
  title: cloro
  description: >-
    API for monitoring AI responses across different providers and regions. One
    request returns the engine's answer as structured JSON: parsed text, cited
    sources, brand entities, shopping results, and ads, geo-targeted by country;
    coverage varies by provider (`GET /v1/countries?model=<provider>` lists it).


    ## Authentication


    Send your API key as `Authorization: Bearer <key>`. Keys are self-serve from
    the [dashboard](https://dashboard.cloro.dev/api-keys) and every account
    starts on a free tier of 500 monthly credits. One key grants every endpoint;
    there are no per-key scopes today.


    ## Versioning and deprecation


    The version is in the URL path. Every endpoint lives under `/v1/`; there is
    no version header or query parameter.


    Within a version, changes are additive: new endpoints, new optional request
    fields, and new response fields can appear at any time. A client must ignore
    response fields it does not recognize. A breaking change gets a new version
    path (`/v2/`) rather than reusing an existing one.


    A deprecated endpoint says so in its own responses, not only in a changelog:
    `Deprecation` (RFC 9745) carries the date the deprecation took effect,
    `Sunset` (RFC 8594) the date the endpoint stops responding, and a `Link`
    header with `rel="deprecation"` points at the replacement. There is a
    minimum of six months between the two dates for any generally available
    endpoint. Nothing is deprecated today.


    ## Rate limits


    Every authenticated response carries `X-RateLimit-Limit` and
    `X-RateLimit-Remaining`, so a client can self-throttle from the response it
    already has. Scrape endpoints (`/v1/monitor/*` except
    `/v1/monitor/google/goto`) also send the `X-Concurrency-*` headers once a
    request passes validation, and the `X-Credits-*` headers on a `200`. Every
    response carries `X-Request-ID` and `X-Latency-Ms`.


    A `429` has one of three codes: `RATE_LIMIT_EXCEEDED` (one-second window,
    clears almost immediately), `CONCURRENCY_LIMIT_EXCEEDED` (scrape endpoints;
    clears when your in-flight jobs finish) or `QUEUE_LIMIT_EXCEEDED` (async
    submission; clears as queued tasks start processing). None carries
    `Retry-After`, and the IETF `RateLimit-*` header names are not sent.


    ## Errors


    Every 4xx and 5xx response uses the `Error` envelope: `{ "success": false,
    "error": { "code", "message", "details", "timestamp" } }`. `error` is always
    an object. Branch on `error.code`, a stable machine-readable identifier;
    `message` is for a human reading a log, and `details` appears only when
    there is extra context. A `503` (`SERVICE_UNAVAILABLE`) is temporary: retry
    after the number of seconds in its `Retry-After` header.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
  contact:
    name: cloro support
    email: support@cloro.dev
  termsOfService: https://cloro.dev/terms/
servers:
  - url: https://api.cloro.dev
    description: Production server
security:
  - bearerAuth: []
paths:
  /v1/states:
    get:
      summary: List of states
      description: >-
        Returns a list of US states supported for state-level geo-targeting.
        Only US is currently supported — other country values return an empty
        array.
      operationId: getStates
      parameters:
        - name: country
          in: query
          required: true
          description: ISO 3166-1 alpha-2 country code. Only "US" returns results.
          schema:
            type: string
            minLength: 2
            maxLength: 2
            pattern: ^[A-Z]{2}$
          example: US
      responses:
        '200':
          description: List of supported states
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    code:
                      type: string
                      description: USPS two-letter state code
                      example: CA
                    name:
                      type: string
                      description: Full state name
                      example: California
                  required:
                    - code
                    - name
                example:
                  - 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
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-Request-ID:
              $ref: '#/components/headers/XRequestId'
            X-Latency-Ms:
              $ref: '#/components/headers/XLatencyMs'
        '400':
          description: Bad Request — missing or invalid country parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: Unauthorized - Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '429':
          description: Too Many Requests - API key rate limit exceeded
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-Request-ID:
              $ref: '#/components/headers/XRequestId'
            X-Latency-Ms:
              $ref: '#/components/headers/XLatencyMs'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
components:
  headers:
    XRateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
        example: 1000
    XRateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
        example: 997
    XRequestId:
      description: Unique ID for this request. Support uses it to find your request.
      schema:
        type: string
        format: uuid
        example: b0864943-5d45-4796-bc64-f052661256f0
    XLatencyMs:
      description: >-
        Milliseconds the API spent on the request, from arrival to the start of
        the response. Excludes network transit.
      schema:
        type: integer
        example: 3420
  schemas:
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Request validation failed
            details:
              type: array
              description: >-
                One entry per invalid field. Sent on request-body validation
                errors.
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: prompt
                  message:
                    type: string
                    example: Prompt cannot be empty
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    AuthenticationError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - MISSING_API_KEY
                - INVALID_API_KEY_FORMAT
                - INVALID_OR_EXPIRED_API_KEY
              example: MISSING_API_KEY
            message:
              type: string
              example: Missing or invalid API key
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    RateLimitError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: RATE_LIMIT_EXCEEDED
            message:
              type: string
              example: API key rate limit exceeded
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
    InternalError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_SERVER_ERROR
            message:
              type: string
              description: >-
                For example `Maximum retries exceeded` when every attempt
                failed, or `Internal server error` for an unexpected failure.
              example: Maximum retries exceeded
            timestamp:
              type: string
              format: date-time
              example: '2025-01-15T12:00:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        cloro API key as a bearer token. One key grants every endpoint in this
        spec; per-key scopes are not available, so a client cannot request a
        narrower permission. Keys are created and revoked in the
        [dashboard](https://dashboard.cloro.dev/api-keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.