- How do I save my queries for later use?
- Why are some selection options greyed out in the filter menu?
- Why are data file downloads via the browser and API limited to 60 per hour?
- How do I extract data via API using R or Python?
- How can the OECD Data Explorer datasets be cited in a publication?
- How do I find the dataset that I used to access in OECD.Stat in OECD Data Explorer?
- After the migration from OECD.Stat, my API queries no longer work, what do I do?
- Why did you migrate from OECD.Stat (the OECD's data dissemination platform until July 2024) to OECD Data Explorer?
—————
1. How do I save my queries for later use?
- Customise the data selection as needed via the Refine your data selection menu on the left hand side of the screen
- Bookmark the generated URL in your web browser
NB: In order to always access the most updated version of the data, you will need to remove the version parameter from your bookmarked URL. To do so:
- From your browser's address bar, copy the URL of your data selection and paste it into any text editor (e.g. Notepad, Word, etc.). You will see that the URL is long and contains many parameters.
- Locate the version parameter &df[vs]=1.0 (or another version number, e.g. &df[vs]=2.1) .
- Delete the version parameter, ensuring that the remaining URL structure is intact.
- Copy the version-free URL into the browser and bookmark it.
2. Why are some selection options greyed out in the filter menu?
When a filter item appears greyed out in OECD Data Explorer, it means that no data is available for the current combination of filters. These filters (such as Reference area, Time period, or other variables) may have been selected by you or applied by default.
- Clear all existing filters in the filter panel (Clear all button is above the data table, in the applied filters summary section)
- Start a new filtering sequence by selecting the desired variable first.
- Once the desired variable is selected, add the other filters step by step (such as Reference Area or Time period).
If some needed items (for example, certain countries) still appear greyed out, this means that data for the selected measure is not available for those specific selection options.
3. Why are data downloads via the browser and API limited to 60 queries per hour?
The measures to protect the OECD Data Explorer network are designed to ensure fair and stable access for all users.
The API Best Practices and Recommendations offer several useful strategies to optimise queries. For example, querying the availability constraints allows to check which datasets have been updated, so that requests can be limited to data that have changed since your last sync. Given that most OECD datasets are updated infrequently, many annually, some monthly, and only a few (such as short-term economic indicators) on a daily basis, efficient querying strategies can significantly reduce the need for repeated large-scale downloads.
Please also note that the OECD is working towards relaxing these restrictions. This will become possible once we upgrade our infrastructure to better handle higher loads and concurrency.
4. How do I extract data via API using R or Python?
- R Example: Download CSV Data from API
This example shows how to download and read a CSV file as a DataFrame in R, including labels and Series IDs, directly from the API.
url= "https://sdmx.oecd.org/public/rest/data/OECD.SDD.STES,DSD_STES@DF_CLI/.M.LI...AA...H?startPeriod=2023-02&dimensionAtObservation=AllDimensions&format=csvfilewithlabels"
df<-read.csv(url)
- Python Example: Download CSV Data from API
This example shows how to download and read a CSV file as a DataFrame in Python, including labels and Series IDs, directly from the API.
import requests
import pandas as pd
from io import StringIO
# Define API query URL (CSV with labels format)
url = "https://sdmx.oecd.org/public/rest/data/OECD.SDD.STES,DSD_STES@DF_CLI/.M.LI...AA...H?startPeriod=2023-02&dimensionAtObservation=AllDimensions&format=csvfilewithlabels"
# Fetch data
response = requests.get(url)
# Load into pandas DataFrame
df = pd.read_csv(StringIO(response.text))
# Display first few rows
print(df.head())
Learn more about downloading data via the API
5. How can the OECD Data Explorer datasets be cited in a publication?
The OECD Data Explorer does not have a built-in citation functionality.
However, to make it easier to reference data in your work, a short URL that links directly to the concerned query can be generated. Here's how:
- Create a MyOECD account: Sign up here.
- Log in to the OECD Data Explorer: Click on the avatar icon and log in using your MyOECD credentials.
- Generate a short URL: After completing your data selection, click the Share icon at the top of the data table, then select Generate short URL. If you want readers to always access the latest version of the data, remember to remove the version parameter (see Question 1 above). Make sure to copy and safely store the URL, as it cannot be retrieved later from your MyOECD account.
6. How do I find the dataset that I used to access in OECD.Stat in OECD Data Explorer?
A complete list of the migrated dataset can be found this Excel file. The file has two tabs: one for currently updated datasets ("CurrentMappingDatasets") and another for archived datasets ("CurrentMappingArchive").
7. After the migration from OECD.Stat, my API queries no longer work, what do I do?
On July 1st, 2024, the OECD.Stat servers (the former OECD data dissemination platform) were taken offline, meaning queries to http://stats.oecd.org no longer work. Please refer to this document to update your API queries. A mapping of all OECD.Stat datasets to their corresponding OECD Data Explorer versions is available here.
8. Why did you migrate from OECD.Stat (the OECD's data dissemination platform until July 2024) to OECD Data Explorer?
We transitioned from OECD.Stat to the OECD Data Explorer in an effort to improve usability. Many users found the previous platform challenging to navigate and had difficulties mastering excessive features, making it harder to find, understand and use the data for which they were looking. The new platform, built with SDMX standards, offers a more intuitive design focusing on search, while maintaining key functionalities. For more details, you can read about the background and main objectives here.