# Law

Statutes, regulations and court opinions (United States).

```text
"sources": ["law"]
```

The `law` source is United States law: statutes, regulations and court opinions. A result is one section or one opinion.

## Good for

- Finding the section that governs something: on statutes and regulations `extra.citation` is the citation to quote.
- Finding opinions that discuss a doctrine or a statute.
- Grounding an agent's legal summary in the text itself, not in commentary.

## Not the place for

- Law outside the United States.
- Commentary, explainers and law-firm articles. Those are on `web`.
- Legal advice. The source returns texts; it does not interpret them.

## What a result carries

Every result has the same fields whatever the source; the [Search reference](https://millionshort.com/docs/search/parameters#a-result) lists them. What differs is which of them are filled in:

| Field | In this source |
|---|---|
| `published_date` | Set on opinions; `null` on statutes and usually on regulations. |
| `page_type`, `topic` | `null`. |
| `popularity` | The popularity of the official site that publishes the text. |
| `signals` (with `explain`) | `null` values. |
| `extra` | `record_type` (`statute`, `regulation` or `opinion`), `citation` on statutes and regulations, and `citations`, how often other records cite this one. |

The `extra` keys are what this source returns today. Treat every one of them as optional: read it if it is there.

## Example queries

- `copyright fair use`
- `data breach notification`
- `clean water act`

Ten records with their type and citation:

```bash
curl https://api.millionshort.com/v1/search \
  -H "Authorization: Bearer $MILLIONSHORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "copyright fair use",
    "sources": ["law"],
    "num_results": 10
  }'
```

```python
import os

from millionshort import MillionShort

client = MillionShort(api_key=os.environ["MILLIONSHORT_API_KEY"])

r = client.search(
    "copyright fair use",
    sources=["law"],
    num_results=10,
)
for hit in r.results:
    print(hit["extra"].get("record_type"), hit["extra"].get("citation"), hit["title"])
print(r.usage.credits, "credit(s)")
```

```ts
import { MillionShort } from 'millionshort';

const client = new MillionShort({ apiKey: process.env.MILLIONSHORT_API_KEY });

const r = await client.search('copyright fair use', {
  sources: ['law'],
  numResults: 10,
});
for (const hit of r.results) {
  console.log(hit.extra.record_type, hit.extra.citation, hit.title);
}
console.log(r.usage?.credits, 'credit(s)');
```

The same call as a tool of the MCP server:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {
      "query": "copyright fair use",
      "sources": [
        "law"
      ],
      "num_results": 10
    }
  }
}
```

## Combine it with

`web` for explanations, `news` for a current case, `contracts` and `finance` for the documents a rule applies to. One call can ask up to five sources and returns one merged list; each result says which source it came from in `source`. See [Mixture of Experts](https://millionshort.com/docs/search/mixture-of-experts).

## Cost and limits

A search of this source costs 1 credit, like every source, and covers the first 10 results of the call. It is not one of the heavy sources, so only the plan's ordinary requests-per-minute limit applies. [Credits and limits](https://millionshort.com/docs/credits-and-limits) has the numbers.

With [Monitor](https://millionshort.com/docs/monitor/parameters), a query monitor can watch this source, with a shortest interval of 24 hours.
