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

# Search US statutes, constitutions, court rules, and executive actions

> Search across federal and state law and get back the most relevant sections
with citations and links to official source documents.

**Corpora (`corpusType`):**
- `USC`: United States Code (54,855 sections)
- `CFR`: Code of Federal Regulations (219,403 sections)
- `STATE`: State statutory codes, 49 states plus DC and Puerto Rico. Call `/statutes/states` for live coverage and `/statutes/codes` for a state's codes; see the [Coverage page](https://www.vaquill.ai/docs/coverage) for the full breakdown.
- `CONSTITUTION`: U.S. Constitution (Articles I-VII + 27 Amendments)
- `FEDERAL_RULES`: FRCP, FRCrP, FRE, FRAP, FRBP (297 sections)
- `STATE_CONSTITUTION`: state constitutions (41 jurisdictions)
- `STATE_RULES`: state court rules (AZ, CA, IL, MD, MN, NV, PA)
- `EXECUTIVE_ACTION`: Federal Register Presidential Documents (Executive Orders, Proclamations, Memos; 2015 to today, refreshed daily)
- `REGULATION`: state administrative regulations (pair with `state`; call `/statutes/states` for coverage)
- `FEDERAL_REGISTER`: Federal Register agency rules, final and proposed
- `AGENCY_GUIDANCE`: agency guidance (SSA rulings, IRS notices, revenue rulings and procedures)

**Authentication**: API key via `Authorization: Bearer vq_key_...`

**Cost**: 4 credits per call (see `/api-credits/pricing`). Failed calls are not charged.

**Pagination**: use `limit` (page size, max 50) with `offset` (max 40); check `hasMore` in the response to page forward.

Returns relevant sections with full metadata: citation, title hierarchy, and
direct links to official source documents where available.

## Examples

```python
# Search SEC regulations
requests.post(url, headers=h, json={
    "query": "insider trading material nonpublic information",
    "corpusType": "CFR",
    "titleNumber": 17,
    "limit": 5,
})

# Search California state statutes
requests.post(url, headers=h, json={
    "query": "shareholder derivative action standing",
    "corpusType": "STATE",
    "state": "ca",
})

# Search Executive Orders on a topic
requests.post(url, headers=h, json={
    "query": "AI safety federal agency adoption",
    "corpusType": "EXECUTIVE_ACTION",
})

# Search Federal Rules of Civil Procedure
requests.post(url, headers=h, json={
    "query": "personal jurisdiction long-arm statute",
    "corpusType": "FEDERAL_RULES",
})

# Cross-corpus search (no corpusType filter)
requests.post(url, headers=h, json={
    "query": "due process equal protection fourteenth amendment",
})
```

## Parameters

- `query` (required): natural-language or keyword query, 2 to 500 characters.
- `corpusType` (optional): one of the 8 corpus tokens above. Omit to search every corpus at once.
- `state` (optional, 2-letter lowercase, e.g. `ca`): restrict to one state. Applies only to `STATE`, `STATE_CONSTITUTION`, and `STATE_RULES`; ignored for federal corpora.
- `titleNumber` (optional, integer): restrict to a USC/CFR title (e.g. 17 for SEC, 42 for civil rights). Applies only to `USC`/`CFR`. State titles are alphabetic codes (use `/statutes/codes` to find them), so this is ignored for state corpora.
- `limit` (optional, default 10, max 50): number of results to return.

## Tips

- Provide `corpusType` whenever you know it. Unscoped queries can surface keyword matches from unrelated corpora; a corpus filter sharply improves precision.
- Take a returned `actId` and call `/statutes/section/{actId}` for metadata or `/statutes/section/{actId}/body` for the full text.
- `relevanceScore` ranks results within one response; do not compare it across different queries.



## OpenAPI

````yaml https://api.vaquill.ai/external/openapi.json post /api/v1/statutes/search
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/search:
    post:
      tags:
        - US Statutes
      summary: Search US statutes, constitutions, court rules, and executive actions
      description: >-
        Search across federal and state law and get back the most relevant
        sections

        with citations and links to official source documents.


        **Corpora (`corpusType`):**

        - `USC`: United States Code (54,855 sections)

        - `CFR`: Code of Federal Regulations (219,403 sections)

        - `STATE`: State statutory codes, 49 states plus DC and Puerto Rico.
        Call `/statutes/states` for live coverage and `/statutes/codes` for a
        state's codes; see the [Coverage
        page](https://www.vaquill.ai/docs/coverage) for the full breakdown.

        - `CONSTITUTION`: U.S. Constitution (Articles I-VII + 27 Amendments)

        - `FEDERAL_RULES`: FRCP, FRCrP, FRE, FRAP, FRBP (297 sections)

        - `STATE_CONSTITUTION`: state constitutions (41 jurisdictions)

        - `STATE_RULES`: state court rules (AZ, CA, IL, MD, MN, NV, PA)

        - `EXECUTIVE_ACTION`: Federal Register Presidential Documents (Executive
        Orders, Proclamations, Memos; 2015 to today, refreshed daily)

        - `REGULATION`: state administrative regulations (pair with `state`;
        call `/statutes/states` for coverage)

        - `FEDERAL_REGISTER`: Federal Register agency rules, final and proposed

        - `AGENCY_GUIDANCE`: agency guidance (SSA rulings, IRS notices, revenue
        rulings and procedures)


        **Authentication**: API key via `Authorization: Bearer vq_key_...`


        **Cost**: 4 credits per call (see `/api-credits/pricing`). Failed calls
        are not charged.


        **Pagination**: use `limit` (page size, max 50) with `offset` (max 40);
        check `hasMore` in the response to page forward.


        Returns relevant sections with full metadata: citation, title hierarchy,
        and

        direct links to official source documents where available.


        ## Examples


        ```python

        # Search SEC regulations

        requests.post(url, headers=h, json={
            "query": "insider trading material nonpublic information",
            "corpusType": "CFR",
            "titleNumber": 17,
            "limit": 5,
        })


        # Search California state statutes

        requests.post(url, headers=h, json={
            "query": "shareholder derivative action standing",
            "corpusType": "STATE",
            "state": "ca",
        })


        # Search Executive Orders on a topic

        requests.post(url, headers=h, json={
            "query": "AI safety federal agency adoption",
            "corpusType": "EXECUTIVE_ACTION",
        })


        # Search Federal Rules of Civil Procedure

        requests.post(url, headers=h, json={
            "query": "personal jurisdiction long-arm statute",
            "corpusType": "FEDERAL_RULES",
        })


        # Cross-corpus search (no corpusType filter)

        requests.post(url, headers=h, json={
            "query": "due process equal protection fourteenth amendment",
        })

        ```


        ## Parameters


        - `query` (required): natural-language or keyword query, 2 to 500
        characters.

        - `corpusType` (optional): one of the 8 corpus tokens above. Omit to
        search every corpus at once.

        - `state` (optional, 2-letter lowercase, e.g. `ca`): restrict to one
        state. Applies only to `STATE`, `STATE_CONSTITUTION`, and `STATE_RULES`;
        ignored for federal corpora.

        - `titleNumber` (optional, integer): restrict to a USC/CFR title (e.g.
        17 for SEC, 42 for civil rights). Applies only to `USC`/`CFR`. State
        titles are alphabetic codes (use `/statutes/codes` to find them), so
        this is ignored for state corpora.

        - `limit` (optional, default 10, max 50): number of results to return.


        ## Tips


        - Provide `corpusType` whenever you know it. Unscoped queries can
        surface keyword matches from unrelated corpora; a corpus filter sharply
        improves precision.

        - Take a returned `actId` and call `/statutes/section/{actId}` for
        metadata or `/statutes/section/{actId}/body` for the full text.

        - `relevanceScore` ranks results within one response; do not compare it
        across different queries.
      operationId: search_statutes_api_v1_statutes_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatuteSearchRequest'
        required: true
      responses:
        '200':
          description: Ranked sections for the query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatuteSearchResponse'
              example:
                results:
                  - actId: CFR_T17_P240_S240_10b5_1
                    citation: 17 C.F.R. § 240.10b5-1 (2026)
                    citationShort: 17 C.F.R. § 240.10b5-1
                    title: >-
                      Trading on the basis of material nonpublic information in
                      insider trading cases
                    corpusType: CFR
                    state: federal
                    year: 2026
                    relevanceScore: 0.91
                    excerpt: >-
                      The manipulative and deceptive devices prohibited by
                      section 10(b)...
                    titleNumber: 17
                    sectionNumber: 240.10b5-1
                    displayPath: Title 17 CFR > Chapter II > Part 240 > Section 240.10b5-1
                    htmlUrl: https://statutes-us.vaquill.ai/ecfr/...
                    externalUrl: https://www.ecfr.gov/...
                total: 1
                query: insider trading material nonpublic information
                processingTimeMs: 412.3
                creditsConsumed: 4
        '402':
          description: Insufficient API credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
              example:
                detail: Insufficient credits
        '422':
          description: >-
            Invalid request body (e.g. query too short, limit over 50, bad
            corpusType).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDetailError'
              example:
                detail: Validation error
components:
  schemas:
    StatuteSearchRequest:
      properties:
        query:
          type: string
          maxLength: 500
          minLength: 2
          title: Query
          description: Search query in natural language.
          examples:
            - insider trading penalties
        corpusType:
          anyOf:
            - type: string
              enum:
                - USC
                - CFR
                - STATE
                - CONSTITUTION
                - FEDERAL_RULES
                - STATE_CONSTITUTION
                - STATE_RULES
                - EXECUTIVE_ACTION
                - REGULATION
                - FEDERAL_REGISTER
                - AGENCY_GUIDANCE
            - type: 'null'
          title: Corpustype
          description: >-
            Restrict to one corpus. One of: `USC` (United States Code), `CFR`
            (Code of Federal Regulations), `STATE` (state statutory codes; call
            `/statutes/states` for the list of ingested jurisdictions),
            `CONSTITUTION` (U.S. Constitution), `FEDERAL_RULES` (FRCP / FRCrP /
            FRE / FRAP / FRBP), `STATE_CONSTITUTION` (state constitutions,
            currently CA/VA/NC/WI), `STATE_RULES` (state court rules, currently
            CA), `EXECUTIVE_ACTION` (Federal Register Presidential Documents),
            `REGULATION` (state administrative regulations; pair with `state`),
            `FEDERAL_REGISTER` (Federal Register agency rules, final and
            proposed), `AGENCY_GUIDANCE` (agency guidance: SSA rulings, IRS
            notices, revenue rulings and procedures). Omit to search across all
            corpora.
          examples:
            - CFR
        state:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: State
          description: >-
            2-letter state code (lowercase, e.g. `ca`, `tx`, `ny`) used to
            filter state corpora. Ignored when `corpusType` is `USC`, `CFR`,
            `CONSTITUTION`, `FEDERAL_RULES`, or `EXECUTIVE_ACTION`.
          examples:
            - ca
        titleNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Titlenumber
          description: >-
            Filter by USC/CFR title number (e.g., 17 for SEC, 42 for civil
            rights). Only meaningful for `USC`/`CFR`; ignored for state corpora
            whose titles are alphabetic (e.g. Texas `pe` = Penal Code).
          examples:
            - 17
        limit:
          type: integer
          maximum: 50
          minimum: 1
          title: Limit
          description: Number of results to return per page.
          default: 10
        offset:
          type: integer
          maximum: 40
          minimum: 0
          title: Offset
          description: >-
            Number of results to skip for pagination. Combined with `limit`, the
            deepest reachable result is `offset + limit`. Deep paging is bounded
            by the reranking window, so `offset` is capped at 40. Use `hasMore`
            in the response to decide whether to request the next page.
          default: 0
      type: object
      required:
        - query
      title: StatuteSearchRequest
    StatuteSearchResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/StatuteResult'
          type: array
          title: Results
        total:
          type: integer
          title: Total
          description: >-
            Number of results returned in this response (the size of `results`).
            This is the current page count, not the corpus-wide match total. Use
            `hasMore` to detect further pages.
          default: 0
        offset:
          type: integer
          title: Offset
          description: The offset applied to this page.
          default: 0
        hasMore:
          type: boolean
          title: Hasmore
          description: Whether more results exist beyond this page.
          default: false
        query:
          type: string
          title: Query
          description: The search query used.
          default: ''
        processingTimeMs:
          type: number
          title: Processingtimems
          default: 0
        creditsConsumed:
          type: number
          title: Creditsconsumed
          default: 0
      type: object
      title: StatuteSearchResponse
    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.
    StatuteResult:
      properties:
        actId:
          type: string
          title: Actid
          description: >-
            Unique section identifier (e.g., 'USC_T42_C21_S1983',
            'CFR_T17_P240_S240_10b5_1').
        citation:
          anyOf:
            - type: string
            - type: 'null'
          title: Citation
          description: >-
            Full citation (e.g., '42 U.S.C. § 1983 (2024)', '17 C.F.R. §
            240.10b5-1 (2026)').
        citationShort:
          anyOf:
            - type: string
            - type: 'null'
          title: Citationshort
          description: Short citation (e.g., '42 U.S.C. § 1983', '17 C.F.R. § 240.10b5-1').
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Section title.
        corpusType:
          anyOf:
            - type: string
            - type: 'null'
          title: Corpustype
          description: >-
            One of `USC`, `CFR`, `STATE`, `CONSTITUTION`, `FEDERAL_RULES`,
            `STATE_CONSTITUTION`, `STATE_RULES`, or `EXECUTIVE_ACTION`.
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: >-
            2-letter lowercase state code (e.g. `ca`, `tx`) when the row belongs
            to a state corpus. `federal` for federal rows.
        year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Year
          description: Year of the statute version.
        relevanceScore:
          type: number
          title: Relevancescore
          description: >-
            Relevance score, normalized to roughly 0-1. Higher means a better
            match for ranking within one response. It is a relative ranking
            signal, not a calibrated confidence or probability, so do not
            compare scores across different queries or treat a fixed value as a
            quality threshold.
          default: 0
        excerpt:
          type: string
          title: Excerpt
          description: Text excerpt (up to 500 characters).
          default: ''
        titleNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Titlenumber
          description: USC/CFR/state title number (e.g. '26', '13A').
        titleName:
          anyOf:
            - type: string
            - type: 'null'
          title: Titlename
          description: Title name (e.g., 'The Public Health and Welfare').
        chapter:
          anyOf:
            - type: string
            - type: 'null'
          title: Chapter
          description: Chapter number or identifier.
        chapterName:
          anyOf:
            - type: string
            - type: 'null'
          title: Chaptername
          description: Chapter name.
        sectionNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Sectionnumber
          description: Section number (e.g., '1983', '240.10b5-1').
        displayPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Displaypath
          description: Full hierarchical path (Title > Chapter > Section).
        breadcrumb:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Breadcrumb
          description: Structured breadcrumb trail for navigation.
        htmlUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Htmlurl
          description: HTML version of the statute section.
        pdfUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Pdfurl
          description: PDF version of the statute section.
        xmlUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Xmlurl
          description: XML version of the statute section.
        textUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Texturl
          description: >-
            Plain-text version. Populated for state corpora (MS, NJ, NY, NV,
            etc.).
        docxUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Docxurl
          description: Microsoft Word (DOCX) version, when available.
        stateHtmlUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Statehtmlurl
          description: >-
            Official HTML hosted by the state legislature (publisher's URL).
            Populated for state corpora only.
        govInfoHtmlUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Govinfohtmlurl
          description: Official govinfo.gov HTML version.
        govInfoPdfUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Govinfopdfurl
          description: Official govinfo.gov PDF version.
        externalUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalurl
          description: URL on the official source website (eCFR or uscode.house.gov).
      type: object
      required:
        - actId
      title: StatuteResult
      description: A single statute section from search results.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: vq_key_*
      description: >-
        API key issued from the Vaquill developer dashboard. Pass as
        `Authorization: Bearer vq_key_...`

````