NYSgptData LibraryConnectPricing

Historical returns

County presidential returns from 2000, House and Senate returns from 1976, and state legislative returns from 1967.

556KRecords
5Tables
173Fields
1967–2024Years

Publisher: MIT Election Data and Science Lab; Carl Klarner

Try it

This runs against the full table, free, with no key.

Tables
Fields in klarner_state_legislative_returns
FieldTypeExample
caseidstring399102
uncertstringpartytsource
yearstring2020
monthstring11
daystring3
sidstring29
sabstringNH
sfipsstring33
sicpsrstring4
cnamestring
cfipsstring
senstring0
ddezstringHillsborough 37
dnamestringhillsborough
dnostring37
geopoststring
mmdpoststring
specpoststring
dtypestring3
dseatsstring11
popnumstring11
rediststring0
redist1string
redist2string92
redist3string
regimestring2012
flotstring0
flot1string
flot2string
flot3string
neststring0
nest1string
nest2string2
nest3string
etypestringg
deterstring1
eseatsstring11
termstring2
termzstring2
candostring
candformatstringsplitnames
candstringwyatt, timothy
candidstring399102
partyostringd
partystringworkingfamilies
partyzstringd
partytstringd
partytsourcestring
firstcasestring0
prior1string
prior2string
experstringnone
votestring6236
outcomestringl
holdstring0
hold1string
hold2string
tenure1string0
tenure2string0
limitstring
laststringwyatt
firststringtimothy
middlestrings
middle2stringt
nickstringwinkie
suffixstringjr
prefixstring
namenumstring2
last1stringbrook
last2stringkrasny
last3string
last4string
ltype1stringhyphenated part known
ltype2stringhyphenated part known
ltype3string
ltype4string
lastbstring
firstbstring
middlebstring
middle2bstring

27 more fields; select the table above to list them all.

Connect

Claude

Settings, Connectors, Add custom connector. Paste this address:

https://data.nysgpt.com/mcp

Claude Code

claude mcp add --transport http nysgpt-data https://data.nysgpt.com/mcp

HTTP

curl -s https://data.nysgpt.com/query -H "content-type: application/json" \
  -d '{"sql":"SELECT count(*) FROM govblock_awards.usaspending_contracts"}'

Any MCP client works. The tools are list_databases, list_tables, describe_table and query (Athena SQL, read-only, up to 1,000 rows a query). With a paid key, add ?key=YOUR_KEY to the address or send the header X-Api-Key.

Pricing

Free

$0

30 queries a day, 1 GB scanned per query. No key, no sign-up.

Connect

Day pass

$29

300 queries and 100 GB scanned in 24 hours. One payment.

Buy a day pass

Monthly

$149/month

2,000 queries and 200 GB scanned a day. Cancel any time.

Subscribe

Institution

$1,500/month

20,000 queries and 1 TB scanned a day, for a lab, department or team.

Subscribe

Payment is by card through Stripe. The key appears on screen as soon as payment completes.

More in Elections