Data
Basics
All the data stored in the ECB Data Portal can be retrieved using the query string below
protocol :// wsEntryPoint / resource / flowRef / key ? parameters |
where parameters
are defined as such:
startPeriod = value & endPeriod = value & updatedAfter = value & firstNObservations = value & lastNObservations = value & detail = value & includeHistory = value |
Syntax definition
As of 28 January 2021 the web service is only available over https . http calls made via a browser will be automatically redirected to https . |
The web service entry point is available at the following location: https://data-api.ecb.europa.eu/ |
The resource for data queries is data . |
A reference to the dataflow describing the data that needs to be returned. The syntax is the For example: If the parameter contains only one of these three elements, it is considered to be the identifier of the dataflow. The value for the identifier of the agency maintaining the dataflow will default to If the string contains only two of these three elements, they are the identifier of the agency maintaining the dataflow and the identifier of the dataflow. The value for the dataflow version will default to In order to see the dataflows available in the ECB Data Portal, a metadata query for all dataflows can be performed: |
As explained in the Overview section, the combination of Dimensions allows statistical data to be uniquely identified. In SDMX, such a combination is known as a Series key, and this is what needs to be input for the For example, let’s say that exchange rates can be uniquely identified by the following:
To build the Series key, take the value for each of the Dimensions (following the order in which the Dimensions are defined in the DSD) and join them with a dot ( Wildcarding is supported by omitting the value for the Dimension to be wildcarded. For example, the following Series key can be used to retrieve the data for all daily currencies against the euro: The You can combine wildcarding and the |
It is possible to define a date range for which Observations are to be returned by using the startPeriod and/or endPeriod parameters. The values should be given according to the syntax defined in ISO 8601 or as SDMX reporting periods. The format will vary depending on the frequency. The supported formats are:
|
By supplying a percent-encoded ISO 8601 timestamp for the This will include:
For example, the percent-encoded representation for Developers who update their local databases with data stored in the ECB Data Portal should make use of the Should you not be able to handle updates and revisions, or if you would prefer to perform a full refresh of your local database when something has changed, you can use an |
Using the
|
Using the firstNObservations and/or lastNObservations parameters, it is possible to specify the maximum number of Observations to be returned for each of the matching Time series, starting from the first Observation (firstNObservations ) or counting back from the most recent Observation (lastNObservations ). |
Using the
|
Using the
|
Examples
Please refer to the Useful tips section to see examples of these queries with command line tools such as curl
or wget
.
https://data-api.ecb.europa.eu/service/data/EXR/M.USD.EUR.SP00.A |
https://data-api.ecb.europa.eu/service/data/EXR/M..EUR.SP00.A |
https://data-api.ecb.europa.eu/service/data/EXR/M.USD+GBP+JPY.EUR.SP00.A?updatedAfter=2009-05-15T14%3A15%3A00%2B01%3A00 |
https://data-api.ecb.europa.eu/service/data/EXR/D.USD.EUR.SP00.A?startPeriod=2009-05-01&endPeriod=2009-05-31 |
https://data-api.ecb.europa.eu/service/data/EXR |
https://data-api.ecb.europa.eu/service/data/EXR/M.USD.EUR.SP00.A?format=csvdata |