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

# Firecrawl Government Index

> Search statutes, regulations, codes, court opinions, and other government publications

Firecrawl Government Index is an index of primary law and regulatory material from US federal, state, and local government sources: statutes, regulations, codes, court opinions, and other government publications. It lets an agent answer a legal or compliance question from the government source itself rather than from a general web page.

* Find the regulation that sets a labeling, reporting, or licensing requirement
* Read the statute or code section behind a compliance question
* Locate a court opinion that interprets a rule
* Pull the government publication an agency issued on a topic

## Endpoints

| Task | Endpoint |
| - | - |
| Search the Government Index | [`GET` or `POST /search/gov`](/api-reference/endpoint/gov-search) |

## Search the Government Index

Send a natural-language question and get back ranked results from legal and regulatory sources. Results come back in the standard `web` group, each with `url`, `title`, `description`, and `position`, the same shape as a web result from [`/search`](/features/search).

Government Index searches are free and use no credits, with or without zero data retention. No API key is needed to get started; add one for higher rate limits.

<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 CLI theme={null}
  firecrawl gov "food labeling requirements for allergens" --limit 10
  ```

  ```python Python theme={null}
  from firecrawl import Firecrawl

  firecrawl = Firecrawl(
    # No API key needed to get started; add one for higher rate limits:
    # api_key="fc-YOUR-API-KEY",
  )

  result = firecrawl.gov_search("food labeling requirements for allergens", k=10)
  print(result)
  ```

  ```js Node theme={null}
  import { Firecrawl } from "firecrawl";

  const firecrawl = new Firecrawl({
    // No API key needed to get started; add one for higher rate limits:
    // apiKey: "fc-YOUR-API-KEY",
  });

  const result = await firecrawl.govSearch(
    "food labeling requirements for allergens",
    {
      k: 10,
    },
  );
  console.log(result);
  ```
</CodeGroup>

`POST` is available on the same path with the same fields as a JSON body:

```bash cURL theme={null}
# No API key needed to get started; add -H "Authorization: Bearer $FIRECRAWL_API_KEY" for higher rate limits:
curl -X POST https://api.firecrawl.dev/v2/search/gov \
  -H "Content-Type: application/json" \
  -d '{
    "query": "food labeling requirements for allergens",
    "k": 10
  }'
```

`query` is required. `k` sets how many results come back, from 1 to 100, defaulting to 10. Unknown fields are rejected with `400`. See the [Government Index search reference](/api-reference/endpoint/gov-search) for the full request and response schema.

The same search is also available on [`/search`](/features/search#gov-category-search) as `categories: ["gov"]`, with results in `data.web`.

<Note>
  The hosted [MCP server](/mcp-server) exposes this index as
  `firecrawl_gov_search`, and the [CLI](/sdks/cli#government) as `firecrawl
      gov`. Neither writes anything.
</Note>


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