Locations API Guide

 

Types of Searches:

 

Lists:

 

Location Key:

 

Text:

 

 

Administrative Area List

Returns basic information about administrative areas. May be narrowed by countryCode.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/adminareas/{countryCode}{.{format}}{?apikey={your key}}{&language={languageCode}}{&offset={zero based page number}}

 

Example:

http://api.accuweather.com/locations/v1/adminareas/us?offset=2&apikey={your key}

Top of Page

 

 

 

Administrative Area Search

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/adminareas/{countryCode}/search{.{format}}?q={search text}{&apikey={your key}}{&language={languageCode}}

 

Example:

http://api.accuweather.com/locations/v1/adminareas/US/search?q=pennsylvania&apikey={your key}

Top of Page

 

 

Country List

Returns basic information about countries. May be narrowed by regionCode.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/countries/{regionCode}{.{format}}?{apikey={your key}}{&language= {languageCode}}

 

Example:

http://api.accuweather.com/locations/v1/countries/nam?apikey={your key}

Top of Page

 

 

 

Country Search

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/countries/search{.{format}}?q={search text}{&apikey={your key}}{&language={languageCode}}

 

Example:

http://api.accuweather.com/locations/v1/countries/search?q=España&language=es&apikey={your key}

Top of Page

 

 

Region List

Returns basic information about all regions.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/regions/{regionCode}{.{format}}{?apikey={your key}}{&language={languageCode}}

 

Example:

http://api.accuweather.com/locations/v1/regions.json?apikey={your key}

Top of Page

 

 

Top City List

Returns basic information for the top 50, 100, or 150 cities, worldwide.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/topcities/{group}{.{format}}?apikey={your key}{&language={language code}}{&details={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/topcities/50.json?apikey={your key}

Top of Page

 

 

 

Search by Location Key

Returns information about a specific location, by location key. You must know the location key to perform this query.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/{locationKey}{.{format}}?apikey={your key}{&language={language code}}{&details=true or false}}

 

Example:

http://api.accuweather.com/locations/v1/335315.json?apikey={your key}

Top of Page

 

 

Search City Neighbors by Location Key

Returns information about neighboring cities, by location key. You must know the location key to perform this query.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/cities/neighbors/{locationKey}{.{format}}?apikey={your key} {&language={language code}}{&details={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/cities/neighbors/623.json?apikey={your key}

Top of Page

 

 

City Search

Searches the specified language for the queried city name and returns results in the specified language. Compare this response to the response obtained from the City Search with Translation query for "Roma."

http://{{api} or {{apidev}}.accuweather.com/locations/ {version}/cities/{countryCode}/{adminCode}/search{.{format}}?q={city name}&apikey={your key}{&language={language code}}{&details={true or false}}{&offset={zero based page number}}{&alias={always or never}}

 

Example:

http://api.accuweather.com/locations/v1/cities/search.json?q=roma&apikey={your key}&language=en-us

Top of Page

 

 

City Search with Translation

Searches all languages for the queried city name and returns results in the specified language. Compare this response to the response obtained from the City Search query for "Roma."

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/cities/{countryCode}/{adminCode}/translate{.{format}}?q={city name}&apikey={your key}{&language={language code}}{&details={true or false}}{&offset={zero based page number}}{&alias={always or never}}

 

Examples:

http://api.accuweather.com/locations/v1/cities/translate.json?q=roma&language=en-us&apikey={your key}

Top of Page

 

 

Points of Interest Search

Searches the specified language for the queried point of interest name and returns results in the specified language.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/poi/{countryCode}/{adminCode}/search{.{format}}?q={point of interest}&apikey={your key}{&type={poi type}}{&language={language code}}{&details={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/poi/US/CA/search?q=Disney Studios&apikey={your key}&details=true

Top of Page

 

 

Points of Interest Search with Translation

Searches all languages for the queried point of interest name and returns results in the specified language.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/poi/{countryCode}/{adminCode}/translate{.{format}}?q={point of interest}&apikey={your key}{&type={poi type}}{&language={language code}}{&details={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/poi/translate?q=Disney Studios&apikey={your key}&language=zh-cn

Top of Page

 

 

Postal Code Search

Returns information for an array of postal codes that match the search text.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/postalcodes/{countryCode}/search{.{format}}?q={postal code}{&language={language code}}{&details={true or false}}&apikey={your key}

 

Example:

http://api.accuweather.com/locations/v1/postalcodes/search.json?q=90210&apikey={your key}

Top of Page

 

 

Text Search

Searches the specified language and returns information in the specified language for an array of locations that match the search text. 

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/{countryCode}/{adminCode}/search.{.{format}}?q={search text}&apiKey={your key}{&language={language code}}{&details={true or false}}{&offset={zero based page number}}{&alias={always or never}}

 

Examples:

http://api.accuweather.com/locations/v1/fr/search?q=paris&apikey={your key}&language=fr&details=true

http://api.accuweather.com/locations/v1/search?q=16801&apikey={your key}

Top of Page

 

 

Text Search with Translation

Searches all languages and returns information in the specified languages for an array of locations that match the search text.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/{countryCode}/{adminCode}/translate{.{format}}?q={search text}&apiKey={your key}{&language={language code}}{&details={true or false}}{&offset={zero based page number}}{&alias={always or never}}

 

Examples:

http://api.accuweather.com/locations/v1/translate?q=tokyo&apikey={your key}&language=de

Top of Page

 

 

Autocomplete

Returns basic information about cities matching an autocomplete of the search text.

http://{{api} or {{apidev}}.accuweather.com/locations/ {version}/cities/{countryCode}/autocomplete{.{format}}?q={location}{&apikey={your key}}{&language={language code}}

 

Examples:

http://api.accuweather.com/locations/v1/cities/autocomplete?q=new&apikey={your key}

http://api.accuweather.com/locations/v1/cities/autocomplete.json?q=nue&apikey={your key}&language=es

Top of Page

 

 

Search Cities and Points of Interest by GeoPosition (Latitude and Longitude)

Returns information about a specific location, by Geoposition (latitude and longitude). Response includes Cities and POIs.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/geoposition/search{.{format}}?q={latitude, longitude}&apikey={your key}{&language={language code}}{&details={true or false}}{&toplevel={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/geoposition/search.json?q=40.78, -77.89&apikey={your key}

Top of Page

 

 

Search Cities by GeoPosition (Latitude and Longitude)

Returns information about a specific location, by Geoposition (latitude and longitude). Response includes cities.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/cities/geoposition/search{.{format}}?q={latitude, longitude}&apikey={your key}{&language={language code}}{&details={true or false}}{&toplevel={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/cities/geoposition/search.json?q=40.78, -77.89&apikey={your key}

Top of Page

 

 

Search Points of Interest by GeoPosition (Latitude and Longitude)

Returns information about a specific location, by Geoposition (latitude and longitude). Response includes Points of Interest.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/poi/geoposition/search{.{format}}?q={latitude, longitude}&apikey={your key}{&language={language code}}{&details={true or false}}{&toplevel={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/poi/geoposition/search.json?q=40.78, -77.89&apikey={your key}

Top of Page

 

 

Search by IP Address

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/cities/ipaddress{.{format}}?q={ip address}{&apikey={your key}}{&language={language code}}{&details={true or false}}

 

Example:

http://api.accuweather.com/locations/v1/cities/ipaddress?q=38.103.173.150&apikey={your key}

Top of Page

 

 

Partner ID Search

Returns details about all display partners, or a specific display partner.

http://{{api} or {{apidev}}.accuweather.com/locations/{version}/partners/{partnerID}{.{format}}?apikey={your key}

 

Examples:

http://api.accuweather.com/locations/v1/partners.json?apikey={your key}

http://api.accuweather.com/locations/v1/partners/3.json?apikey={your key}

Top of Page