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

# List available codes for a US state

> List the distinct statutory codes (Penal, Civil, Health & Safety, ...) ingested for one US state, so you can see what is covered before searching. To search within this state, pass `state` (the 2-letter code) with `corpusType=STATE` to `/statutes/search`. Court rules and state constitutions are listed under the `STATE_RULES` and `STATE_CONSTITUTION` corpora, not here.

**Free.** Requires an API key and is rate-limited, but costs no credits.



## OpenAPI

````yaml https://api.vaquill.ai/external/openapi.json get /api/v1/statutes/codes
openapi: 3.1.0
info:
  title: Vaquill Developer API
  description: >-
    Public API for legal statutes and legislation.


    **Authentication**: Pass your API key via the `Authorization: Bearer
    vq_key_...` header.


    **Credits**: Each call costs API credits. See `GET
    /api/v1/api-credits/pricing` for the full pricing matrix.


    ## Jurisdictions


    | Jurisdiction | Coverage | `countryCode` |

    |---|---|---|

    | **United States** | USC, CFR, nearly all 50 state statutory codes (plus DC
    and Puerto Rico), state constitutions, and court rules. | `US` |


    See the full [Coverage page](https://www.vaquill.ai/docs/coverage) for the
    jurisdiction-by-jurisdiction breakdown, or call `/statutes/states` for live
    counts.


    ## Endpoints


    - **US Statutes**: Search and retrieve USC, CFR, state statutes,
    constitutions, court rules, executive orders, and regulations with full text

    - **Pricing**: Credit costs per endpoint (no auth required)


    ## Rate limits


    Limits are enforced per API key and scale with your plan. A `429` response
    includes a `Retry-After` header.


    | Plan | Per minute | Per hour | Per day |

    |---|---|---|---|

    | API ($199/mo, 1x) | 30 | 500 | 2,000 |

    | API Business ($1,000/mo, 5x) | 150 | 2,500 | 10,000 |


    For full documentation, visit the [API
    Reference](https://www.vaquill.ai/docs/api-reference/).
  version: 1.0.0
  contact:
    name: Vaquill API Support
    url: https://www.vaquill.ai
    email: support@vaquill.ai
  license:
    name: Proprietary
    url: https://www.vaquill.ai/terms
  termsOfService: https://www.vaquill.ai/terms
servers:
  - url: https://api.vaquill.ai
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: US Statutes
    description: >-
      Search and retrieve US statutes. Covers the United States Code (USC), Code
      of Federal Regulations (CFR), all 50 state statutes, constitutions, court
      rules, executive orders, Federal Register agency rules, agency guidance,
      and state regulations. Scope a search with the `corpusType` filter.


      - **Search**: Search across all USC, CFR, state, and regulatory sections

      - **Section**: Get metadata, citation, hierarchy, and source links for a
      specific section

      - **Body**: Get the full text of a section
  - name: Pricing
    description: >-
      Credit pricing and conversion rates. No authentication required. 1 credit
      = $0.01 USD.
externalDocs:
  description: Full API Reference
  url: https://www.vaquill.ai/docs/api-reference/
paths:
  /api/v1/statutes/codes:
    get:
      tags:
        - US Statutes
      summary: List available codes for a US state
      description: >-
        List the distinct statutory codes (Penal, Civil, Health & Safety, ...)
        ingested for one US state, so you can see what is covered before
        searching. To search within this state, pass `state` (the 2-letter code)
        with `corpusType=STATE` to `/statutes/search`. Court rules and state
        constitutions are listed under the `STATE_RULES` and
        `STATE_CONSTITUTION` corpora, not here.


        **Free.** Requires an API key and is rate-limited, but costs no credits.
      operationId: list_statutes_codes_api_v1_statutes_codes_get
      parameters:
        - name: state
          in: query
          required: true
          schema:
            type: string
            title: State
      responses:
        '200':
          description: Codes for the requested state.
          content:
            application/json:
              schema: {}
              example:
                data:
                  state: tx
                  stateName: Texas
                  codes:
                    - actId: tx_gv
                      displayLabel: Tex. Government Code
                      sectionCount: 15107
                    - actId: tx_hs
                      displayLabel: Tex. Health and Safety Code
                      sectionCount: 8876
                    - actId: tx_pe
                      displayLabel: Tex. Penal Code
                      sectionCount: 261
                meta:
                  processingTimeMs: 240
                  creditsConsumed: 0
        '400':
          description: '`state` query param is missing or invalid.'
          content:
            application/json:
              example:
                detail: '`state` is required.'
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '403':
          description: API key lacks `research:read` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
components:
  schemas:
    ApiDetailError:
      properties:
        detail:
          type: string
          title: Detail
          examples:
            - Insufficient API credits.
      type: object
      required:
        - detail
      title: ApiDetailError
      description: |-
        Error envelope the API actually returns.

        All errors (401/402/403/404/422/429/5xx) come back as a single
        `detail` string (FastAPI default), e.g. `{"detail": "Insufficient API
        credits."}`. Documenting the real shape so client code can rely on it.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: vq_key_*
      description: >-
        API key issued from the Vaquill developer dashboard. Pass as
        `Authorization: Bearer vq_key_...`

````