Website · For agents · API · Downloads · Coverage
Elections Archive collects election results from each country's first election to its latest, down to the smallest unit that the official count reports, such as a precinct, a polling station, or a ballot box. One database serves the website, a REST API, an MCP server, Markdown and JSON versions of every page, and bulk downloads.
- Sourced. Every number links to the source that published it and to the change that brought it into the archive. Figures read from scanned books keep the page and the position on the page they came from.
- Stored as declared. Official winners and seats are stored as the authority declared them. A seat engine recomputes them only to compare, and never overwrites them.
- Open. The code is free software, the data is free to reuse with credit, and anyone can report a mistake.
The coverage page shows which countries and years the archive holds and what is still missing.
Start at electionsarchive.com. Addresses follow the place, then the election, then the contest, then the reporting unit, as in /us/ga/2020-11-03-general/senate/fulton-county-ga.
Add .md or .json to any page's address, or send an Accept: text/markdown or Accept: application/json header. Links in the Markdown lead to other Markdown pages, and /llms.txt maps the whole site.
curl https://electionsarchive.com/us/2024-11-05-general/president.mdInstall the skill, which teaches an agent the archive's data model, its addresses, and its tools:
npx skills add electarchive/electionsarchiveOr connect the MCP server at https://electionsarchive.com/mcp, which speaks streamable HTTP. In Claude Code:
claude mcp add --transport http electionsarchive https://electionsarchive.com/mcpConnect your agent has setup steps for other clients, the full list of tools, and example questions.
The REST API is at https://electionsarchive.com/api/v1, and its OpenAPI description lists every endpoint. Each MCP tool has a matching REST endpoint.
curl "https://electionsarchive.com/api/v1/search?q=istanbul"Reading needs no key and no account. A key from your settings raises your rate limits; send it in the x-api-key header.
Downloads has the whole archive as data files that you can query offline.
The archive is a SvelteKit app over one Postgres and PostGIS database, which Python pipelines fill from official sources. CONTRIBUTING.md covers setup, loading real data, and the checks to run before a pull request. To see how the pieces fit, read architecture, data model, and pipelines.
To fix a wrong number, name, or boundary, open a data error issue and cite a source that shows the right value. To suggest a source the archive doesn't have yet, open a new source issue. Code comes in through pull requests, as described in CONTRIBUTING.md. Report security issues privately, as described in SECURITY.md.
The code is licensed under the GNU Affero General Public License v3.0. The data is published under CC BY 4.0, except where a source's own license differs, and each result set records its source's license. To cite the archive, use a format from the license page, and credit the source of any figures you rely on.