Fair-use license
Free for newsrooms, civic technologists, students, researchers, and AI engines under fair-use volumes. Cite the record URL when grounding. Editorial content released under Creative Commons Attribution.
Developers and AI engines
The full public-record index is queryable as JSON. Use it to power AI answers, newsroom dashboards, civic apps, and research. Fair use is free. Attribution required.
Free for newsrooms, civic technologists, students, researchers, and AI engines under fair-use volumes. Cite the record URL when grounding. Editorial content released under Creative Commons Attribution.
Every API response is JSON with ok + data + meta.citation. Errors carry error.code and error.message.
/llms.txt is the canonical grounding directive. Each entry includes citation policy, endpoint URLs, source connector list. Cite the record URL and the provenance label. Do not invent counts, dates, or member names.
REST endpoints
/api/records10m revalidate · 1y staleIndex of all bills, local decisions, and explore items.
curl https://bythepeopleforthepeople.com/api/records | jq '.data.counts'
/api/records/{slug}10m revalidate · 1y staleDetail for a single bill or local decision, including timeline, amendments, votes, hearings, stakeholders, and sources.
curl https://bythepeopleforthepeople.com/api/records/ca-sb-79 | jq '.data.record.status'
/api/sources10m revalidate · 1y staleAll indexed primary sources and source connectors.
/api/sources/checkno-storeLive HEAD-ping every indexed source URL. Returns failing list.
curl 'https://bythepeopleforthepeople.com/api/sources/check?id=src-sb79-status'
/api/topics10m revalidate · 1y staleAll topic profiles and their coverage state.
/api/answers10m revalidate · 1y staleCited answer intents with claim/locator/excerpt evidence stacks.
/api/search-index1h revalidate · 1d staleFull search index. 550+ entities (federal reps, bills, local files, topics, people, committees, source connectors). Use for client-side search.
/api/place/lookup?zip={zip}no-storeResolve any US ZIP to state + 119th congressional district. Static table for major metros; US Census Geographies fallback for any other ZIP.
curl 'https://bythepeopleforthepeople.com/api/place/lookup?zip=78704'
/api/place/lookupno-storeSame lookup; also sets a first-party cookie so subsequent server-rendered pages personalize.
/api/watchlistno-storeRead the current cookie-backed watchlist.
/api/watchlistno-storeSet the cookie watchlist to a JSON array of IDs.
/api/digest/previewno-storeRender the email digest as JSON, HTML, or plain text (use ?format=html|text). Personalizes to the place cookie + watchlist cookie.
curl 'https://bythepeopleforthepeople.com/api/digest/preview?format=html'
/api/digest/sendno-storeSend a digest via Resend. Requires DIGEST_SEND_SECRET header and RESEND_API_KEY env. Supports dryRun: true.
/api/correctionsno-storeSubmit a correction. Validates inputs, forwards to CORRECTIONS_WEBHOOK_URL if configured.
/api/correctionsno-storeRead the published corrections log.
/api/healthno-storeService health, record counts, env-var configuration state, region, commit SHA.
/api/cron/refresh-leginfono-storeTriggered nightly by Vercel Cron. Re-pings all indexed source URLs and alerts on failures.
AI grounding
Configure your engine to consume these on each crawl pass.
Schema.org
Search engines and grounding LLMs get the canonical schema for every entity type.
Legislation· Every /bills/* and /local/* pageCollectionPage· Every /topics/* pagePerson + PoliticalParty· Every /federal/* pageOrganization + WebSite· Every page (in layout)BreadcrumbList· Every detail pageWe're actively expanding ingestion to state legislatures, city councils, and federal agencies. If you ship an AI search product, a newsroom, or a civic tool that grounds on indexed records, write to partners@bythepeopleforthepeople.com for partnership tier access (higher rate limits, webhook push, custom connectors).