Data API

Every dataset is available at a single URL. Pick a format, then sort, page, randomize, or download with query parameters.

Basics

GET /api/data/{dataset}              JSON by default
GET /api/data/{dataset}?format=xml   XML
GET /api/data/{dataset}?format=csv   CSV

Dataset names come from the catalog. Every example below is a live link, open one to see the real response:

Parameters

ParameterPurposeExample
formatjson (default), xml, or csvformat=csv
formattingindented (default) or noneformatting=none
rowslimit rows returnedrows=25
sortsort by a column name, optional descsort=Party desc
randomrandomize row orderrandom=true
pagesize / pagenumberpage through resultspagesize=25&pagenumber=2
downloadreturn as a downloadable filedownload=true

For sort, use a column name exactly as it appears in the results (they vary by dataset). Open a dataset to see its columns.

API keys

Anonymous use is free within daily limits. A pass raises your limits; send the key in the Authorization header on every request:

Authorization: Bearer YOUR_KEY

Responses include an X-Key-Expires header so your integration can warn you before renewal time. Query-string tokens are not supported.

Free tier and limits

Without a key you can call the API 50 times a day, and responses return up to 50 rows. That is plenty for trying things out, small lookups, and most teaching or prototyping. A pass removes the row cap and raises the daily limit.

Exceeding your limit returns HTTP 429 with a Retry-After header. Errors return meaningful HTTP status codes with a JSON body: {"message": "The requested list was not found."}