Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Input data from API

BXG
5 - Atom

Hello,

 

Can you help me understand how to input data from an API call such as https://docs.keywordtool.io/docs/responses?

 

I assume, I need to scrap the API response. Is the Download function involved?

 

Thanks!

Benoit

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

You'll need to plug in a URL into the download tool. Once run you will return a couple of new fields, including "DownloadData", which contains the response. In the case of this API it returns a block of JSON (as seen below), which along with the JSON Parse tool can be turned back into a structured table. Unfortunately it looks as though you need a Google Ad words account to access a key so I can't build out an example for you. However i've attached a workflow with similar steps from downloading data to parsing the returned structured table.

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

neilgallen
12 - Quasar

Hello @BXG!

 

When using an API, the download tool is usually a requirement. The most frequently used version of this is creating a string containing the URL of your API, and then feeding this into the download tool. From there, depending on the type of response (JSON, XML, etc) it will determine the nature of how you manipulate your data.

 

There are other options to get the data from your API like the python or R tool, but the most straight forward version is using the download tool.

 

A simple example with a free API is attached.

BXG
5 - Atom

Thanks for your prompt answer and providing a sample workflow. Great support! Have a nice day.

Labels