Alteryx Designer Desktop Discussions

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

NOAA Weather API URL issues

Liron_A
5 - Atom

Hi everybody,

 

This is my first post, very exciting =) 

I'm trying to get weather data using the NOAA api, but first I wanted to get a list of available cities for each country and I can't seem to come up with the correct URL. 

I was able to retrieve data using the following URL:

 

 https://www.ncdc.noaa.gov/cdo-web/api/v2/locations?datasetid=GHCND&locationcategoryid=CNTRY&limit=10...

 

I got back list of countries in the data set, but when I tried to get list of cities within a country (Austria in this example) using this URL:

 

https://www.ncdc.noaa.gov/cdo-web/api/v2/locations?datasetid=GHCND&locationcategoryid=CNTRY&limit=10...

 

I'm getting {}- empty massage.

 

I was also able to retrieve data for a specific zip code using this URL:

 

https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&datatypeid=TMAX&datatypeid=TMIN&dataty...

 

API documentation: https://www.ncdc.noaa.gov/cdo-web/webservices/v2#locations

 

Not sure what am I missing, I'll really appreciate your help.

 

Thanks!

 

 

 

4 REPLIES 4
PaulN
Alteryx Alumni (Retired)

Hi @Liron_A,

 

Thanks for posting!

 

I have created a token for the API and if I use it with your workflow, I obtain 1000 records for "Download All Cities" and 197 records for "Country" (tested with 2018.3). Were these the results you were expected ?

 

Kind regards,

 

Paul Noirel

Sr Customer Support Engineer, Alteryx

Liron_A
5 - Atom

Hi @PaulN!

 

Thanks for your answer!

 

I was able to obtain the same records as you did, what I wanted to be able to get is a list of cities per selected country. 

Something like this (only this one is not working):

 

https://www.ncdc.noaa.gov/cdo-web/api/v2/locations?datasetid=GHCND&locationcategoryid=CNTRY:austria&limit=1000

 

Thanks!

PaulN
Alteryx Alumni (Retired)

Hi @Liron_A,

 

I have managed to retrieve the stations of Austria using the following (FIPS-AU is the code for Austria):

 

https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?locationid=FIPS:AU&limit=100&sortfield=mindate

 

Happy API testing with Alteryx !

 

Kind regards,

 

Paul Noirel

Sr Customer Engineer, Alteryx

Liron_A
5 - Atom

Hi @PaulN!

 

THANKS A LOT!! that's exactly what I needed!

 

Best,

Liron

Labels