API for open data
Data queries are performed against the REST API through the following URL / query string:
The identifier of the dataflow («dataset») that is being queried.
Consists of the dataflow identificator and optionally a version number (if multiple versions of the dataflow exist) separated by a comma. If version is omitted the latest version of the flow will be returned.
EXR, 2.0 (with versioning)
EXR (without versioning) identifies the exchange rate dataflow.
An overview of the available dataflows can be found in available data. The service also offers programmatic access to information about what data is available (see the specification). A broad range of metadata can be retrieved but given the limited set of data published by the bank, a call to retrieve details on available dataflows will be sufficient for most use cases: https://data.norges-bank.no/api/dataflow/all?references=children
The key specifies what data should be returned by the dataflow. Each dataflow consists of a set of dimensions that together uniquely identify what data should be retrieved from the flow. This is called a series key in SDMX.
As an example the dataflow for exchange rates consists of the following dimensions:
- The frequency of observations (
Bfor business day)
- The base currency (e.g.
- The quote currency (always
- The type of rate (always
In order to build the key the dimensions are joined together with a dot. For the above example this would result in:
The available data section contains details about each dataflows dimensions. This information can also be obtained programmatically. For the EXR dataflow the call would be: https://data.norges-bank.no/api/dataflow/all/EXR?detail=full&references=descendants.
Wildcards can be used by omitting a value for the dimension:
D..NOK.SP will return exchange rates for all currencies.
The OR operator can be used to specify multiple values:
D.CHF+USD.NOK.SP will return exchange rates for Swiss francs and US dollars.
- Year: YYYY (
- Quarter: YYY-MM-DD (
- Month: YYYY-MM (
- Day: YYYY-MM-DD (
StartPeriod=2011&EndPeriod=2015 will retrieve observations from 2011 to 2015.
StartPeriod=2011 will retrieve observations from 2011 to the last available data.
EndPeriod=2015 will retrieve observations from the first available observation until (and including) 2015.
Can be used to restrict the number of observations returned counting from the start or the end of the series.
If a series starts in 1990
firstNObservations=3 will return observations for 1990, 1991 and 1992.
If a series ends in 2016
lastNObservations=3 will return observations for 2014, 2015 and 2016.
The detail parameter is used to specify the level of detail of the response from the service.
Norges Bank publishes a limited set of data. In most cases the default setting of
full will not overwhelm clients with data. Other possible values are:
full– Everything is returned (default)
dataonly– Attributes are excluded from the returned message
serieskeysonly– Only series are returned without observations or attributes. Can be used to list the series matching a query.
nodata– Series and attributes are returned, but no data.
The format parameter is used to specify how the return messages content should be formatted. The default setting is XML (SDMX structure specific).
The format is in beta.
Delimited flat files are configured as:
csv-:-delimiter-use full names-axis for timeDelimiter
The format is in beta.
lastNObservations=1) business day (
B) exchange rate for all currencies(the empty value specifies "all") in JSON format (
format=sdmx-json) from the
EXRdataflow (latest version):
M) exchange rate for Swiss francs (
CHF) and (
+) US dollars (
USD) since 2010 (
startPeriod=2010) as XML (
format=sdmx-compact-2.1) from the
EXRdataflow (latest version).
M) exchange rates for Swiss francs (
CHF) as a comma (
comma) separated file (
csv) with coder enriched with names (
yes) and time period as rows (