For this blog I’m going to show you how to use API’s in Alteryx. API’s are a powerful way to gather data from the internet and there are several websites which store 1000s of API’s for anyone to access. One of my earlier blogs showcased a Star Wars Dashboard that I created, all the data on that Dashboard came from the star wars API found here. So here I will show you the Alteryx workflows I used before creating the Dashboard.

For this workflow I specifically looked at the films API from the website, which gathered me a large range of information regarding each film. The first step is to go to the website and grab the URL for the API I wanted to use (in this case films), and put that URL into a text input tool.

Second, we grab the Download tool which will download all the data from that API using the URL. As we select the column we wish to download (URL). We now have a DownloadData and DownloadHeaders column, which we need to parse.

We parse this by using the JSON parse tool, which is a simple yet powerful tool. All we need to do is select the field which contains all the data (in this case the DownloadData column) and it will bring out the information in two new columns. The JSON_Name column are the headers for the data, while JSON_ValueString is the data itself.

Next we need a text to columns tool to get our headers out from each column, as shown in the example below.

Finally, after a bit of cleaning, we can now cross tab the data to give us the clean data we need to create a dashboard. The cross tab tool takes the data from this…

To a nicer horizontal dataset ready to use

We’re now ready to create a fun and exciting Star Wars movie Dashboard!

 

Zack Hawkins
Author: Zack Hawkins