Forum Discussion
Import Data from OECD website
- 8 years ago
Please try this URL instead: https://stats.oecd.org/SDMX-JSON/data/CSPCUBE/all?startTime=2011&endTime=2015&dimensionAtObservation=allDimensions
... it looks that omitting all the filter criteria works.
Hi Junaid,
unfortunately the API limits the length of the URL to max. 1000 characters: https://data.oecd.org/api/sdmx-json-documentation/
Please try this URL instead: https://stats.oecd.org/SDMX-JSON/data/CSPCUBE/all?startTime=2011&endTime=2015&dimensionAtObservation=allDimensions
... it looks that omitting all the filter criteria works.
- junaidfrq8 years agoFrequent Visitor
Hi ImkeF,
This worked perfectly.
Thank you so much for your help on this one.
Kind Regards,
Junaid Farooq
- tjo888 months agoNew Member
Just posting a response to this for a related issue I experienced with OECD data.
I was using Web.Contents to retrieve data from a URL for interest rate data that I generated using the OECD Data Explorer tool.
The exact URL generated by the tool is "https://sdmx.oecd.org/public/rest/data/OECD.SDD.STES,DSD_STES@DF_FINMARK,4.0/GBR.M.IRSTCI.PA.....?startPeriod=2009-03&dimensionAtObservation=AllDimensions"
In my Windows 10 implementation the Web.Contents call with this URL works perfectly
In my Windows 11 implementation the Web.Contents call fails with a 422 error
After much tinkering I realised that the "."s at the end of the ticker were being removed during the URL encoding inside Web.Contents.
My workaround was to force Uri.EscapeDataString to encode the ticker and create a URL by splicing the URL together. However, critically, this won't work unless you force the Uri.EscapeDataString to peform encoding by appending a space (" ") after the ticker name. I guess the presence of a special character " " forces this.
The end result is to use the URL below when calling Web.Contents in my PowerQuery
"https://sdmx.oecd.org/public/rest/data/OECD.SDD.STES,DSD_STES@DF_FINMARK,4.0/" &
Uri.EscapeDataString("GBR.M.IRSTCI.PA..... ") &
"?dimensionAtObservation=AllDimensions&format=csvfilewithlabels"
This workaround works for now (I haven't the patience to test if it is backward compatible with Windows 10.
I am posting it here in response to The BIccountants helpful posts on OECD data. I hope someone else finds it useful