Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

API for FDIC

WCPete
6 - Meteoroid

Good Day!

 

I am trying to figure out how to use API's in Alteryx.  I have never used an API before so I really don't know where to start.  I did find an example of Udacity (creating and analytical data set), but, the way that was constructed appears different than what I think I need. 

 

This is a lot to ask since I am starting from nothing really. 

 

The API is explained here: https://banks.data.fdic.gov/docs/ 

 

1.  I go to the 'get / summary' and select 'Try it out'. 

2.  I use the parameters that are in the example and select 'execute'. 

3.  This produces two sets of code and I copy the 'Request URL' sample code: https://banks.data.fdic.gov/api/summary?filters=STNAME%3A%22Alabama%22&fields=STNAME%2CYEAR%2CINTINC...

4.  I add it to the text input tool and , add the download tool (and have it read the URL filed, and a browse tool.

5. Unfortunately, this is where I am stuck. 

 

 

Has anyone done this before and do you have resources that have a good example of a working workflow with an API you can share?  

 

Obviously this is a big ask :). 

 

 

 

https://banks.data.fdic.gov/api/summary?filters=STNAME%3A%22Alabama%22&fields=STNAME%2CYEAR%2CINTINC%2CEINTEXP%2CNIM%2CNONII%2CNONIX%2CELNATR%2CITAXR%2CIGLSEC%2CITAX%2CEXTRA%2CNETINC&sort_by=YEAR&sort_order=DESC&limit=10&offset=0&format=json&download=false&filename=data_file

 

4 REPLIES 4
OldDogNewTricks
10 - Fireball

Hopefully this helps.  I used the URL you provided.  The key for me was to uncheck the 'encode URL values' in the download tool.  The download tool is just gathering the data from the URL provided, you still have parse it.  In this case it was pretty easy because it comes in a JSON format and the JSON tool makes quick work of it.

 

FDIC_API_SS.jpg

cadyb
Alteryx
Alteryx

Hi @WCPete, i just took a look at this and all that you need to do is uncheck the box "Encode URL Text" and it now downloads properly. You can add a JSON Parse tool from the developer category to parse the JSON output as well.

 

Cady

WCPete
6 - Meteoroid

Thank you so much for your help!  What an awesome community!

Wolfgang11
5 - Atom

Do you have any code in Python perhaps that utilizes downloading data with the API?

Labels