Guides · Tools
Builders, notebooks, and AI agents are welcome to reuse the published archives. The Ledger publishes static product JSON for downloads; live election tallies belong at the upstream publisher, not as a redistribution API here. Start with machine catalogs, not HTML scraping, and keep request rates modest.
Product files are free to reuse with attribution to The Ledger and the original publisher. The site software itself is not offered as a public contribution project; use contact for human questions.
Step 1
Read llms.txt
Short machine guide to shelves, preferred files, and citation expectations.
Step 2
Fetch the manifest
downloads/manifest.json lists every cached file with href, size, date, and publisher origins.
Step 3
Prefer product JSON
Use cleaned product files the site renders. Fall back to origin URLs when you need the upstream release.
llms.txt
Agent-oriented site guide with product JSON highlights.
Downloads manifest
Catalog of product JSON, source packs, PDFs, and portraits.
Data cache UI
Human search over the same catalog, with origin links.
Data dictionary
Human field guide to the main product archives.
Sitemap
Discoverable HTML routes for crawlers and indexes.
Robots
Crawl policy for the public site.
| Path | Purpose | Notes |
|---|---|---|
| /llms.txt | Machine site guide (text). | Static. Prefer this before scraping HTML. |
| /downloads/manifest.json | Catalog of every cached download. | Includes href, bytes, updatedAt, and publisher origins. |
| /api/downloads/race | Serves data/race.json as a download. | Large product archive; avoid duplicating under /public. |
| /api/search | Sitewide search (query in, ranked hits out). | GET ?q=&limit=&bucket=. Index stays server-side; use for interactive clients. |
| /api/search-index | Raw entity index JSON for tools and AI. | Full MiniSearch documents; large payload. Prefer /api/search for UI. |
| /api/v1 | Read API discovery index (JSON). | Lists versioned query endpoints. Start here; see Read API below. |
A thin, versioned, read-only JSON layer over the same source-cited datasets the site renders. Start at /api/v1 for a discovery index. Responses share one envelope: apiVersion, endpoint, sources (publisher name + URL), attribution, count, and data. CORS is open so browser clients can call it directly.
| Path | Purpose | Notes |
|---|---|---|
| /api/v1/congress/historical | Fiscal-year totals (revenues, outlays, deficit, debt). | Optional ?from= &to= fiscal-year filter. Source: CBO. |
| /api/v1/floor/bills | Featured watchlist bills with stage and latest action. | Optional ?congress= &limit=. Source: Congress.gov. |
| /api/v1/gavel/cases | Watched Supreme Court merits cases. | Optional ?term= &status= &limit=. Source: SCOTUS. |
| /api/v1/race/candidates | Federal candidates with FEC receipts and results. | ?cycle= (defaults latest) &office=P|S|H &state= &limit=. Source: FEC. |
Endpoints require a Professional-plan API key from your workspace Account tab: send Authorization: Bearer ldg_…. Soft anonymous discovery on /api/v1 stays open; dataset routes return 401 without a key. Responses include X-RateLimit-* headers. This layer is for structured queries over the archives, not live results. For bulk data, prefer the downloads manifest.
The Race live map may show unofficial tallies from civicAPI for browsing on this site. That overlay is not a public redistribution API. If you need live results in your own tools, call civicAPI (or state election authorities) directly, attribute them correctly, and label outputs as unofficial.
Historical election finance and popular-vote shelves live in product JSON under the Race section of the data cache.
/fiscal → /books, /issues → /floor.