Spiral gives your agent every tool with one account. Browse the tools →

AlexandriaIndustry DataAvailable now

Harvard Dataverse: MIT Election Data and Science Lab returns · Query returns

dataverse-harvard-edu/elections/query_returns

Get 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

FieldKindDefaultDescription
doi requiredtext—

Dataset DOI: doi:10.7910/DVN/PEJ5QU, 10.7910/DVN/PEJ5QU or https://doi.org/10.7910/DVN/PEJ5QU.

modetext—

Vote mode, e.g. TOTAL, ELECTION DAY, ABSENTEE.

yearnumber
1789 to 2100
—

year

limitnumber
1 to 1000
—

Maximum rows, default 200.

partytext—

Substring of party_detailed, party_simplified or party, e.g. DEMOCRAT.

stagetext—

Election stage, e.g. gen or pri.

statetext—

State name (GEORGIA) or postal code (GA), case-insensitive exact match.

countytext—

County name (exact, case-insensitive) or county FIPS code.

officetext—

Substring of the office column, e.g. SENATE, US HOUSE, GOVERNOR.

offsetnumber
0 to …
—

Byte offset to resume at: the previous answer's next_offset. Default 0.

file_idnumber
1 to …
—

File id from get_dataset.

districttext—

District; numbers compare numerically (5 = 005), otherwise exact (statewide).

candidatetext—

Substring of the candidate name as MEDSL prints it (upper case, e.g. OSSOFF).

file_nametext—

File name (label or original name) from get_dataset, e.g. 1976-2024-senate-state.tab.

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.