# ToolMint Federal Register JSON

> Search and fetch US Federal Register documents (public API). Includes open-comment fields.

- Status: Live
- Price: $0.005 / call (x402 exact, USDC on Base eip155:8453, payTo 0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5)
- Base URL: https://toolmint-federal-register-json.toolmint.workers.dev
- OpenAPI: https://toolmint.toolmint.workers.dev/tools/federal-register-json/openapi.json

## Routes

- `GET /search` $0.005
- `GET /comments` $0.005
- `GET /doc` $0.005
- `GET /doc/{number}` $0.005
- `GET /agency` $0.005

## What question it answers

- "What has the Federal Register published about this topic, newest first?" (`/search`)
- "Which documents on this topic are still open for public comment?" (`/comments`)
- "What are the details and links for document 2026-22174?" (`/doc`)
- "What did this agency publish recently?" (`/agency`)

## When to use it

- You need current federal rulemaking items in a flat shape with agency names, dates, links and comment close dates.

## When not to use it

- Legal research or a legal opinion on relevance. Search is keyword matching by the upstream API.
- Full text. You get the abstract, links to the HTML/PDF, and for `/doc` the link to the full text. The tool does not return the body text itself.
- The Federal Register API is free. You pay for the cleaned shape and not building the client.

## Example

```bash
curl -i "https://toolmint-federal-register-json.toolmint.workers.dev/search?q=accreditation&per_page=1"
# 402 + PAYMENT-REQUIRED. Pay with an x402 client, repeat with PAYMENT-SIGNATURE.
```

Response after payment (trimmed; document values are from a real sample in the package folder, shape from the Worker code):

```json
{
  "tool": "federal-register-json",
  "version": "0.2.0",
  "query": "accreditation",
  "page": 1,
  "typeFilter": null,
  "count": 42,
  "documents": [
    {
      "documentNumber": "2026-22174",
      "title": "Accreditation, Innovation, and Modernization: ...",
      "type": "Rule",
      "abstract": "The Department revises the existing accrediting agency recognition regulations ...",
      "publicationDate": "2026-10-30",
      "agencies": ["Education Department"],
      "htmlUrl": "https://www.federalregister.gov/documents/2026/10/30/2026-22174/...",
      "pdfUrl": "https://www.govinfo.gov/content/pkg/FR-2026-10-30/pdf/2026-22174.pdf",
      "commentsCloseOn": null,
      "commentUrl": null,
      "dates": null
    }
  ],
  "openCommentCount": 0,
  "source": "federalregister.gov public API",
  "cached": false
}
```

(`count` here is illustrative.) `/doc` returns `{ tool, version, document, source, cached }` where `document` has the same fields plus `topics[]`, `bodyHtmlUrl` and `rawTextUrl`. `/comments` returns `mode: "open_comments"`; `/agency` returns `agency` instead of `query`.

## Data source and licence

Source: the Federal Register public API at federalregister.gov. Federal Register content is a US government work and is generally public domain. Check the source's terms if you redistribute. Not endorsed by the Office of the Federal Register or NARA.

## Freshness and limits

- Cached in memory on one server instance: searches and agency lists 6 hours, open-comment searches 3 hours, single documents 24 hours. `cached` tells you if it was a cache hit. There is no `fetchedAt` field.
- At most 20 documents per call. Paging works on `/search` only.
- `/comments` is newest first, not sorted by close date.
- `type` and `agency` values are not checked by this tool; what a wrong value returns is up to the upstream API.
- If it runs out, paid calls fail and are not charged.
