Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Download data from various APIs

MartinaC
5 - Atom

Dear all,

 

I am a very new user, and i would like to ask help to download data from the European Central Bank website. The APIs would be the following:

 

https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A20.A.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A20.F.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A20.I.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A20.J.R.A.2240.EUR.O

https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A20.K.R.A.2240.EUR.O

https://sdw-wsrest.ecb.europa.eu/service/data/MIR.M.ES.B.A2A.A.R.0.2240.EUR.N

 

I'm running the following workflow:

 

Capture.PNG

 

However, XML Parse indicates "invalid document structure at line:1 and column:1". I would like to obtain a column of data (interest rates) per each URL, and a row per each date observation (months).

 

Could you please explain me how to download data from various websites at the same time in order to build clean databases?

 

Thank you so much!

1 REPLY 1
seven
12 - Quasar

@MartinaC 

Fortunately, you are close to the solution. Read on.

 

These links are not valid endpoints.

seven_2-1589114801189.png

This output can be seen in the Browse tool of your workflow. There is no error in the Download or the Browse because they were able to work successfully to get to the site, just not fetch the data that you wanted. It is a best practice to check the output of each tool before continuing on.

 

Please start with valid endpoints that would work in your browser before you can use them in Alteryx. As you can see, these do not work in my browser.

 

seven_1-1589114473168.png

It turns out that there is a mistake in those endpoints that is easily fixed and I learned this by going through the site documentation.

After the "MIR", there should be a slash, not a period. The endpoints look like this now:

 

https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A20.A.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A20.F.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A20.I.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A20.J.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A20.K.R.A.2240.EUR.O
https://sdw-wsrest.ecb.europa.eu/service/data/MIR/M.ES.B.A2A.A.R.0.2240.EUR.N

 

 

Once these endpoints are pasted into the Text Input tool, the Download tool can properly fetch the data:

 
 

image.pngNow you can connect the XML tool to the output and get this:

 

image.png

 

Please check it and let me know how it goes.

 

Labels