Repository avatar
Databases
v2.0.0
active

data-library

com.nysgpt/data-library

SQL over 52.8B public records: USAspending, OpenAlex, patents, LEHD jobs, SEC, EPA, FERC, Medicare.

Documentation

NYSgpt Data Library

52.8B public records in 6,396 SQL tables, queryable from Claude (or any MCP client) and over plain HTTP. Federal spending, patents, company filings, scholarly works, labor, census, energy, health, courts and more, already loaded and typed. Nothing to download or restore.

What people use it for

  • The full USAspending database in SQL without restoring the 177 GB PostgreSQL archive: transactions, awards, sub-awards, recipients and account balances.
  • OpenAlex in SQL: 465 million works with authors, institutions, funders and topics.
  • Every U.S. patent: PatentsView grants from 1976 and applications from 2001, claims, citations, assignments, examination history and office actions.
  • Jobs by census block (LEHD LODES): home-to-work flows and job counts, 2002 to 2024, 15.6 billion rows.
  • SEC financial statements, 13F holdings and insider transactions, EPA facility and emissions data, FERC electricity sales, Medicare payments and cost reports, IRS and Form 5500 filings, court opinions.

Connect

Claude (claude.ai or desktop): Settings, Connectors, Add custom connector, and paste https://data.nysgpt.com/mcp?key=YOUR_KEY.

Claude Code:

claude mcp add --transport http nysgpt-data https://data.nysgpt.com/mcp --header "X-Api-Key: YOUR_KEY"

Cursor, VS Code and other MCP clients (mcp.json):

{ "mcpServers": { "nysgpt-data": { "url": "https://data.nysgpt.com/mcp?key=YOUR_KEY" } } }

HTTP:

curl -s https://data.nysgpt.com/query -H 'X-Api-Key: YOUR_KEY' -H 'content-type: application/json' \
  -d '{"sql":"SELECT publication_year, count(*) AS works FROM govblock_scholarly.openalex_works WHERE publication_year >= 2020 GROUP BY 1 ORDER BY 1"}'

Tools

ToolWhat it does
list_databasesThe databases, one per subject
list_tablesTables in a database, with row counts
describe_tableFields, types and description of a table
queryOne read-only SQL statement (Athena/Trino dialect), up to 1,000 rows

HTTP equivalents: GET /databases, GET /tables?database=, GET /table?database=&table=, POST /query.

Example

SELECT awarding_toptier_agency_name AS agency, count(*) AS awards,
       round(sum(try_cast(total_obligation AS double))/1e9, 1) AS obligated_billions
FROM govblock_awards.usaspending_db_rpt_award_search
WHERE fiscal_year = '2025'
GROUP BY 1 ORDER BY 3 DESC LIMIT 5
agencyawardsobligated_billions
Department of Health and Human Services87,5481,985.9
Social Security Administration310,8841,634.6
Department of Defense3,950,955903.7
Department of Veterans Affairs491,843289.4
Department of Agriculture2,626,893231.6

More in examples/.

Largest datasets

DatasetSubjectRecordsTablesPublisher
Jobs by census block (LEHD)Labor15.6B4Census Bureau, Longitudinal Employer-Household Dynamics
American Community SurveyCensus and Geography12.7B4Census Bureau
FERC electricity sales reportsElectricity Grid and Energy5.4B4Federal Energy Regulatory Commission, through the PUDL project
New York (NYISO)Electricity Grid and Energy1.6B54New York Independent System Operator
PubMedHealth1.4B7National Library of Medicine
USAspending databaseFederal Spending1.2B79U.S. Department of the Treasury, Bureau of the Fiscal Service
Hospital and facility cost reportsHealth1.2B45Centers for Medicare and Medicaid Services
Power plant emissionsEnvironment1B2Environmental Protection Agency, Clean Air Markets
Patent Examination Research DatasetPatents998M15USPTO Office of the Chief Economist
Texas (ERCOT)Electricity Grid and Energy978M675Electric Reliability Council of Texas
Financial Statement and Notes data setsCompany Filings869M8SEC Division of Economic and Risk Analysis
PatentsView, granted patentsPatents821M41USPTO PatentsView
Care Compare quality and staffingHealth671M1073Centers for Medicare and Medicaid Services
OpenAlexScholarly Works586M21OpenAlex
Wind measurements and turbinesElectricity Grid and Energy581M53U.S. Geological Survey; published research datasets
Quarterly Census of Employment and WagesLabor502M7Bureau of Labor Statistics
Medicare payments by providerHealth487M16Centers for Medicare and Medicaid Services
Monthly merchandise tradeTrade460M23Census Bureau
PatentsView, pre-grant publicationsPatents394M30USPTO PatentsView
Trademark case filesTrademarks384M17USPTO Office of the Chief Economist
ClaimsPatents325M6USPTO Office of the Chief Economist
Home Mortgage Disclosure ActMortgage Lending and Banks312M6Consumer Financial Protection Bureau; Federal Financial Institutions Examination Council
Licences and applicationsConsumer Protection and Communications304M115Federal Communications Commission
Precinct returnsElections269M4MIT Election Data and Science Lab; OpenElections; Voting and Election Science Team; local election offices
EIA bulk seriesElectricity Grid and Energy261M41U.S. Energy Information Administration
Financial Statement Data SetsCompany Filings241M4SEC Division of Economic and Risk Analysis
Award files by fiscal yearFederal Spending228M2U.S. Department of the Treasury, Bureau of the Fiscal Service
Employee benefit plans (Form 5500)Nonprofits and Benefit Plans197M94U.S. Department of Labor, Employee Benefits Security Administration
Opinions and citationsCourts143M8Free Law Project
Classification master filesPatents142M2USPTO bulk data
Medicaid drug utilization and pricesHealth141M12Centers for Medicare and Medicaid Services
AssignmentsPatents136M8USPTO assignment records
Company factsCompany Filings127M2SEC EDGAR
Institutional holdings (Form 13F)Company Filings126M7SEC
Common Core of DataEducation110M200National Center for Education Statistics
USAspending database, publisher's subsetFederal Spending106M79U.S. Department of the Treasury, Bureau of the Fiscal Service
Open PaymentsHealth95.9M5Centers for Medicare and Medicaid Services
Office actionsPatents86.5M4USPTO Office of the Chief Economist and USPTO bulk data
Health plansHealth86.3M127Centers for Medicare and Medicaid Services
FERC financial formsElectricity Grid and Energy82.2M1139Federal Energy Regulatory Commission, through the PUDL project
Bulk filesFederal Campaign Finance79.5M7Federal Election Commission
DocketsCourts74.1M2Free Law Project
Artificial intelligence patent datasetPatents61.8M2USPTO Office of the Chief Economist
Filing index and company historiesCompany Filings57.1M4SEC EDGAR
Drug and device safetyHealth57M31Food and Drug Administration

All 132 datasets, with every table and field: https://nysgpt.com/data

Limits and plans

PlanPriceQueries a dayData scanned a day
Day pass$29300100 GB
Monthly$149 a month2,000200 GB
Institution$1,500 a month20,0001 TB

Every call needs a key: add ?key=YOUR_KEY to the MCP address or send the header X-Api-Key.

Notes

  • Queries are read-only: SELECT, WITH, SHOW, DESCRIBE.
  • Many source files are loaded as published, so numeric columns are often text; use try_cast.
  • The data is public records as issued by each publisher. Each dataset page names its publisher. Check the publisher's terms for your use.
  • Questions and requests for datasets: open an issue here.

No installation packages available.

Remote