ONPE Peru Elections Results Scraper
Pricing
from $7.50 / 1,000 results
ONPE Peru Elections Results Scraper
Scrapes official Peruvian election results from ONPE by geographic level and round. Returns votes, percentages, and candidate totals as flat rows.
Pricing
from $7.50 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
11 days ago
Last modified
Categories
Share
ONPE Peru Elections Results Scraper
Scrape official Peru election results from ONPE, by department, province, or district, for both rounds of the 2021 general election. Every row includes votes, percentages, and candidate totals, ready for CSV, JSON, Excel, or XML.
ONPE publishes Peru's official election results on its public web portal, but the data is spread across pages and not built for bulk analysis. This Actor reads the results directly, filtered by geographic level and election round, and returns each match in one fixed schema. No login, no API key, no manual copying.
| Who uses it | What they scrape ONPE Peru for |
|---|---|
| Political analysts | Compare vote distribution across departments and provinces |
| Journalists | Verify official counts for election coverage |
| Academic researchers | Build datasets for electoral studies |
| NGOs and observers | Monitor regional turnout and results |
| Data engineers | Feed election data into dashboards and models |
What it does
This Actor collects official Peruvian election results from ONPE by geographic level and round, and returns each result as a flat row.
- πΊοΈ Geographic levels: national, department, province, or district results.
- π³οΈ Both rounds: first round (Primera vuelta) and second round (Segunda vuelta).
- π Structured rows: each result includes votes, percentages, and candidate totals.
- β‘ Bulk export: up to one million results per run, in CSV, JSON, Excel, or XML.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with ONPE Peru data
π Track regional voting patterns.
A political analyst scrapes department-level results for both rounds to see how support shifted between candidates.
π° Verify election reporting.
A journalist pulls official district counts to fact-check numbers before publishing a story.
π Build academic datasets.
A researcher collects province-level results to study turnout and vote share across Peru.
π‘οΈ Monitor electoral integrity.
An election observer scrapes national results to compare against preliminary counts and detect discrepancies.
π Feed dashboards and models.
A data engineer schedules regular runs to update a live dashboard with the latest official results.
Why choose this scraper
| What you get | |
|---|---|
| Official source | Data comes directly from ONPE, Peru's electoral authority |
| No API key | Scrapes the public web portal, no registration or OAuth |
| Flexible geography | Get results at national, department, province, or district level |
| Both rounds | First and second round of the 2021 general election |
| Bulk ready | Export up to a million rows in common formats |
How it compares
This Actor is the only one on Apify that scrapes official ONPE Peru election results. The competitors below target different sources, so this table shows how they compare on general scraping capabilities.
| Feature | ParseForge | π― Tiktok Scraper (Pay Per Result) |
|---|---|---|
| Scrapes ONPE Peru election results | Yes | Not listed |
| Geographic level filtering | Yes | Not listed |
| Election round selection | Yes | Not listed |
| Bulk export up to 1 million rows | Yes | Not listed |
| No API key required | Yes | Not listed |
Configure the run
Drive the Actor by geographic level and election round, and set a maximum number of results to collect per run. The Input tab lists every parameter.
A first run with the defaults:
{"level": "DEPARTAMENTO","round": "P","maxItems": 10}
A larger pull:
{"level": "DEPARTAMENTO","round": "P","maxItems": 200}
Pricing
Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the ONPE Peru Elections Results Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to ONPE Peru through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/onpe-peru-elections-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check that the geographic level and round are valid. Also ensure maxItems is set to at least 1. If the problem persists, the ONPE website may have changed its structure.
The run is slow or times out.
Reduce maxItems or choose a higher geographic level like national or department, which returns fewer rows.
Some fields are empty in the output.
ONPE may not publish all data for every geographic unit. Empty fields mean the value was not available on the source page.
I get an error about the website.
ONPE may be temporarily unavailable. Retry the run later. If the error persists, contact support with the run ID.
FAQ
| Question | Answer |
|---|---|
| What elections does this Actor cover? | It covers the 2021 Peruvian general election, both the first round (Primera vuelta) and the second round (Segunda vuelta). |
| Which geographic levels can I scrape? | You can choose national, department, province, or district level results. |
| Do I need an API key or login? | No. The Actor reads the public ONPE web portal directly, so no registration or authentication is required. |
| What data does each result include? | Each row includes votes, percentages, and candidate totals for the selected geographic level and round. |
| Can I get both rounds in one run? | No, each run is for one round. Run the Actor twice, once for the first round and once for the second. |
| How many results can I collect? | You can set a maximum of up to one million results per run. |
| What export formats are supported? | You can export to CSV, JSON, Excel, or XML. |
| Is the data official? | Yes, the data comes directly from ONPE, Peru's official electoral authority. |
| Can I filter by candidate? | No, the Actor returns all candidates for the selected geographic level and round. You can filter the output dataset afterwards. |
| Does this Actor work for other elections? | Currently it is configured for the 2021 general election. Contact support if you need other elections. |
Related actors
Browse the full ParseForge collection for more scrapers.
π Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
β οΈ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Oficina Nacional de Procesos Electorales (ONPE). It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
