# IPCA Scraper: Brazil Official Inflation (IBGE) (`scrapewise/ipca-scraper`) Actor

Scrape Brazil's official IPCA inflation from IBGE: monthly variation, 3, 6, 12-month and year-to-date accumulated rates, and the price index, by month. Error rows are free.

- **URL**: https://apify.com/scrapewise/ipca-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** Business, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.76 / 1,000 ipca month delivereds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## IPCA Scraper: Brazil Official Inflation (IBGE)

Brazil's official consumer inflation index, IPCA, published by IBGE (the Brazilian Institute of Geography and Statistics). Pull the monthly variation, the price index, or the accumulated rate over 3, 6 or 12 months and the year to date, month by month, as clean rows for a spreadsheet, a model or a scheduled alert.

### At a glance

| | |
|---|---|
| Source | IBGE, IPCA (aggregate 1737), the official national consumer price index |
| Data | Monthly variation (%), price index (base December 1993 = 100), accumulated rates (%) |
| History | From December 1979 to the latest month IBGE has published |
| Range | Any month range, delivered newest or oldest first |
| Login | Not needed |
| Price | US$ 0.001 per month delivered (plus the platform start event, US$ 0.005 per run) |
| Error rows | Free (not charged) |

### Quick start

Paste this input into the Console, or send it to the API as the run input:

```json
{
  "indicator": "monthly-variation",
  "startMonth": "2024-01",
  "endMonth": "2025-12",
  "order": "newest",
  "maxItems": 50
}
```

Each run delivers one row per published month of the chosen indicator, inside the range, up to `maxItems`.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `indicator` | select | `monthly-variation` | `monthly-variation` (%), `price-index` (base Dec 1993 = 100), `accumulated-3-months`, `accumulated-6-months`, `accumulated-year`, `accumulated-12-months` (all %). |
| `startMonth` | text | empty | First month as `YYYY-MM`, for example `2025-01`. Empty starts at the first month of the series. |
| `endMonth` | text | empty | Last month as `YYYY-MM`, for example `2026-09`. Empty ends at the latest published month. |
| `order` | select | `newest` | `newest` (most recent first) or `oldest` (first month first). The `maxItems` limit is applied after this order. |
| `maxItems` | integer | `50` | Maximum months delivered in one run, up to 1,000. |
| `proxyConfiguration` | object | datacenter proxy | Proxy used for the requests. The default is enough for this public IBGE source. |

The series is one IBGE request per run. The month range is applied inside the Actor, so changing `startMonth` or `endMonth` never costs more requests.

### Output fields

| Field | Example | Meaning |
|---|---|---|
| `type` | `ipca` | `ipca` for a data row, `error` for a free error row. |
| `period` | `2025-12` | Reference month, `YYYY-MM`. |
| `year` | `2025` | Reference year. |
| `month` | `12` | Two-digit reference month. |
| `indicator` | `monthly-variation` | The indicator you asked for. |
| `variable` | `IPCA - Variação mensal` | The variable name as IBGE labels it. |
| `unit` | `%` | Unit of the value: `%` for variations and accumulated rates, `Número-índice` for the price index. |
| `value` | `0.33` | The published value. For a variation of 0.33 the month rose 0.33% in IPCA terms. |
| `locality` | `Brasil` | The IBGE locality. This Actor delivers the national index. |
| `source` | `IBGE, IPCA (agregado 1737)` | Source of every row. |
| `scrapedAt` | `2026-11-03T03:03:33Z` | UTC time the row was collected. |
| `errorCode` | `null` | Set only on error rows (`INVALID_INPUT`, `NO_DATA`, `SOURCE_ERROR`, `UNEXPECTED`). |
| `error` | `null` | Human-readable message on error rows. |

### Example output

Real rows from a run on 3 November 2026 with `indicator: monthly-variation`, `startMonth: 2024-01`, `endMonth: 2025-12`, `order: newest`:

```json
{
  "type": "ipca",
  "period": "2025-12",
  "year": 2025,
  "month": "12",
  "indicator": "monthly-variation",
  "variable": "IPCA - Variação mensal",
  "unit": "%",
  "value": 0.33,
  "locality": "Brasil",
  "source": "IBGE, IPCA (agregado 1737)",
  "scrapedAt": "2026-11-03T03:03:33Z",
  "errorCode": null,
  "error": null
}
```

The same range gave 24 months, from `2025-12` down to `2024-01` (the last one has `value: 0.42`).

### Errors

Error rows have `type: "error"`, the data fields are empty except `error`, `errorCode` and `indicator`, and nothing is charged for them.

| errorCode | When it happens |
|---|---|
| `INVALID_INPUT` | A month is not `YYYY-MM` or is not a real month, the last month is before the first one, or `indicator` or `order` has an unknown value. The message says which one. |
| `NO_DATA` | IBGE has no published month inside the range you asked for. Check the months against the latest published month. |
| `SOURCE_ERROR` | IBGE did not answer during the run. Run it again in a few minutes. |
| `UNEXPECTED` | An unexpected failure. The run ends with what was already delivered, and nothing more is charged. |

A run never ends as FAILED for a source error: it ends with a free error row and a status message.

### Integrations, scheduling and AI agents

- **Schedules.** IPCA is released once a month by IBGE. Schedule the run for the day after the release with `order: newest` and `maxItems: 1` to get the latest month, or with a fixed range to rebuild a history.
- **Export.** Use the dataset tab for CSV or Excel, or the dataset API for JSON. The Console also offers a CSV link on every run.
- **Make, n8n and Zapier.** Connect the Apify app, trigger on run finished, and read the dataset items.
- **Apify MCP server.** Add the Apify MCP server to Claude, ChatGPT, Cursor or Codex and ask, for example, "IPCA variation for the last 12 months". The agent calls this Actor with the input above and reads the rows.
- **Models and sheets.** Each row is one month and one value, so a time series loads straight into pandas, R or a spreadsheet without cleaning.

### FAQ

**Is this the official IPCA?** Yes. The values are the ones IBGE publishes for the IPCA national index (aggregate 1737). The Actor does not change, smooth or revise them.

**What is the difference between the monthly variation and the accumulated rates?** The monthly variation is the change in one month. The accumulated rates add up the changes over 3, 6 or 12 months, or from January to the reference month for the year to date. They are the figures IBGE publishes in the same table.

**Why does the price index look so small for the 1970s and 1980s?** The index is set to 100 in December 1993. Before then, inflation was very high, so earlier values are tiny fractions of 100. The series is correct as IBGE publishes it.

**Does it give regional IPCA?** No. This version delivers the national index (Brasil). Regional IPCA by metropolitan area is a different table and not in this Actor.

**Why are the last months missing?** IBGE publishes the IPCA once a month, after the reference month closes. A month appears only after its release. Use the latest month the IBGE calendar shows.

**How do I get the 12-month rate from the monthly variations?** Use `monthly-variation` for the months you need and compound them: the accumulated rate over 12 months is the product of the twelve monthly factors (1 + value / 100), minus 1. IBGE also publishes that figure directly as `accumulated-12-months`, so you can compare the two.

**Why does the price index have so many decimals?** It is delivered as IBGE publishes it. Round it in your own tool if you only need the monthly variations.

**Will I be charged for errors?** No. Error rows and runs with no published month in range are free. You pay for each month delivered and the run start.

**How many months can one run deliver?** Up to 1,000 with `maxItems`. The whole series is about 560 months.

### Limitations

- Only the national index. No regional, metropolitan or subgroup breakdown in this version.
- Only the indicators listed. Other IBGE tables are not in this Actor.
- A month is delivered only after IBGE publishes it. The most recent month can be missing for a few days after the release.
- Values are returned as IBGE gives them, with the decimals IBGE publishes. Rounding is up to the user.
- If IBGE revises a month, a new run returns the revised value.

### Changelog

**3 Nov 2026, version 0.1.** First version. National IPCA: monthly variation, price index, and accumulated rates over 3, 6 and 12 months and the year to date. Newest or oldest first, with a month range.

# Actor input Schema

## `indicator` (type: `string`):

Which IPCA series to deliver: the price index (base December 1993 = 100), the monthly variation, or an accumulated rate (3, 6, 12 months or the year to date).

## `startMonth` (type: `string`):

First month to deliver, as YYYY-MM, for example 2025-01. Leave empty to start from the first month of the series (December 1979).

## `endMonth` (type: `string`):

Last month to deliver, as YYYY-MM, for example 2026-09. Leave empty to end at the latest month IBGE has published.

## `order` (type: `string`):

Deliver the most recent months first, or the oldest first. The max rows limit applies after this order.

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

Maximum number of months to deliver in this run. Each month is charged once.

## `proxyConfiguration` (type: `object`):

Proxy used for the requests. The default datacenter proxy is enough for this public IBGE API.

## Actor input object example

```json
{
  "indicator": "monthly-variation",
  "order": "newest",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `resultsCsv` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/ipca-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/ipca-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 '{}' |
apify call scrapewise/ipca-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapewise/ipca-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/T5cUbnMOgnBibouuh/builds/bnJ8MdB9iB8en0UYG/openapi.json
