Skip to contents

Retrieve data from BDL API in JSON format.


get_request(dir, id, filters = NULL, ...)



A directory of the dataset.


A name for the dataset of interested.


A named list of filters. Names of list objects are bdl filter names and values are vectors with specified filter values. If NULL (default) the whole dataset is returned. See API documentation for more on filters and limitations per query.


Other arguments passed on to GET. For example a proxy parameters, see details.


A JSON raw data.


Data to retrieve from The BDL Web Services can be specified with filters. If no specific filters required, it's recommended to use data query like get_data_by_unit_locality, than to use get_request directly.

To use a proxy to connect, a use_proxy can be passed to GET. For example get_request(id, filters, config = httr::use_proxy(url, port, username, password)).


   # get_request(dir = "data/By-Variable", id = "3643")
   # get_request(dir = "data/By-Unit", id = "023200000000", filters = list(year  = c("2000","2010"), 
   #             var-Id" = c("2137","148190")))
   # get_request(dir = "data/By-Variable", id = "3643", filters = list(year = c("2000","2010"), 
   #             unit-Level" = 2, lang = "en"))