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

> ## Agent Instructions
> The Exa API is served at https://api.exa.ai. Authenticate with `Authorization: Bearer $EXA_API_KEY` (or `x-api-key: $EXA_API_KEY`); create keys at https://dashboard.exa.ai/api-keys.
> Prefer the official SDKs, `exa-py` (`pip install exa-py`) and `exa-js` (`npm install exa-js`); both read `EXA_API_KEY` from the environment.
> Tool-using agents can call Exa without writing code through the hosted MCP server at https://mcp.exa.ai/mcp, or install the Exa agent skill with `npx skills add exa-labs/agent-skills` (skill file: https://exa.ai/docs/skill.md).
> The OpenAPI specs at https://exa.ai/docs/exa-spec.yaml and https://exa.ai/docs/team-management-spec.yaml are the source of truth for request and response schemas.

# Legal & Public Records

> Find court opinions, patents, sanctions, government contracts, and other public records with Exa Search.

Use Exa Search for primary legal sources and government records alongside the commentary written about them.

## Included

* US court opinions, with full text, court, docket, and citation metadata
* Granted US patents, with abstract, claims, description, inventors, and assignees
* Statutes, regulations, and agency guidance
* Sanctions lists and watchlists
* Government contracts and procurement records
* Census data and other public statistical records

## Use it for

* Case-law research and legal RAG
* Regulatory and policy monitoring
* Prior-art and freedom-to-operate searches
* Compliance screening and due diligence
* Public-sector market research

## Example queries

### Find case law

Describe the legal question and jurisdiction in plain language rather than a citation.

```text theme={null}
California appellate decisions on non-compete enforceability
```

### Search patents

Describe what the invention does, the way a claim would.

```text theme={null}
patents on cooling battery packs with immersion dielectric fluid
```

### Screen against sanctions

Name the list and the entity class you are screening.

```text theme={null}
OFAC sanctions listings added for shipping companies
```

### Research government spending

Name the buying agency or service category and the time window.

```text theme={null}
federal contracts awarded for cloud migration services
```

### Pull public statistics

Name the dataset and geography.

```text theme={null}
census tract population change in the Austin metro area
```

## Make a request

<CodeGroup>
  ```python Python theme={null}
  from exa_py import Exa

  exa = Exa()

  results = exa.search(
      "California appellate decisions on non-compete enforceability",
      type="auto",
      num_results=10,
  )
  ```

  ```javascript JavaScript theme={null}
  import Exa from "exa-js";

  const exa = new Exa();

  const results = await exa.search(
    "California appellate decisions on non-compete enforceability",
    {
      type: "auto",
      numResults: 10,
    }
  );
  ```

  ```bash cURL theme={null}
  curl -s -X POST https://api.exa.ai/search \
    -H "Authorization: Bearer $EXA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "query": "California appellate decisions on non-compete enforceability",
      "type": "auto",
      "numResults": 10
    }'
  ```
</CodeGroup>

## Get structured data with Exa Agent

For structured data that requires research across multiple sources, use an [Exa Agent task run](/docs/agent/quickstart). Describe the jurisdictions, record types, criteria, and output fields you need, and Agent returns schema-validated results with citations.

<Card title="Start an Agent task" icon="bot" href="/docs/agent/quickstart" cta="Open Agent guide" arrow="true">
  Screen an entity across record types or trace a regulatory change through primary sources and coverage.
</Card>
