> ## 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.

# Browse the statutory hierarchy

> Walk the statutory tree one level at a time, in statutory order. Each call
returns the immediate children of wherever you are, so you can enumerate a code
top to bottom without searching.

**Cost**: 1 credit. Failed lookups are refunded.

Pass the deepest level you already know; the response returns the level below it:

- `corpusType=USC` -> the titles
- `corpusType=USC&titleNumber=42` -> the chapters in Title 42
- `corpusType=USC&titleNumber=42&chapter=21` -> the sections in Chapter 21 (leaf)
- `corpusType=CFR&titleNumber=17&part=240` -> the sections in Part 240 (leaf)
- `corpusType=STATE&state=tx` -> the state's codes
- `corpusType=STATE&state=tx&code=tx_pe` -> the chapters in the Texas Penal Code

Interior nodes carry a `sectionCount` and `isLeaf: false`; drill into one by
passing its `identifier` back as the matching filter (`chapter`, `part`, or
`code`). Leaf nodes are sections and carry an `actId` for
`/statutes/section/{actId}`. Browse supports `USC`, `CFR`, `STATE`, and
`REGULATION`; other corpora are flatter, so use `/statutes/search` for those.



## OpenAPI

````yaml https://api.vaquill.ai/external/openapi.json get /api/v1/statutes/divisions
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 (1x) | 30 | 500 | 2,000 |

    | API Business (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: Ask
    description: >-
      AI-powered US legal Q&A. Ask a question in plain language and get an
      answer grounded in 8M+ federal and state court opinions plus the US Code,
      the CFR, and all 50 state statute codes, returned with verified citations.
      Optionally scope to a single state with `usState`, filter sources with
      `sourcesFilter`, and pass `chatHistory` for multi-turn follow-ups.
  - 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/divisions:
    get:
      tags:
        - US Statutes
      summary: Browse the statutory hierarchy
      description: >-
        Walk the statutory tree one level at a time, in statutory order. Each
        call

        returns the immediate children of wherever you are, so you can enumerate
        a code

        top to bottom without searching.


        **Cost**: 1 credit. Failed lookups are refunded.


        Pass the deepest level you already know; the response returns the level
        below it:


        - `corpusType=USC` -> the titles

        - `corpusType=USC&titleNumber=42` -> the chapters in Title 42

        - `corpusType=USC&titleNumber=42&chapter=21` -> the sections in Chapter
        21 (leaf)

        - `corpusType=CFR&titleNumber=17&part=240` -> the sections in Part 240
        (leaf)

        - `corpusType=STATE&state=tx` -> the state's codes

        - `corpusType=STATE&state=tx&code=tx_pe` -> the chapters in the Texas
        Penal Code


        Interior nodes carry a `sectionCount` and `isLeaf: false`; drill into
        one by

        passing its `identifier` back as the matching filter (`chapter`, `part`,
        or

        `code`). Leaf nodes are sections and carry an `actId` for

        `/statutes/section/{actId}`. Browse supports `USC`, `CFR`, `STATE`, and

        `REGULATION`; other corpora are flatter, so use `/statutes/search` for
        those.
      operationId: list_statute_divisions_api_v1_statutes_divisions_get
      parameters:
        - name: corpusType
          in: query
          required: true
          schema:
            type: string
            description: 'Corpus to browse: USC, CFR, STATE, or REGULATION.'
            examples:
              - USC
            enum:
              - USC
              - CFR
              - STATE
              - REGULATION
            title: Corpustype
          description: 'Corpus to browse: USC, CFR, STATE, or REGULATION.'
        - name: state
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              2-letter jurisdiction code, required for STATE and REGULATION.
              Case-insensitive.
            examples:
              - tx
            enum:
              - al
              - ak
              - az
              - ar
              - ca
              - co
              - ct
              - de
              - dc
              - fl
              - ga
              - hi
              - id
              - il
              - in
              - ia
              - ks
              - ky
              - la
              - me
              - md
              - ma
              - mi
              - mn
              - ms
              - mo
              - mt
              - ne
              - nv
              - nh
              - nj
              - nm
              - ny
              - nc
              - nd
              - oh
              - ok
              - or
              - pa
              - pr
              - ri
              - sc
              - sd
              - tn
              - tx
              - ut
              - vt
              - va
              - wa
              - wv
              - wi
              - wy
            title: State
          description: >-
            2-letter jurisdiction code, required for STATE and REGULATION.
            Case-insensitive.
        - name: titleNumber
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: USC/CFR title number to drill into.
            examples:
              - 42
            title: Titlenumber
          description: USC/CFR title number to drill into.
        - name: code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              State code identifier, e.g. `tx_pe` (browse `/statutes/divisions`
              with `corpusType=STATE&state=<code>` to list them).
            examples:
              - tx_pe
            title: Code
          description: >-
            State code identifier, e.g. `tx_pe` (browse `/statutes/divisions`
            with `corpusType=STATE&state=<code>` to list them).
        - name: chapter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Chapter identifier to drill into (USC and state codes).
            examples:
              - '21'
            title: Chapter
          description: Chapter identifier to drill into (USC and state codes).
        - name: part
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Part identifier to drill into (CFR).
            examples:
              - '240'
            title: Part
          description: Part identifier to drill into (CFR).
      responses:
        '200':
          description: The child divisions at the requested level.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsStatutesDivisionsResponse'
              example:
                corpusType: USC
                level: sections
                parentLabel: Title 42, Chapter 21
                divisions:
                  - identifier: '1981'
                    name: Equal rights under the law
                    kind: section
                    isLeaf: true
                    actId: USC_T42_C21_S1981
                  - identifier: 1981a
                    name: >-
                      Damages in cases of intentional discrimination in
                      employment
                    kind: section
                    isLeaf: true
                    actId: USC_T42_C21_S1981a
                  - identifier: '1982'
                    name: Property rights of citizens
                    kind: section
                    isLeaf: true
                    actId: USC_T42_C21_S1982
                  - identifier: '1983'
                    name: Civil action for deprivation of rights
                    kind: section
                    isLeaf: true
                    actId: USC_T42_C21_S1983
                count: 38
                processingTimeMs: 5.1
                creditsConsumed: 1
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '402':
          description: Insufficient credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '422':
          description: Filters do not fit the corpus shape.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
components:
  schemas:
    UsStatutesDivisionsResponse:
      properties:
        corpusType:
          type: string
          title: Corpustype
          description: The corpus being walked, echoed back from the request.
          examples:
            - USC
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: The jurisdiction, for state-scoped corpora.
        level:
          type: string
          title: Level
          description: >-
            Kind of children returned: `titles`, `chapters`, `parts`, `codes`,
            or `sections`.
        parentLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentlabel
          description: Human label for the container these divisions sit under.
        divisions:
          items:
            $ref: '#/components/schemas/UsDivisionNode'
          type: array
          title: Divisions
          description: The child divisions, in statutory (natural) order.
        count:
          type: integer
          title: Count
          description: Number of divisions returned.
          default: 0
        processingTimeMs:
          type: number
          title: Processingtimems
          description: >-
            Server-side time for this request in milliseconds, excluding network
            transit. Useful for spotting a slow query; not billed on.
          default: 0
          examples:
            - 240.5
        creditsConsumed:
          type: number
          title: Creditsconsumed
          description: >-
            Credits actually charged for this call. Read it rather than assuming
            the list price: failed and refunded work bills 0, and batch
            endpoints charge per item returned, so a partial result costs less
            than a full one.
          default: 0
          examples:
            - 1
      type: object
      required:
        - corpusType
        - level
      title: UsStatutesDivisionsResponse
      description: Response for `GET /statutes/divisions`.
    ApiDetailError:
      properties:
        detail:
          type: string
          title: Detail
          description: >-
            Human-readable reason, safe to surface to an end user. Branch on the
            HTTP status rather than on this string: the wording is not part of
            the contract and may be reworded, but 401 (bad key), 402 (out of
            credits), 403 (missing scope), 404 (no such resource) and 429 (rate
            limited) are stable.
          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.
    UsDivisionNode:
      properties:
        identifier:
          type: string
          title: Identifier
          description: >-
            The division's identifier within its parent, e.g. `42` (title), `21`
            (chapter), `240` (part), `tx_pe` (state code), or `1983` (section).
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Human-readable name of the division, when the source provides one.
        kind:
          type: string
          title: Kind
          description: 'Division kind: `title`, `chapter`, `part`, `code`, or `section`.'
        isLeaf:
          type: boolean
          title: Isleaf
          description: True for sections (terminal nodes); false for interior divisions.
        actId:
          anyOf:
            - type: string
            - type: 'null'
          title: Actid
          description: >-
            Section identifier, present only on leaf sections. Pass it to
            `/statutes/section/{actId}`.
        sectionCount:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Sectioncount
          description: Sections under an interior division. Null on leaf sections.
      type: object
      required:
        - identifier
        - kind
        - isLeaf
      title: UsDivisionNode
      description: >-
        One child division in a `GET /statutes/divisions` listing.


        Interior nodes (titles, chapters, parts, codes) carry a `sectionCount`
        and

        `isLeaf: false`; drill into one by passing its `identifier` back as the

        matching filter. Leaf nodes are sections and carry an `actId` you can
        pass to

        `/statutes/section/{actId}`.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: vq_key_*
      description: >-
        API key issued from the Vaquill developer dashboard. Pass as
        `Authorization: Bearer vq_key_...`

````