ONPE Peru Elections Results Scraper avatar

ONPE Peru Elections Results Scraper

Pricing

from $7.50 / 1,000 results

Go to Apify Store
ONPE Peru Elections Results Scraper

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

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

11 days ago

Last modified

Share

ParseForge

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 itWhat they scrape ONPE Peru for
Political analystsCompare vote distribution across departments and provinces
JournalistsVerify official counts for election coverage
Academic researchersBuild datasets for electoral studies
NGOs and observersMonitor regional turnout and results
Data engineersFeed 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 sourceData comes directly from ONPE, Peru's electoral authority
No API keyScrapes the public web portal, no registration or OAuth
Flexible geographyGet results at national, department, province, or district level
Both roundsFirst and second round of the 2021 general election
Bulk readyExport 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.

FeatureParseForge🏯 Tiktok Scraper (Pay Per Result)
Scrapes ONPE Peru election resultsYesNot listed
Geographic level filteringYesNot listed
Election round selectionYesNot listed
Bulk export up to 1 million rowsYesNot listed
No API key requiredYesNot 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 collectedApproximate 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

  1. Create a free Apify account with $5 in credit.
  2. Open the ONPE Peru Elections Results Scraper.
  3. Set your inputs and any filters, then click Start.
  4. 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

QuestionAnswer
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.

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.