Public API
Programmatic access to the series
Read-only access, no sign-up. Responses are cached for up to one hour and series are updated once a day. When using the data, cite the original source listed for each series.
Endpoints
GET/series
Catalog: code, name in three languages, source, unit, frequency, topic, first and last data point.
https://dados.ytabemi.com/api/v1/seriesGET/series/{codigo}
Metadata and every observation of the series, in JSON.
https://dados.ytabemi.com/api/v1/series/ipca-mensalGET/series/{codigo}?formato=csv
Standard CSV: comma separator and decimal point.
https://dados.ytabemi.com/api/v1/series/selic-meta?formato=csvGET/series/{codigo}?formato=csv-br
CSV for Excel in Portuguese: semicolon separator and decimal comma.
https://dados.ytabemi.com/api/v1/series/pmc-varejo-br?formato=csv-brExamples
Python (pandas)
import pandas as pd
ipca = pd.read_csv("https://dados.ytabemi.com/api/v1/series/ipca-mensal?formato=csv", parse_dates=["data"])R (readr)
library(readr)
ipca <- read_csv("https://dados.ytabemi.com/api/v1/series/ipca-mensal?formato=csv")Series codes are listed in the catalog and at the /series endpoint. Dates use the YYYY-MM-DD format. For monthly and quarterly series, the date is the first day of the period; for the PNAD rolling quarter, the first day of the quarter's last month.
