Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns
dataverse-harvard-edu/elections/query_returnsGet industry and reference data with Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns from Alexandria through one Spiral API key. Historical baselines for one race: how a state or district voted, candidate and party totals, turnout (total votes), vote mode splits, and precinct or county detail from MEDSL files. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
doi required | text | — | Dataset DOI: doi:10.7910/DVN/PEJ5QU, 10.7910/DVN/PEJ5QU or https://doi.org/10.7910/DVN/PEJ5QU. |
mode | text | — | Vote mode, e.g. TOTAL, ELECTION DAY, ABSENTEE. |
year | number 1789 to 2100 | — | year |
limit | number 1 to 1000 | — | Maximum rows, default 200. |
party | text | — | Substring of party_detailed, party_simplified or party, e.g. DEMOCRAT. |
stage | text | — | Election stage, e.g. gen or pri. |
state | text | — | State name (GEORGIA) or postal code (GA), case-insensitive exact match. |
county | text | — | County name (exact, case-insensitive) or county FIPS code. |
office | text | — | Substring of the office column, e.g. SENATE, US HOUSE, GOVERNOR. |
offset | number 0 to … | — | Byte offset to resume at: the previous answer's |
file_id | number 1 to … | — | File id from |
district | text | — | District; numbers compare numerically (5 = 005), otherwise exact (statewide). |
candidate | text | — | Substring of the candidate name as MEDSL prints it (upper case, e.g. OSSOFF). |
file_name | text | — | File name (label or original name) from |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "dataverse-harvard-edu/elections/query_returns",
"input": {
"doi": "<doi>",
"file_id": 1
}
}'Frequently asked questions
How much does Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "dataverse-harvard-edu/elections/query_returns"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.