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

# Search the Firecrawl Government Index

Search primary law and regulatory material from US federal, state, and local government sources: statutes, regulations, codes, court opinions, and other government publications. Results come back in the standard `web` group, the same shape as a web result from [`/search`](/api-reference/endpoint/search).

`POST` is available on the same path with the same fields as a JSON body. Unknown fields are rejected with `400`.

<CodeGroup>
  ```bash cURL theme={null}
  # No API key needed to get started; add -H "Authorization: Bearer $FIRECRAWL_API_KEY" for higher rate limits:
  curl -s "https://api.firecrawl.dev/v2/search/gov?query=food%20labeling%20requirements%20for%20allergens&k=10"
  ```

  ```bash cURL (POST) theme={null}
  curl -X POST https://api.firecrawl.dev/v2/search/gov \
    -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "query": "food labeling requirements for allergens",
      "k": 10
    }'
  ```
</CodeGroup>

For a workflow overview, see the [Government Index guide](/features/gov).


## OpenAPI

````yaml api-reference/v2-openapi.json GET /search/gov
openapi: 3.0.0
info:
  title: Firecrawl API
  version: v2
  description: >-
    API for interacting with Firecrawl services to perform web scraping and
    crawling tasks.
  contact:
    name: Firecrawl Support
    url: https://firecrawl.dev/support
    email: support@firecrawl.dev
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /search/gov:
    get:
      tags:
        - Government
      summary: Search the Government Index
      operationId: govSearch
      parameters:
        - name: query
          in: query
          required: true
          description: Natural-language question or search phrase.
          schema:
            type: string
            minLength: 1
        - name: k
          in: query
          required: false
          description: Number of results to return.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: Ranked Government Index results in the `web` group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GovSearchResponse'
              example:
                success: true
                data:
                  web:
                    - url: >-
                        https://www.ecfr.gov/current/title-21/chapter-I/subchapter-B/part-101
                      title: 21 CFR Part 101 -- Food Labeling
                      description: >-
                        Nutrition labeling of food shall be provided for all
                        products intended for human consumption...
                      position: 1
        '400':
          description: Invalid request, including an unknown field
        '401':
          description: Invalid bearer token
        '429':
          description: Rate limit exceeded
        '502':
          description: Upstream error
        '504':
          description: Upstream timeout
      security:
        - bearerAuth: []
components:
  schemas:
    GovSearchResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            web:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                  title:
                    type: string
                  description:
                    type: string
                    description: Matched snippet from the source document.
                  position:
                    type: integer
                    description: 1-based rank in the result list.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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