The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Civiq listing page.
Civic intelligence from government sources, organized for public use.
civdotiq.org • API Reference • Contribute • License
A civic intelligence platform. Enter an address to find your federal and state representatives, with voting records, federal campaign finance, committee assignments, legislative activity, and machine-learning-powered analysis of money-in-politics patterns. Local-government coverage is limited to a pilot list of 10 cities.
All data comes from government APIs. All analysis is statistical, with confidence scores and methodology disclosed. If data is unavailable, the interface and the response payload say so explicitly. Nothing is fabricated.
Honest coverage matrix: docs/COVERAGE.md. It is the canonical answer to "what does CIV.IQ actually cover?" — every other claim in this README defers to that page.
Representatives: Federal and state legislators with photos, contact info, committee assignments, and voting records.
Campaign Finance: Federal only — FEC contributions, PAC spending, expenditure tracking, and donor sector analysis. State campaign finance is not currently available (FollowTheMoney.org is in maintenance mode during the OpenSecrets merger).
Intelligence Layer: Statistical analyzers that cross-reference voting records with campaign finance, lobbying filings, stock trades, and committee jurisdictions to surface patterns of potential influence. Every insight carries a confidence score, methodology note, and correlation-not-causation disclaimer.
Vote Prediction: An XGBoost model (trained on historical roll call data, exported to ONNX) predicts how representatives are likely to vote on upcoming legislation, with an independence score measuring deviation from party line.
Money Report: Address-based lookup that traces the path from campaign contributions through committee assignments to legislative outcomes for your specific representatives.
Sector Leaderboard: Rankings of legislators by industry sector, showing which members receive the most from a given industry relative to their peers.
Regulations & Comment Periods: Federal Register integration for proposed rules, final rules, executive orders, and open public comment periods.
State Legislatures: All 50 states via OpenStates — legislators, bills, committees, votes, and calendars. Interactive district boundary maps for all 7,383 state legislative districts. State-level campaign finance, lobbying, and stock-trade data are not part of state coverage.
Local Government: City council data for 10 pilot cities via Legistar (Austin, Boston, Chicago, Denver, Detroit, Minneapolis, Oakland, Philadelphia, Portland, Seattle). Outside this list, local-government routes return dataQuality: 'unavailable' rather than empty arrays. There is no national local-government API; coverage expands one city at a time.
District Intelligence: Demographics, economic indicators (BLS employment data), federal spending (USASpending), infrastructure metrics, and bills ranked by relevance to each congressional district.
Nostr Publishing: Civic events (new bills, votes, hearings) are signed and published to the Nostr network for decentralized, verifiable distribution.
| Integration | What it provides |
|---|---|
| OpenAPI spec | 39 paths, 29 schemas — generate clients in any language |
| @civiq/sdk | Zero-dependency TypeScript client (npm install @civiq/sdk) |
| MCP server | 47 tools for AI assistants (Claude, Cursor, etc.) |
| Atom feeds | RSS-compatible feeds for bills, members, districts, committees |
| Embeddable widgets | Drop-in HTML for legislator cards, district lookup, bill status |
| llms.txt | AI-discoverable documentation |
| Source | What it provides |
|---|---|
| Congress.gov v3 | Bills, votes, members, committees, hearings |
| FEC.gov | Campaign contributions, expenditures, PAC filings |
| U.S. Census Bureau | Demographics, geocoding, economic data |
| Senate.gov XML | Senate floor votes, roll calls |
| House Clerk XML | House voting records |
| OpenStates GraphQL | State legislators, bills, committees, votes (all 50 states) |
| GovInfo | Hearing transcripts, legislative documents |
| Federal Register | Executive orders, proposed rules, comment periods |
| USASpending.gov v2 | Federal contracts, grants, awards by district |
| Senate LDA | Lobbying disclosure filings |
| Bureau of Labor Statistics | Employment, wages, labor force data |
| SEC EDGAR | Financial disclosures, stock trades (STOCK Act) |
| Wikidata SPARQL | State executives, judiciary, biographies |
| FRED | Federal Reserve economic indicators |
| Regulations.gov | Public comments on proposed rules |
| Census TIGER/Line | Congressional and state district boundaries |
The table lists the primary sources. Additional federal agency datasets — CDC PLACES, CMS, Medicaid, FEMA, FBI UCR, FDIC, VA, Treasury, CFPB, NHTSA, College Scorecard, and more — power district and intelligence features, for 26 live government data sources in total. The canonical, continuously verified list is docs/COVERAGE.md.
No data is fabricated, scraped, or generated.
Add API keys to .env.local. All are free:
See .env.example for the full list, including Nostr publishing and ActivityPub federation.
Verify at localhost:3000/api/health.
Next.js 16, React 18, TypeScript (strict), Tailwind CSS, SWR, Zustand, MapLibre GL, D3.js, Recharts, Redis (Upstash + ioredis), Zod, simple-statistics, HuggingFace Transformers (small models), Google Gemini AI, nostr-tools.
12 statistical analyzers cross-reference government data domains:
| Analyzer | What it detects |
|---|---|
| Finance-Jurisdiction Overlap | Donor sectors that match a member's committee jurisdiction |
| Vote-Finance Correlation | Voting alignment with campaign contributor industries |
| Temporal Vote Shifts | Quarterly changes in party-line voting patterns |
| Lobbying Pipeline | Lobbying spend → committee activity → bill output chains |
| PAC-to-Vote Tracing | PAC contributions traced to recipient voting records |
| Stock-Committee Overlap | STOCK Act trades in sectors a member's committee regulates |
| Influence Chain | Full money → committee → legislation → vote pathways |
| Sector Leaderboard | Industry-by-industry legislator rankings |
| Vote Prediction | ML model (XGBoost/ONNX) for roll call vote forecasting |
| Bill Intelligence | Sponsor funding sources cross-referenced with lobbying |
| Bill-Lobbying Similarity | Semantic similarity between bill text and lobbied issues |
| Federal Register Analysis | Regulatory intelligence from proposed and final rules |
Every insight carries: confidence score (0–1), data-as-of timestamp, methodology description, and a disclaimer that correlation does not imply causation.
npm run collect:training-data, model trained in Python (scripts/train-vote-model.py), exported to ONNX, inference in TypeScript (src/lib/intelligence/ml/vote-predictor.ts)scripts/compute-influence-clusters.py) served as JSONThree packages are extracted as standalone npm workspace packages:
Additional scripts for performance benchmarking, data/ML processing, and security scanning are defined in package.json.
See CONTRIBUTING.md.
Apache License 2.0. Copyright 2019-2026 Mark Sandford.
Use it, modify it, distribute it. Include the copyright, license, and NOTICE file per Apache 2.0 Section 4. Provide visible attribution: "Powered by CIV.IQ." The CIV.IQ name and logo are trademarks and require written permission to use. See LICENSE and NOTICE.
Mark Sandford - contact@civdotiq.org