ParseForge Scrapers

Banco Central do Brasil SGS Scraper

parseforge/banco-central-brasil-sgs-scraper

Developer toolsOther

Scrapes time series observations from the Banco Central do Brasil SGS system. Returns each data point as a flat row with series code, date, and value.

Run this scraper See the API call
Total users
1
Monthly active
0
Total runs
86
Bookmarked
0
Rating
Not rated yet
Last modified
12 days ago

Overview

ParseForge

Banco Central do Brasil SGS Scraper

Scrape Brazilian macroeconomic time series from the Banco Central SGS system, from Selic and IPCA to exchange rates and GDP. Pull the latest observations or a full date range for any series code, and export structured data to CSV, JSON, Excel, or XML.

The Banco Central do Brasil's SGS (Sistema Gerenciador de Séries Temporais) is the definitive source for Brazilian economic and financial data, but downloading multiple series and aligning their dates by hand is slow and error-prone. This Actor queries the official SGS API directly, so you get the same data the central bank publishes, without manual downloads or copy-pasting. Feed it one or more series codes, choose the latest values or a custom date range, and receive every observation in a clean, flat schema ready for analysis.

Who uses it What they scrape Banco Central do Brasil SGS for
Economists and financial analysts Building a live dashboard of Brazilian inflation, interest rates, and exchange rates.
Data journalists Fact-checking a story on household debt trends with official central bank data.
Quantitative researchers Assembling a long history of monetary base and GDP figures for a forecasting model.
Business strategists Monitoring the Selic rate and IBC-Br activity index to time market entry decisions.

What it does

This Actor collects time series observations from the Banco Central do Brasil SGS system and returns each data point as a flat row with the series code, date, and value.

  • 📅 Latest observations mode: pull the most recent N records from each series, perfect for dashboards and daily updates.
  • 📆 Date range mode: define a start and end date in DD/MM/YYYY format to collect the full history for backtesting or long-term analysis.
  • 🔢 Curated series list: pick from 20 pre-loaded key indicators like Selic, IPCA, USD/BRL, and household debt, with human-readable labels.
  • Custom series codes: add any other numeric SGS code via a comma-separated text field, giving you access to the entire SGS catalog.

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

What you can do with Banco Central do Brasil SGS data

📈 Monitor inflation and interest rates.

An economist runs the Actor daily with series 432 (Selic target) and 433 (IPCA monthly change) to feed a real-time monetary policy dashboard.

💱 Track the Brazilian Real exchange rate.

A treasury analyst pulls the latest USD/BRL and EUR/BRL rates to update a corporate foreign-exchange exposure report.

🏠 Analyze household debt and credit growth.

A data journalist collects the household debt-to-income ratio and outstanding credit series to produce a long-form article on consumer financial health.

📊 Backtest a macroeconomic model.

A quant researcher fetches 20 years of GDP, monetary base, and IBC-Br data via date range mode to train a nowcasting model.

Why choose this scraper

What you get
Direct from the source Data comes straight from the Banco Central SGS API, the same official feed used by financial institutions.
No manual alignment Multiple series are fetched in one run and returned with consistent date formatting, saving hours of spreadsheet work.
Flexible date control Grab only the latest N values for a daily monitor, or pull decades of history for econometric modeling.
Full catalog access The curated list covers the most-requested series, and the custom codes field opens up every other series the SGS publishes.

How it compares

No other Store actor targets Banco Central do Brasil SGS the same way, so the honest comparison is with the alternatives teams actually weigh.

Banco Central do Brasil SGS Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When Banco Central do Brasil SGS 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 one or more SGS series codes, either from the curated list or entered manually, and set the fetch mode to collect the latest observations or a specific date range. The Input tab lists every parameter.

A first run with the defaults:

{
  "lastN": 10,
  "startDate": "01/01/2024",
  "endDate": "01/06/2024",
  "maxItems": 10
}

A larger pull:

{
  "lastN": 10,
  "startDate": "01/01/2024",
  "endDate": "01/06/2024",
  "maxItems": 200
}

Pricing

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

Results collected Approximate cost
100 results $1.10
1,000 results $11.00
10,000 results $110.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 Banco Central do Brasil SGS 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 Banco Central do Brasil SGS 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/banco-central-brasil-sgs-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results for my custom series code?

Double-check the numeric code on the SGS portal. Some series are discontinued or have been replaced. Try the code in the SGS web interface first to confirm it returns data.

The dates in my output look wrong.

Ensure your start and end dates are in DD/MM/YYYY format. The Actor expects day first, then month, then year. An input like 01/13/2024 will fail because month 13 does not exist.

The run timed out.

Requesting a very wide date range for many series can produce a large dataset. Try reducing the number of series, narrowing the date range, or increasing the run timeout in the Actor's settings.

I see a value of zero for a series I know is not zero.

Some SGS series use zero as a placeholder for missing or not-yet-published observations. Check the publication calendar for that indicator on the Banco Central website.

The Actor says 'Invalid series code'.

The SGS API returns this when a code does not exist. Verify the code on sgs.bcb.gov.br. Also check for accidental spaces or non-numeric characters in the Custom Series Codes field.

FAQ

Question Answer
What is the Banco Central SGS? The Sistema Gerenciador de Séries Temporais (SGS) is the time series management system of the Banco Central do Brasil. It is the official public repository for thousands of Brazilian economic and financial indicators.
Where do I find the numeric code for a series? Visit the SGS portal at sgs.bcb.gov.br, search for the indicator you need, and the series code will be displayed in the results. You can enter that code in the Custom Series Codes field.
Can I fetch more than one series at a time? Yes. Select multiple series from the curated list, add custom codes, or combine both. The Actor fetches all requested series in a single run.
What date format should I use? Use the Brazilian standard DD/MM/YYYY format, for example 01/01/2024 for January 1st, 2024.
How many observations can I pull? In latest observations mode, you can request up to 100,000 records per series. In date range mode, the Actor pulls every observation between your start and end dates.
Does this Actor require an API key from the Banco Central? No. The Actor queries the public SGS API endpoint, which does not require authentication or an API key.
What is the difference between the Selic target and the Selic effective rate? The Selic target (series 432) is the rate set by the COPOM. The Selic effective rate (series 11) is the daily realized rate in the interbank market. Both are available in the curated list.
Can I get data on Brazilian GDP with this Actor? Yes. The curated list includes monthly GDP at current prices (series 4380) and accumulated 12-month GDP (series 4385).
Is the data adjusted for inflation? The Actor returns the raw values as published by the Banco Central. You can pull the IPCA or IGP-M series alongside your target series to perform your own deflation calculations.
How do I export the results? After the run completes, you can export your dataset to CSV, JSON, Excel, or XML directly from the Apify platform.

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 Banco Central do Brasil. 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.

Input

FieldTypeWhat it doesDefault
seriesCodes array One or more Banco Central do Brasil SGS series to fetch. Pick from the curated list, or add any other numeric code via Custom Series Codes below. ["432","433","1"]
customSeriesCodes string Any other SGS series codes, comma separated (for example 24363, 7832). These are added to the series selected above. Find codes at the SGS portal (sgs.bcb.gov.br). not set
mode string (2 options) Latest observations pulls the most recent records per series. Date range pulls every observation between the two dates below. latest
lastN integer When Fetch Mode is Latest observations, how many of the most recent records to pull from each series. 10
startDate string When Fetch Mode is Date range, the first day to include, in DD/MM/YYYY format (for example 01/01/2024). 01/01/2024
endDate string When Fetch Mode is Date range, the last day to include, in DD/MM/YYYY format (for example 01/06/2024). 01/06/2024
maxItems integer Maximum number of time series to collect per run. 10

Pricing

from $9.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.009 to $0.011

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST · run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~banco-central-brasil-sgs-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Banco Central do Brasil SGS Scraper on Apify All scrapers