Skip to content
Election Wrld, home
Senate D 45I 2R 53House D 214I 1R 218Governors D 24R 26Election Day Tue, Nov 3

API for developers

Read-only JSON (or CSV) for districts, members, results, the calendar and polls. You don't need a key or an account.

Quickstart

Districts and officials for an address:

curl -X POST "https://www.electionwrld.com/api/v1/lookup" \
  -H "Content-Type: application/json" \
  -d '{"address": "605 E Main St, Charlottesville, VA 22902"}'
Base URL
https://www.electionwrld.com/api/v1
Formats
JSON by default. Add ?format=csv for CSV on every endpoint except lookup.
CORS
Open to every origin (Access-Control-Allow-Origin: *).
Caching
Data responses may be cached for one hour. Lookups are never cached.
Limits
No key. Address lookups are capped at 10 a minute from one connection on each server. Data endpoints have no limit in the code today.
License
Our tables are CC BY 4.0. Credit Election Wrld; polls also credit VoteHub. Each response carries the license.
Missing data
A value we don’t have is null. A file we haven’t loaded returns 404 with a message. Nothing is estimated.

Try it

Try VA-07, WY-AL or ocd-division/country:us/state:va/sldl:57.

Endpoints

State legislative districts

Use the OCD-ID as the path. Slashes are fine, and one URL-encoded segment also works. Multi-member districts keep one id with a seat count.

curl https://www.electionwrld.com/api/v1/districts/ocd-division/country:us/state:va/sldl:57

Screen-record mode

For video. These pages have no menu or footer and are laid out 16:9. In a wide window they scale to fit, so a 1280 by 720 or 1920 by 1080 recording looks the same. Every view carries a credit line and the date of its data. The data is CC BY 4.0, so keep that line in frame.

Add ?theme=dark or ?theme=light to pick a theme. Below 900 pixels wide the page stops scaling and reflows for a phone. The district cards (/embed/va/congress/7) are the small ones for an iframe.

Coming from Google Civic?

The migration guide maps the Civic Information API’s representatives and divisions calls to these endpoints, field by field, and lists what we don’t cover.