API and MCP
The tables behind InsideGov’s charts, free to query. Pull them as JSON or CSV, or connect an AI assistant straight to them over MCP. 42 datasets across the presidency, Congress and the Supreme Court. No account and no key.
Use it freely. Credit InsideGov.
You may use this data in apps, articles, research, classrooms and AI products, as long as you credit InsideGov. Name it “InsideGov” and, where you can, link that name to the homepage. For example: Data: InsideGov
Data: <a href="https://insidegov.fyi">InsideGov</a>Data: InsideGov- Every response carries the credit line in an
attributionfield (CSV: anX-Attributionheader). Keep it with the numbers when you pass them on. - The numbers come from public sources, named in each response’s
sourcesand in the catalog below. Name them too when you can; the methodology page has the citations. - A few datasets carry the source’s own terms in a
licensefield. The Supreme Court decisions tables are non-commercial (CC BY-NC 3.0 US), and the troops history and bases tables are built on GPL-3.0 data. Those terms apply to what you build from them. - These are descriptions of what the records show, not findings of cause, and InsideGov gives no warranty. Check the units and the caveats in
describebefore you rely on a number. Spotted an error? Report a correction.
Quick start
The base URL is https://insidegov.fyi/api/v1. Everything is a GET and needs no key. Start with the list, then ask about one dataset to see its fields.
curl https://insidegov.fyi/api/v1/datasetscurl https://insidegov.fyi/api/v1/datasets/foreign-assistancecurl "https://insidegov.fyi/api/v1/datasets/foreign-assistance/rows\
?country_key=UKR&fiscal_year=2022..\
&sort=-disbursements_usd&limit=5"curl "https://insidegov.fyi/api/v1/datasets/executive-orders/rows\
?signing_date=2025-01-01..\
&fields=eo_number,signing_date,title,topic&format=csv"{
"dataset": "foreign-assistance",
"attribution": "Data from InsideGov (https://insidegov.fyi). Please credit InsideGov when you use it.",
"sources": ["ForeignAssistance.gov, U.S. Department of State"],
"license": null,
"total": 44, // rows that match, before paging
"limit": 5,
"offset": 0,
"returned": 5,
"next": "https://insidegov.fyi/api/v1/datasets/foreign-assistance/rows?...&offset=5",
"data": [ { "recipient_name": "Ukraine", "fiscal_year": 2023, "sector_category": "Economic Development", ... } ]
}Query reference
Any field in a dataset can be a filter, and filters combine: every one must be true. Open a dataset to see its field names; a misspelled field returns an error that lists the valid ones. Put the options after a ? in the URL and join them with &.
- country_key=MEX
- Only rows where that field equals the value. Add more with &, e.g. country_key=MEX&fiscal_year=2023.
- fiscal_year=2010..2020
- A range, both ends included. Works on numbers and on dates.
- fiscal_year=2010..
- Leave one end off: 2010 or later. (..2020 means 2020 or earlier.)
- sort=-fiscal_year
- Order the rows by a field. A leading - puts the biggest or newest first.
- fields=recipient_name,fiscal_year
- Return only these columns.
- limit=100&offset=100
- How many rows to return (up to 5,000) and how many to skip, to get the next page.
- format=csv
- A spreadsheet-ready CSV instead of JSON.
Answers are cached for an hour and a response is capped near 4 MB, so page large pulls with limit and offset. The data changes only when the site’s sources refresh. There is no rate limit today; please cache what you fetch and keep requests reasonable. An OpenAPI description is at /api/v1/openapi.json. The v1 shapes only gain fields; they are not renamed or removed.
MCP server
Connect an AI assistant to the same tables and it can look up, filter and compare them while it answers. The server is at https://insidegov.fyi/mcp (Streamable HTTP, no sign-in).
claude mcp add --transport http insidegov https://insidegov.fyi/mcpSettings → Connectors → Add custom connector
Name: InsideGov
URL: https://insidegov.fyi/mcp{
"mcpServers": {
"insidegov": { "url": "https://insidegov.fyi/mcp" }
}
}npx mcp-remote https://insidegov.fyi/mcp- list_datasets
- Lists the datasets, optionally for one branch or matching a word.
- describe_dataset
- What a row is, units, source, every field with its type and meaning, row count, sample rows.
- query_dataset
- Filter, sort and page one dataset. Same filters as the API.
Then ask in plain language. For example:
- How many executive orders did each president sign in their first year?
- Which countries received the most U.S. foreign assistance in 2023, and how much of it was military?
- How has the share of Supreme Court cases decided 5–4 changed since 1990? (Non-commercial use.)
- What was the effective U.S. duty rate in each year since 2017?
Each tool result carries the credit line, and the server tells the assistant to cite InsideGov and the underlying source. Results are kept short for a model to read: up to 200 rows a call, with next_offset to continue.
The 42 datasets
Each is a table from the site’s pipeline, with its own units and keys, before any page-specific joining. Join them on shared keys: bioguide_id for people in Congress, justice_id for justices, term_id for presidential terms, country_code or country_key for places. Open a dataset to see every field.
Presidency
- executive-ordersExecutive orders
Every executive order since 1994 with its signing date, issuing agencies, orders it amends or revokes, topic, and (from 2009) a short summary of what it does.
One row: one executive order. Source: Office of the Federal Register, FederalRegister.gov. Feeds Executive orders.
- administrationsPresidential terms
The presidential terms the Presidency pages are banded by, with party and start and end dates.
One row: one uninterrupted presidential tenure. Source: Office of the Federal Register, FederalRegister.gov. Feeds Executive orders.
- economic-indicator-seriesEconomic indicators: series
The catalog of economic series on the Economy page (jobs, inflation, gas prices and more): title, units, frequency, source agency and caveats.
One row: one series. Source: Federal Reserve Bank of St. Louis, FRED®, from each series' own agency. Feeds Economy · methodology.
- economic-indicator-observationsEconomic indicators: observations
The full history of every Economy-page series at its source frequency, in raw levels.
One row: one series on one date. The series' own units (see economic-indicator-series.units). Source: Federal Reserve Bank of St. Louis, FRED®, from each series' own agency. Feeds Economy · methodology.
- energy-seriesEnergy: series
The catalog of the 20 petroleum, Strategic Petroleum Reserve, natural gas and electricity series: title, units, frequency, group and caveats.
One row: one series. Source: U.S. Energy Information Administration. Feeds Energy · methodology.
- energy-observationsEnergy: observations
Monthly and annual history of every Energy-page series from 1973, in source units. Recent months are marked preliminary.
One row: one series on one date. The series' own units (see energy-series.units). Source: U.S. Energy Information Administration. Feeds Energy · methodology.
- energy-actionsEnergy: policy actions
The curated policy actions flagged on the Energy charts: Strategic Petroleum Reserve sales and refills, pipeline and LNG decisions, statutes and executive orders.
One row: one action. Source: Curated by InsideGov from primary government sources. Feeds Energy · methodology.
- trade-nationalTrade: national totals
U.S. goods exports, imports and the trade balance, monthly and annual, 1991 onward.
One row: one period (month or year). Millions of U.S. dollars. Source: U.S. Census Bureau, Foreign Trade Division. Feeds Trade · methodology.
- trade-partnersTrade: partners
The list of trading partners and aggregates (countries, former countries, regions such as the European Union) and their codes.
One row: one partner. Source: U.S. Census Bureau, Foreign Trade Division. Feeds Trade · methodology.
- trade-by-countryTrade: by partner and year
Goods exports and imports with each partner, with twelve monthly values and the year's total.
One row: one partner in one year. Millions of U.S. dollars. The monthly arrays run January to December; null means not yet published. Source: U.S. Census Bureau, Foreign Trade Division. Feeds Trade · methodology.
- duties-nationalDuties: national
Calculated import duties and import value by month, and the effective duty rate (duties as a share of imports).
One row: one month. Whole U.S. dollars; rate is a fraction (0.03 = 3%). Source: U.S. Census Bureau, Foreign Trade Division; U.S. International Trade Commission, DataWeb (1993–2009). Feeds Trade · methodology.
- duties-by-countryDuties: by partner and year
Calculated duties, import value and effective rate for each partner, with twelve monthly values.
One row: one partner in one year. Whole U.S. dollars; rate is a fraction. The monthly arrays run January to December. Source: U.S. Census Bureau, Foreign Trade Division; U.S. International Trade Commission, DataWeb (1993–2009). Feeds Trade · methodology.
- tariff-actionsTrade: tariff actions
The curated tariff actions flagged on the Trade charts: dates, authority, products and countries covered.
One row: one action. Source: Curated by InsideGov from primary government sources. Feeds Trade · methodology.
- foreign-assistanceForeign assistance
U.S. foreign assistance by recipient, fiscal year and sector: disbursements, obligations and the military share.
One row: one recipient, fiscal year and sector. Nominal (current-year) U.S. dollars. Source: ForeignAssistance.gov, U.S. Department of State. Feeds Foreign aid · methodology.
- troops-by-locationTroops abroad: by location (2008–)
Active-duty personnel by place of duty and branch, from DMDC quarterly reports.
One row: one location in one period. People. The series changes meaning in Dec 2017 (permanent assignment only); state tells you when a value is not reported. Source: U.S. Department of Defense, Defense Manpower Data Center. Feeds National security · methodology.
- troops-historyTroops abroad: history (1950–2007)
Active-duty personnel abroad by country and branch before 2008. Not like-for-like with the 2008-on location table.
One row: one country in one year. People. Source: troopdata (Allen, Flynn and Martinez Machain 2022; Kane 2005); U.S. Department of Defense, DMDC 309A tables. Feeds National security · methodology.
Terms: Built on the troopdata package (Allen, Flynn and Martinez Machain 2022; GPL-3.0). Cite it alongside InsideGov.
- military-basesKnown overseas installations
Known U.S. military installations abroad with coordinates. An undated snapshot with no headcounts; newer and unacknowledged sites are missing.
One row: one installation. Source: David Vine's lists of U.S. military bases abroad, via troopdata. Feeds National security · methodology.
Terms: Built on the troopdata package (Allen, Flynn and Martinez Machain 2022; GPL-3.0). Cite it alongside InsideGov.
- enforcement-seriesImmigration enforcement
ICE removals, arrests, detainers, book-ins and detention population by fiscal year, with the administration in office and notes on definition changes.
One row: one metric in one period (some split by agency or criminality). People (detention_adp is the average daily population). Source: U.S. Immigration and Customs Enforcement. Feeds Immigration · methodology.
- removals-by-countryRemovals by country
ICE removals by country of citizenship and fiscal year.
One row: one country in one fiscal year. People. Source: U.S. Immigration and Customs Enforcement. Feeds Immigration · methodology.
- encounters-seriesBorder encounters
CBP encounters by fiscal year from FY1980, nationwide and on the southwest border: Border Patrol apprehensions, port-of-entry inadmissibles (from FY2004) and Title 42 expulsions (FY2020 to FY2023). Events, not people. Never combine with ICE removals.
One row: one scope, component and authority in one fiscal year. Encounters (events; a person caught twice counts twice). Source: U.S. Customs and Border Protection; U.S. Department of Homeland Security, Office of Homeland Security Statistics (port-of-entry figures, FY2004 to FY2014). Feeds Immigration · methodology.
- encounters-monthlyBorder encounters: by month
CBP encounters by month from FY2020, nationwide and on the southwest border, by component and title of authority.
One row: one scope, component and authority in one month. Encounters (events). Source: U.S. Customs and Border Protection. Feeds Immigration · methodology.
- lpr-seriesGreen cards: totals
People granted lawful permanent resident status by fiscal year, optionally split by admission type or class of admission.
One row: one metric in one fiscal year (and admission type or class). People. Source: U.S. Department of Homeland Security, Office of Homeland Security Statistics. Feeds Immigration · methodology.
- lpr-by-countryGreen cards: by country
Lawful permanent residents by country of birth or nationality and fiscal year, with the yearbook table each value was read from.
One row: one country, metric and basis in one fiscal year. People. Source: U.S. Department of Homeland Security, Office of Homeland Security Statistics. Feeds Immigration · methodology.
- lpr-by-regionGreen cards: by region
Lawful permanent residents by world region and fiscal year.
One row: one region, metric and basis in one fiscal year. People. Source: U.S. Department of Homeland Security, Office of Homeland Security Statistics. Feeds Immigration · methodology.
- refugee-seriesRefugee admissions: totals
Refugees admitted each fiscal year against the presidential ceiling, with the administration in office.
One row: one fiscal year. People. Source: U.S. Department of State, Refugee Processing Center (admissions); Presidential Determinations, Federal Register (ceilings). Feeds Immigration · methodology.
- refugee-by-countryRefugee admissions: by country
Refugee admissions by country of nationality and fiscal year.
One row: one country in one fiscal year. People. Source: U.S. Department of State, Refugee Processing Center. Feeds Immigration · methodology.
- refugee-by-regionRefugee admissions: by region
Refugee admissions by world region and fiscal year, with the regional allocations the President set.
One row: one region in one fiscal year. People. Source: U.S. Department of State, Refugee Processing Center. Feeds Immigration · methodology.
- refugee-monthlyRefugee admissions: by month
Refugee admissions by month.
One row: one month. People. Source: U.S. Department of State, Refugee Processing Center. Feeds Immigration · methodology.
Congress
- legislatorsLegislators
Every person who has served in Congress, with name, birth year and gender. Identity only: nothing that changes by Congress.
One row: one person. Source: @unitedstates/congress-legislators (CC0). Feeds Ideology · methodology.
- termsCongressional terms
State, district, party and caucus for each member in each Congress and chamber.
One row: one member, Congress and chamber. Source: @unitedstates/congress-legislators (CC0). Feeds Ideology · methodology.
- ideology-scoresIdeology scores (DW-NOMINATE)
Each member's two-dimensional DW-NOMINATE and Nokken-Poole scores in each Congress, 1st through 119th.
One row: one member, Congress and chamber. Scores run about -1 to +1; dimension 1 is the liberal-conservative axis. Source: Lewis, Poole, Rosenthal, Boche, Rudkin and Sonnet (2026), Voteview: Congressional Roll-Call Votes Database, https://voteview.com/. Feeds Ideology · methodology.
- committeesCommittees
The 49 standing, select and joint committees of the 119th Congress.
One row: one committee. Source: @unitedstates/congress-legislators (CC0). Feeds Ideology.
- subcommitteesSubcommittees
Subcommittees of the 119th Congress and their parent committees.
One row: one subcommittee. Source: @unitedstates/congress-legislators (CC0). Feeds Ideology.
- committee-membershipsCommittee memberships
Who sits on which committee in the 119th Congress, with party side, role and rank.
One row: one member on one committee. Source: @unitedstates/congress-legislators (CC0). Feeds Ideology.
- lawsPublic laws
Every public law since the 93rd Congress (1973): signing date, title, bill, sponsor, policy area, vote counts and a one-sentence summary.
One row: one public law. Source: Congress.gov and GovInfo (Library of Congress, CRS summaries); Lewis, Poole, Rosenthal, Boche, Rudkin and Sonnet (2026), Voteview: Congressional Roll-Call Votes Database, https://voteview.com/; David R. Mayhew, Divided We Govern (major laws). Feeds Laws · methodology.
- laws-countsLaws per Congress and policy area
How many laws each Congress passed in each policy area, split by breadth of support.
One row: one Congress and policy area. Source: Congress.gov and GovInfo; Lewis, Poole, Rosenthal, Boche, Rudkin and Sonnet (2026), Voteview: Congressional Roll-Call Votes Database, https://voteview.com/. Feeds Laws · methodology.
- financial-disclosuresFinancial disclosures: net worth estimates
Estimated assets, liabilities and net worth for members of Congress by reporting year, from the value bands on their annual disclosures.
One row: one member and reporting year. U.S. dollars, estimated from band midpoints; the top open-ended band counts at its floor. Source: Clerk of the U.S. House of Representatives; Secretary of the Senate, Financial Disclosure reports. Feeds Wealth · methodology.
Supreme Court
- justicesJustices
Every justice with appointing president, party, nomination and confirmation dates, Senate vote and service dates.
One row: one justice. Source: Federal Judicial Center, Biographical Directory of Article III Federal Judges; Supreme Court Database, Version 2026 Release 01 (Spaeth, Epstein, Martin, Segal, Ruger, Benesh and Nelson). Feeds Ideology.
- martin-quinn-scoresJustice ideology scores (Martin-Quinn)
Each justice's estimated ideal point by term, with its uncertainty.
One row: one justice and term. Negative is liberal, positive is conservative. Not on the DW-NOMINATE scale: compare within this table only. Source: Martin and Quinn, Martin-Quinn scores (mqscores.wustl.edu). Feeds Ideology · methodology.
- court-termsThe Court's median by term
The median justice's score each term, with the most liberal and most conservative scores and who held the middle.
One row: one term (or part of a term when the bench changed). Source: Martin and Quinn, Martin-Quinn scores (mqscores.wustl.edu). Feeds Ideology · methodology.
- decisions-casesSupreme Court decisions
Every argued case since 1946 with date, citation, issue area, vote split and the direction of the outcome.
One row: one case. Source: Supreme Court Database, Version 2026 Release 01 (Spaeth, Epstein, Martin, Segal, Ruger, Benesh and Nelson). Feeds Decisions · methodology.
Terms: Non-commercial use only: the Supreme Court Database is CC BY-NC 3.0 US. Cite it alongside InsideGov (http://supremecourtdatabase.org).
- decisions-countsDecisions per term and issue area
How many cases each term decided in each issue area, bucketed by how many justices dissented.
One row: one term and issue area. Source: Supreme Court Database, Version 2026 Release 01 (Spaeth, Epstein, Martin, Segal, Ruger, Benesh and Nelson). Feeds Decisions · methodology.
Terms: Non-commercial use only: the Supreme Court Database is CC BY-NC 3.0 US. Cite it alongside InsideGov (http://supremecourtdatabase.org).
Left out for now: Wikipedia-derived text (bios, case summaries, landmark lists), photos, each law’s action history and the per-filing financial line items. They stay on the pages they appear on.