For data-producing organisations like national statistics offices or central banks, SDMX API v2 offers significant advantages across the data lifecycle. In data collection, it enables automated, standardised data exchange with partners. During statistics production, it supports efficient access to metadata and structural definitions, improving data validation and integration. For dissemination, the API allows real-time, user-driven access to datasets and metadata, reducing manual reporting and increasing transparency. Its support for aggregated data and microdata, flexible filtering, and multiple formats (JSON, XML, CSV) makes it ideal for powering dashboards, portals, and third-party integrations—enhancing data accessibility, quality, and timeliness across the organisation.
For data scientists and data users, SDMX API v2 provides seamless access to reliable, trusted datasets from official sources like national statistics offices and central banks. It simplifies data discovery through structured metadata, code lists, and searchable dataflows. Users can programmatically query time-series data, microdata, and metadata using consistent, RESTful endpoints with support for JSON, XML, and CSV formats. Advanced filtering and pagination options enable efficient extraction of relevant data. By automating data retrieval and integrating directly into analysis workflows or dashboards, the SDMX API v2 ensures up-to-date, high-quality data is always accessible—supporting reproducible research, policy analysis, and data-driven decision-making.
In this module, we have reviewed the overall format of SDMX REST API v2and its purpose, along with data queries and structure queries. We also covered how to programmatically connect to:
A few examples of some of the queries we have covered in this module are listed below.
Example 1
List all codelists in the Global Registry (without the codes):
-> Browser
https://registry.sdmx.org/sdmx/v2/structure/codelist/all/all/+/?format=sdmx-3.0&detail=allstubs&prettyPrint=true
-> Curl
curl -X GET "https://registry.sdmx.org/sdmx/v2/structure/codelist/all/all/+/?format=sdmx-3.0&detail=allstubs&prettyPrint=true"
-> Python
import requests
response = requests.get("https://registry.sdmx.org/sdmx/v2/structure/codelist/all/all/+/?format=sdmx-3.0&detail=allstubs&prettyPrint=true")
print (response.text)
NOTE:
XML SDMX 3.0 response: ?format=sdmx-3.0
JSON response, specify: ?format=sdmx-json&version=2.0.0
-> Browser
https://registry.sdmx.org/sdmx/v2/structure/datastructure/UNSD/all/+/?format=sdmx-3.0&references=dataflow&prettyPrint=true
-> Curl
curl -X GET "https://registry.sdmx.org/sdmx/v2/structure/datastructure/UNSD/all/+/?format=sdmx-3.0&references=dataflow&prettyPrint=true"
-> Python
import requests
response = requests.get("https://registry.sdmx.org/sdmx/v2/structure/datastructure/UNSD/all/+/?format=sdmx-3.0&references=dataflow&prettyPrint=true")
print (response.text)
NOTE:
XML SDMX 3.0 response: ?format=sdmx-3.0
JSON response, specify: ?format=sdmx-json&version=2.0.0
-> Browser
https://registry.sdmx.org/sdmx/v2/structure/structure/UNSD/all?format=sdmx-3.0&detail=allstubs&prettyPrint=true
-> Curl
curl -X GET "https://registry.sdmx.org/sdmx/v2/structure/structure/UNSD/all?format=sdmx-3.0&detail=allstubs&prettyPrint=true"
-> Python
import requests
response = requests.get("https://registry.sdmx.org/sdmx/v2/structure/structure/UNSD/all?format=sdmx-3.0&detail=allstubs&prettyPrint=true")
print (response.text)
NOTE:
XML SDMX 3.0 response: ?format=sdmx-3.0
JSON response, specify: ?format=sdmx-json&version=2.0.0
Retrieve all data for dataflow ID WS_XRU and where: Frequency = Quarterly (Q) and Reference area is Australia (AU).
-> Browser
https://stats.bis.org/api/v2/data/dataflow/BIS/WS_XRU/1.0/D.AU..?format=csv
-> Curl
curl -X GET "https://stats.bis.org/api/v2/data/dataflow/BIS/WS_XRU/1.0/D.AU..?format=csv"
-> Python
import requests
response = requests.get("https://stats.bis.org/api/v2/data/dataflow/BIS/WS_XRU/1.0/D.AU..?format=csv")
print (response.text)
NOTE:
XML SDMX 3.0 response: ?format=sdmx-3.0
JSON response, specify: ?format=sdmx-json&version=2.0.0
The following references provide another opportunity to review the module videos and access more details on some of the topics we have covered:
Video 1: Data queries
To access the code presented in this video, click here.
Video 2: Structure queries
To access the code presented in this video, click here.
We welcome feedback on this module. Please send any comments via email to contact.sdmx.io@bis.org.
Need help finding something? I am an AI Assistant that's here to help!
What are you looking for?
By using this AI-powered service ("Service"), you acknowledge and agree to the following:
This Service uses generative AI to assist with statistical analysis and research. While the Service strives to deliver useful information, the output ("Output") may contain inaccuracies, omissions, or biases. The Output is provided for informational purposes only and should not be considered professional advice. You remain responsible for how you interpret and use the Output.
The BIS makes no warranties regarding the accuracy or completeness of the Output and accepts no liability for any loss or damage resulting from its use.
Do not include or share personal, private, confidential or proprietary information when using the Service.
By using this technology, you agree to the Terms and Conditions.
Ask and get clear explanations about SDMX standards.
Find tools and documentation on website quickly.
Ask about API, software and libraries supporting SDMX.
Locate technical guides, specifications, and FAQs.