# BCRP Peru Statistical Series Scraper (`parseforge/bcrp-peru-series-scraper`) Actor

Scrapes a single BCRP Peru statistical series by code and date range and returns each observation as a flat row with date and value.

- **URL**: https://apify.com/parseforge/bcrp-peru-series-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Education, Automation
- **Stats:** 2 total users, 1 monthly users, 86.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.63 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### BCRP Peru Statistical Series Scraper

**Scrape any statistical series from the Central Bank of Peru (BCRP) by code and date range.** Get clean, structured time-series data for exchange rates, inflation, GDP, and hundreds of other indicators. Export to CSV, JSON, Excel, or XML.

The BCRP publishes hundreds of economic and financial time series on its website, but there is no bulk download for custom date ranges. This Actor reads the public statistical series API directly, so you can pull exactly the codes and periods you need. No manual downloads, no copy-paste from HTML tables.

| Who uses it | What they scrape BCRP Peru for |
|---|---|
| Economists and financial analysts | Pull daily interbank exchange rates or monthly inflation figures for models and reports. |
| Academic researchers | Gather long-run GDP, employment, or monetary aggregates for Peru-focused papers. |
| Fintech developers | Feed official SBS or interbank USD-PEN rates into currency conversion features. |
| Data journalists | Track fiscal deficit or trade balance series to support investigative stories. |

### What it does

This Actor collects a single BCRP statistical series by its code and returns each data point as a flat row with date and value.

- 📅 **Flexible date ranges:** request daily series with YYYY-M-D or monthly series with YYYY-M format.
- 🔢 **Any BCRP series code:** supply codes like PN01207PM (monthly interbank rate) or PD04640PD (daily SBS rate).
- 📊 **Structured output:** each row returns the date and the observed value, ready for analysis.
- ⚙️ **Preview mode for free users:** fetch up to 10 data points to test a series before scaling up.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with BCRP Peru data

**💱 Track USD-PEN exchange rates.**

A fintech app runs this Actor daily with code PD04640PD to get the latest SBS exchange rate and update its in-app currency converter.

**📈 Monitor monthly inflation.**

An economist pulls the Lima CPI series every month to update a dashboard comparing Peruvian inflation with other LatAm economies.

**🏦 Build a macroeconomic database.**

A research assistant runs the Actor for 20 different series codes, from M1 money supply to trade balance, to populate a panel dataset for a working paper.

**📰 Fact-check government claims.**

A data journalist fetches the fiscal deficit series after a policy speech to verify the numbers against the official BCRP record.

### Why choose this scraper

|  | What you get |
|---|---|
| **Official source data** | Values come directly from the BCRP public statistical service, the same source economists rely on. |
| **No manual work** | Skip the BCRP website's interactive query tool and get a clean dataset in one run. |
| **Long time series** | Pull decades of monthly data or years of daily data in a single execution. |
| **Ready for analysis** | Flat row-per-observation output loads straight into pandas, R, Excel, or a database. |

### How it compares

No other Store actor targets BCRP Peru the same way, so the honest comparison is with the alternatives teams actually weigh.

| | BCRP Peru Statistical Series Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When BCRP Peru changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a BCRP series code and a start and end date. The date format must match the series frequency, monthly or daily. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "seriesCode": "PN01207PM",
  "startDate": "2024-1",
  "endDate": "2025-12",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "seriesCode": "PN01207PM",
  "startDate": "2024-1",
  "endDate": "2025-12",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.0018 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.18 |
| 1,000 results | $1.80 |
| 10,000 results | $18.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](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [BCRP Peru Statistical Series Scraper](https://apify.com/parseforge/bcrp-peru-series-scraper?fpr=vmoqkp).
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](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to BCRP Peru through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/bcrp-peru-series-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 series code is correct and that your date range falls within the series' available history. Also verify the date format: monthly codes need YYYY-M, daily codes need YYYY-M-D.

**Why does the Actor return an error about the date format?**

Monthly series expect dates like 2024-1, not 2024-01 or 2024-1-1. Daily series expect 2024-1-15. Match the format to the series frequency.

**I got only 10 data points but I need more.**

The free tier limits runs to 10 items as a preview. Upgrade to a paid Apify plan and increase the maxItems setting to pull the full series.

**The series code I found on the BCRP website does not work.**

Some codes on the BCRP portal may refer to discontinued or internal series. Try searching for the same indicator again on the public series portal and use the updated code.

**My run timed out.**

Requesting very long daily series can take time. Try narrowing the date range or increasing the Actor's timeout in the run settings.

### FAQ

| Question | Answer |
|---|---|
| Where do I find the BCRP series codes? | Visit the BCRP statistical series portal, search for your indicator, and copy the code from the URL or the series metadata. Common codes include PN01207PM for the monthly interbank exchange rate and PD04640PD for the daily SBS rate. |
| What date format should I use? | Monthly series use YYYY-M format, for example 2024-1 for January 2024. Daily series use YYYY-M-D format, for example 2024-1-15 for January 15, 2024. |
| Can I scrape multiple series in one run? | This Actor handles one series code per run. To collect multiple series, run the Actor once per code, or use Apify's scheduling and orchestration features to chain runs. |
| Is there a limit on how many data points I can get? | Free users are limited to 10 data points per run as a preview. Paid Apify plans can request up to 1,000,000 data points, which covers even multi-decade daily series. |
| What does the output look like? | Each row in the dataset contains a date field and a value field. The exact field names match the BCRP series structure and are shown in the sample output on this page. |
| Does this Actor require an API key from BCRP? | No. The Actor reads the same public endpoints the BCRP website uses, so no registration or API key is needed. |
| Can I get data for a single month or a single day? | Yes. Set the start date and end date to the same value to retrieve a single observation. |
| What happens if I enter an invalid series code? | The Actor will return an error message indicating the series was not found. Double-check the code on the BCRP portal and try again. |
| Does this cover all BCRP series, including discontinued ones? | It covers any series still available through the BCRP public statistical service. If a series has been removed from the portal, it will not be accessible. |
| Can I schedule this to run automatically? | Yes. Use Apify's scheduler to run the Actor daily, weekly, or monthly. This is useful for tracking series that update on a known calendar, like monthly inflation or daily exchange rates. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) 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 Banco Central de Reserva del Perú. 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.

# Actor input Schema

## `seriesCode` (type: `string`):

BCRP series code (e.g. PN01207PM for monthly USD-PEN interbank rate, PD04640PD for daily SBS rate).

## `startDate` (type: `string`):

Start date. Monthly codes use YYYY-M, daily codes use YYYY-M-D.

## `endDate` (type: `string`):

End date. Monthly codes use YYYY-M, daily codes use YYYY-M-D.

## `maxItems` (type: `integer`):

Free users limited to 10 items (preview). Paid users optional, max 1,000,000.

## Actor input object example

```json
{
  "seriesCode": "PN01207PM",
  "startDate": "2024-1",
  "endDate": "2025-12",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "seriesCode": "PN01207PM",
    "startDate": "2024-1",
    "endDate": "2025-12",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/bcrp-peru-series-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "seriesCode": "PN01207PM",
    "startDate": "2024-1",
    "endDate": "2025-12",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/bcrp-peru-series-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "seriesCode": "PN01207PM",
  "startDate": "2024-1",
  "endDate": "2025-12",
  "maxItems": 10
}' |
apify call parseforge/bcrp-peru-series-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/bcrp-peru-series-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/U1firrk2h6IGQk4l8/builds/d6kqnYG06CiJYcoF8/openapi.json
