YtabemiData

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/series

GET/series/{codigo}

Metadata and every observation of the series, in JSON.

https://dados.ytabemi.com/api/v1/series/ipca-mensal

GET/series/{codigo}?formato=csv

Standard CSV: comma separator and decimal point.

https://dados.ytabemi.com/api/v1/series/selic-meta?formato=csv

GET/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-br

Examples

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.