Banque de France’s API - api

Données - BDF

🇬🇧 English version

Info

source dataset Title Updated
bdf api NA NA

Web

List of APIs

source dataset Title Updated
bdf api NA NA
bea api NA NA
bis api NA NA
bls api NA NA
dbnomics api NA NA
ecb api NA NA
eurostat api NA NA
imf api NA NA
insee api NA NA
oecd api OECD's API 2026-08-02
wdi api NA NA

LAST_COMPILE

LAST_COMPILE
2026-08-17

Info

https://developer.webstat.banque-france.fr/product/7553/api/4304#/WEBSTATBanquedeFranceFRV1_100_4701/operation/%2Fv1%2Fdata%2F{datasetName}%2F{seriesKey}/get

https://api.webstat.banque-france.fr/webstat-fr/v1/data/REPLACE_DATASETNAME?format=json&detail=dataonly&startPeriod=REPLACE_THIS_VALUE&endPeriod=REPLACE_THIS_VALUE&lastNObservations=REPLACE_THIS_VALUE&firstNObservations=REPLACE_THIS_VALUE

https://api.webstat.banque-france.fr/webstat-fr/v1/data/REPLACE_DATASETNAME/REPLACE_SERIESKEY?format=json&detail=dataonly&startPeriod=REPLACE_THIS_VALUE&endPeriod=REPLACE_THIS_VALUE&lastNObservations=REPLACE_THIS_VALUE&firstNObservations=REPLACE_THIS_VALUE

Exemple: RPP

Datastructure

Code
RPP_datastructure <- httr::GET(paste0(catalog_url, "/webstat-datasets/exports/json"),
                         query = list(where = 'dataset_id="RPP"'),
                         httr::add_headers(Authorization = paste("Apikey", api_key)),
                         httr::config(http_version = 1.1)) |>
  httr::content("text", encoding = "UTF-8") |>
  jsonlite::fromJSON(flatten = TRUE)

tibble(dimension = names(jsonlite::fromJSON(RPP_datastructure$dimensions_and_codelists[1])),
       codelist = unlist(jsonlite::fromJSON(RPP_datastructure$dimensions_and_codelists[1]))) |>
  print_table_conditional()
dimension codelist
FREQ CL_FREQ
REF_AREA CL_AREA_EE
ADJUSTMENT CL_ADJUSTMENT
RPP_DWELLING CL_RPP_DWELLING
RPP_GEO_COV CL_RPP_GEO_COV
RPP_SOURCE CL_RPP_SOURCE
RPP_SUFFIX CL_RPP_SUFFIX

Catalogue

Code
RPP_catalogue <- httr::GET(catalog_url,
                     query = list(where = 'webstat_dataset_id="RPP"', limit = 100),
                     httr::add_headers(Authorization = paste("Apikey", api_key)),
                     httr::config(http_version = 1.1)) |>
  httr::content("text", encoding = "UTF-8") |>
  jsonlite::fromJSON(flatten = FALSE)

RPP_catalogue$results$metas$custom |>
  select(series_key, series_title_fr, series_freq, series_last_time_period_date) |>
  print_table_conditional()
series_key series_title_fr series_freq series_last_time_period_date
RPP.Q.FR.N.ED.00.1.00 Indice des prix des logements anciens - France métropolitaine - Ensemble - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NF.CR.1.00 Prix au mètre carré des appartements neufs, Ile de France Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NF.00.1.00 Prix au mètre carré des appartements neufs, France entière Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NH.00.1.00 Prix de vente moyen d'une maison neuve, France entière Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.EF.CS.1.00 Indice des prix des logements anciens - Île-de-France : Petite couronne - Appartements - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.EF.CC.1.00 Indice des prix des logements anciens - Paris - Appartements - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NH.CR.1.00 Prix de vente moyen d'une maison neuve, Ile de France Q 2025-12-31T00:00:00+00:00

Data

Code
get_observations <- function(series_keys) {
  where_clause <- paste0("series_key='", series_keys, "'", collapse = " or ")
  httr::GET(export_url,
      query = list(select = "series_key,time_period_end,obs_value", where = where_clause),
      httr::add_headers(Authorization = paste("Apikey", api_key)),
      httr::config(http_version = 1.1)) |>
    httr::content("text", encoding = "UTF-8") |>
    jsonlite::fromJSON(flatten = TRUE) |>
    as_tibble() |>
    transmute(variable = series_key, date = as.Date(time_period_end), value = obs_value)
}

RPP_data2 <- get_observations("RPP.Q.FR.N.ED.00.1.00")

RPP_data2 |>
  print_table_conditional()
Code
RPP_data3 <- get_observations(c("RPP.Q.FR.N.ED.00.1.00", "RPP.Q.FR.N.EF.CC.1.00")) |>
  left_join(RPP_catalogue$results$metas$custom |>
              select(variable = series_key, title = series_title_fr),
            by = "variable")

RPP_data3 |>
  print_table_conditional()

Example 1

All

Code
RPP_data3 |>
  group_by(title) |>
  mutate(value = 100*value/value[date == min(date[date >= as.Date("2008-01-01")])]) |>
  ggplot() + geom_line(aes(x = date, y = value, color = title)) +
  theme_minimal()  + xlab("") + ylab("Indice des prix des logements anciens") +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2030, 2), "-01-01")),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.4, 0.93),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 7000, 10))

2008-

Code
RPP_data3 |>
  filter(date >= as.Date("2008-01-01")) |>
  group_by(title) |>
  mutate(value = 100*value/value[date == min(date[date >= as.Date("2008-01-01")])]) |>
  ggplot() + geom_line(aes(x = date, y = value, color = title)) +
  theme_minimal()  + xlab("") + ylab("Indice des prix des logements anciens") +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2030, 2), "-01-01")),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.4, 0.93),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 7000, 10))

Datastructure

Information

  • Package rwebstat not maintained. html
  • Archived on 2023-04-07 for policy violation.

https://developer.webstat.banque-france.fr/node/295

Example

BSI1.M.FR.Y.R.A220Z.A.4.U6.2254FR.Z01.E

Catalogue

FM

Code
httr::GET(catalog_url,
    query = list(where = 'webstat_dataset_id="FM"', limit = 100),
    httr::add_headers(Authorization = paste("Apikey", api_key)),
    httr::config(http_version = 1.1)) |>
  httr::content("text", encoding = "UTF-8") |>
  jsonlite::fromJSON(flatten = FALSE) |>
  pluck("results", "metas", "custom") |>
  select(series_key, series_title_fr, series_freq, series_last_time_period_date) |>
  print_table_conditional()

RPP

Code
RPP_catalogue$results$metas$custom |>
  select(series_key, series_title_fr, series_freq, series_last_time_period_date) |>
  print_table_conditional()
series_key series_title_fr series_freq series_last_time_period_date
RPP.Q.FR.N.ED.00.1.00 Indice des prix des logements anciens - France métropolitaine - Ensemble - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NF.CR.1.00 Prix au mètre carré des appartements neufs, Ile de France Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NF.00.1.00 Prix au mètre carré des appartements neufs, France entière Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NH.00.1.00 Prix de vente moyen d'une maison neuve, France entière Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.EF.CS.1.00 Indice des prix des logements anciens - Île-de-France : Petite couronne - Appartements - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.EF.CC.1.00 Indice des prix des logements anciens - Paris - Appartements - Base 100 en moyenne annuelle 2015 - Série brute Q 2025-12-31T00:00:00+00:00
RPP.Q.FR.N.NH.CR.1.00 Prix de vente moyen d'une maison neuve, Ile de France Q 2025-12-31T00:00:00+00:00

New

Code
get_observations("BSI1.M.FR.Y.R.A220Z.A.4.U6.2254FR.Z01.E") |>
  print_table_conditional()

BSI1

Datastructure

Code
BSI1_datastructure <- httr::GET(paste0(catalog_url, "/webstat-datasets/exports/json"),
                          query = list(where = 'dataset_id="BSI1"'),
                          httr::add_headers(Authorization = paste("Apikey", api_key)),
                          httr::config(http_version = 1.1)) |>
  httr::content("text", encoding = "UTF-8") |>
  jsonlite::fromJSON(flatten = TRUE)

tibble(dimension = names(jsonlite::fromJSON(BSI1_datastructure$dimensions_and_codelists[1])),
       codelist = unlist(jsonlite::fromJSON(BSI1_datastructure$dimensions_and_codelists[1]))) |>
  print_table_conditional()
dimension codelist
FREQ CL_FREQ
REF_AREA CL_AREA_EE
ADJUSTMENT CL_ADJUSTMENT
BS_REP_SECTOR CL_BS_REP_SECTOR
BS_ITEM CL_BS_ITEM
MATURITY_ORIG CL_MATURITY_ORIG
DATA_TYPE CL_DATA_TYPE
COUNT_AREA CL_AREA_EE_BIS
BS_COUNT_SECTOR CL_BS_COUNT_SECTOR
CURRENCY_TRANS CL_CURRENCY
BS_SUFFIX CL_BS_SUFFIX