AutoComplete API

Page Contents

Returns a list of locations or hurricanes which match against a partial query. For example, searching for San F will return San Francisco, California, San Fernando del Valle de Catamarca, Argentina, and San Felipe de Puerto Plata, Dominican Republic, among others.

The request options include the ability to query for cities, hurricanes, or both. The results can be used to form Weather API queries or to link directly to wunderground resources.

This feature does not require an API key.

Request Format

GET http://autocomplete.wunderground.com/aq?query=query

Options

query
The search string. Usually a partial location or hurricane name
format
optional
Specifies response format. Possible values: JSON or XML. Default: JSON.
c
optional
Specify country code. Example: c=US
h
optional
Include hurricanes in results: h=1
cities
optional
Include cities in the results. This is the default behavior. To remove cities from results, cities=0
cb
optional
JSONP callback method name

Responses

Using Results

Each autocomplete result object has an l field (short for link) that can be used for constructing wunderground URLs or API calls:

City

http://www.wunderground.com/q/zmw:94125.1.99999

City API Request

http://api.wunderground.com/api/Your_Key/forecast/q/zmw:94125.1.99999.json

Hurricane

http://www.wunderground.com/hurricane/at200511.asp

Fields

name
Name of city or hurricane
type
hurricanes or cityIndicates if item is a hurricane or city.
c
Country (city only)
zmw
(city only)
tz
(city only)
tzs
(city only)
l
URL path and query string for result. This can be used to construct full wunderground URLs and API requests. See Using Results
lat
latitude coordinate (city only)
lon
longitude coordinate (city only)
date
(hurricane only)
strmnum
(hurricane only)
basin
(hurricane only)
damage
(hurricane only)

Examples

Try with Apigee

Note: replace {{key}} with Your_Key

City

{ "RESULTS": [ { "name": "San Francisco, California", "type": "city", "c": "US", "zmw": "94101.1.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:94101.1.99999", "lat": "37.775009", "lon": " -122.418259" }, { "name": "San Fernando del Valle de Catamarca, Argentina", "type": "city", "c": "AR", "zmw": "00000.5.87222", "tz": "America/Argentina/La_Rioja", "tzs": "ART", "l": "/q/zmw:00000.5.87222", "lat": "-28.466667", "lon": " -65.783333" }, { "name": "San Felipe de Puerto Plata, Dominican Republic", "type": "city", "c": "DO", "zmw": "00000.11.78458", "tz": "America/Santo_Domingo", "tzs": "AST", "l": "/q/zmw:00000.11.78458", "lat": "19.799999", "lon": " -70.683334" }, { "name": "San Fernando, Spain", "type": "city", "c": "ES", "zmw": "00000.11.08449", "tz": "Africa/Ceuta", "tzs": "CET", "l": "/q/zmw:00000.11.08449", "lat": "36.466667", "lon": " -6.200000" }, { "name": "San Fernando Apure, Venezuela", "type": "city", "c": "VE", "zmw": "00000.8.80450", "tz": "America/Caracas", "tzs": "VET", "l": "/q/zmw:00000.8.80450", "lat": "7.896667", "lon": " -67.467224" }, { "name": "San Felipe, Venezuela", "type": "city", "c": "VE", "zmw": "00000.8.80479", "tz": "America/Caracas", "tzs": "VET", "l": "/q/zmw:00000.8.80479", "lat": "10.340555", "lon": " -68.737221" }, { "name": "San Felipe, Chile", "type": "city", "c": "CL", "zmw": "00000.16.85574", "tz": "America/Santiago", "tzs": "CLST", "l": "/q/zmw:00000.16.85574", "lat": "-32.750000", "lon": " -70.733330" }, { "name": "San Francisco, Argentina", "type": "city", "c": "AR", "zmw": "00000.6.87371", "tz": "America/Cordoba", "tzs": "ART", "l": "/q/zmw:00000.6.87371", "lat": "-31.433332", "lon": " -62.083332" }, { "name": "San Francisco, Costa Rica", "type": "city", "c": "CR", "zmw": "00000.52.WMRPV", "tz": "America/Costa_Rica", "tzs": "CST", "l": "/q/zmw:00000.52.WMRPV", "lat": "9.983334", "lon": " -84.133331" }, { "name": "San Francisco El Alto, Guatemala", "type": "city", "c": "GT", "zmw": "00000.28.WMGQZ", "tz": "America/Guatemala", "tzs": "CST", "l": "/q/zmw:00000.28.WMGQZ", "lat": "14.950000", "lon": " -91.449997" }, { "name": "San Fernando de Henares, Spain", "type": "city", "c": "ES", "zmw": "00000.12.08221", "tz": "Europe/Madrid", "tzs": "CET", "l": "/q/zmw:00000.12.08221", "lat": "40.433334", "lon": " -3.533333" }, { "name": "San Felipe, Costa Rica", "type": "city", "c": "CR", "zmw": "00000.51.WMRPV", "tz": "America/Costa_Rica", "tzs": "CST", "l": "/q/zmw:00000.51.WMRPV", "lat": "9.900000", "lon": " -84.099998" }, { "name": "San Fernando, California", "type": "city", "c": "US", "zmw": "91340.1.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:91340.1.99999", "lat": "34.286167", "lon": " -118.434586" }, { "name": "San Francisco Acuautla, Mexico", "type": "city", "c": "MX", "zmw": "00000.33.76679", "tz": "America/Mexico_City", "tzs": "CST", "l": "/q/zmw:00000.33.76679", "lat": "19.333334", "lon": " -98.849998" }, { "name": "San Fernando de Monte Cristi, Dominican Republic", "type": "city", "c": "DO", "zmw": "00000.23.78451", "tz": "America/Santo_Domingo", "tzs": "AST", "l": "/q/zmw:00000.23.78451", "lat": "19.866667", "lon": " -71.650002" }, { "name": "San Felice a Cancello, Italy", "type": "city", "c": "IT", "zmw": "00000.97.16289", "tz": "Europe/Rome", "tzs": "CET", "l": "/q/zmw:00000.97.16289", "lat": "41.005814", "lon": " 14.455833" }, { "name": "San Francisco, El Salvador", "type": "city", "c": "SV", "zmw": "00000.22.78670", "tz": "America/El_Salvador", "tzs": "CST", "l": "/q/zmw:00000.22.78670", "lat": "13.700000", "lon": " -88.099998" }, { "name": "San Ferdinando di Puglia, Italy", "type": "city", "c": "IT", "zmw": "00000.20.16261", "tz": "Europe/Rome", "tzs": "CET", "l": "/q/zmw:00000.20.16261", "lat": "41.302631", "lon": " 16.070465" }, { "name": "San Francisco Tlalcilalcalpan, Mexico", "type": "city", "c": "MX", "zmw": "00000.32.76675", "tz": "America/Mexico_City", "tzs": "CST", "l": "/q/zmw:00000.32.76675", "lat": "19.292778", "lon": " -99.777779" }, { "name": "San Felice sul Panaro, Italy", "type": "city", "c": "IT", "zmw": "00000.53.16140", "tz": "Europe/Rome", "tzs": "CET", "l": "/q/zmw:00000.53.16140", "lat": "44.833172", "lon": " 11.142602" } ] }

City with Country Code Filter

{ "RESULTS": [ { "name": "San Francisco, California", "type": "city", "c": "US", "zmw": "94101.1.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:94101.1.99999", "lat": "37.775009", "lon": " -122.418259" }, { "name": "San Fernando, California", "type": "city", "c": "US", "zmw": "91340.1.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:91340.1.99999", "lat": "34.286167", "lon": " -118.434586" }, { "name": "San Felipe Pueblo, New Mexico", "type": "city", "c": "US", "zmw": "87001.2.99999", "tz": "America/Denver", "tzs": "MST", "l": "/q/zmw:87001.2.99999", "lat": "34.433849", "lon": " -106.445999" }, { "name": "San Felipe, California", "type": "city", "c": "US", "zmw": "92086.6.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:92086.6.99999", "lat": "33.298717", "lon": " -116.669777" }, { "name": "San Felipe, Texas", "type": "city", "c": "US", "zmw": "77473.1.99999", "tz": "America/Chicago", "tzs": "CST", "l": "/q/zmw:77473.1.99999", "lat": "29.795528", "lon": " -96.093369" }, { "name": "San Fidel, New Mexico", "type": "city", "c": "US", "zmw": "87049.1.99999", "tz": "America/Denver", "tzs": "MST", "l": "/q/zmw:87049.1.99999", "lat": "35.082409", "lon": " -107.607948" }, { "name": "San Francisco International, California", "type": "city", "c": "US", "zmw": "94128.4.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:94128.4.99999", "lat": "37.618889", "lon": " -122.374725" }, { "name": "San Fransisco, California", "type": "city", "c": "US", "zmw": "94101.2.99999", "tz": "America/Los_Angeles", "tzs": "PST", "l": "/q/zmw:94101.2.99999", "lat": "37.775009", "lon": " -122.418259" }, { "name": "San Felasco Hammock State Preserve, Florida", "type": "city", "c": "US", "zmw": "32653.1.99999", "tz": "US1", "l": "/q/locid:FLSPSF", "lat": "29.730000", "lon": " -82.440002" }, { "name": "San Felipe Country Club, Texas", "type": "city", "c": "US", "zmw": "78840.1.99999", "tz": "US2", "l": "/q/locid:1037280", "lat": "29.370001", "lon": " -100.889999" }, { "name": "San Felipe De Neri School, New Mexico", "type": "city", "c": "US", "zmw": "87104.1.99999", "tz": "US3", "l": "/q/locid:00909106", "lat": "35.090000", "lon": " -106.669998" }, { "name": "San Felipe Middle School, Texas", "type": "city", "c": "US", "zmw": "78840.1.99999", "tz": "US2", "l": "/q/locid:7884204443", "lat": "29.379999", "lon": " -100.919998" }, { "name": "San Felipe Pueblo Elementary School, New Mexico", "type": "city", "c": "US", "zmw": "87001.1.99999", "tz": "US3", "l": "/q/locid:8700100158", "lat": "35.470001", "lon": " -106.610001" }, { "name": "San Fernando Colonia, Texas", "type": "city", "c": "US", "zmw": "78582.1.99999", "tz": "MH1", "l": "/q/locid:USTX5919", "lat": "26.410000", "lon": " -98.839996" }, { "name": "San Fernando Elementary School, Arizona", "type": "city", "c": "US", "zmw": "85736.1.99999", "tz": "US3A", "l": "/q/locid:8563300630", "lat": "31.790001", "lon": " -111.449997" }, { "name": "San Fernando Elementary School, California", "type": "city", "c": "US", "zmw": "91340.1.99999", "tz": "US4", "l": "/q/locid:9134003323", "lat": "34.279999", "lon": " -118.449997" }, { "name": "San Fernando Middle School, California", "type": "city", "c": "US", "zmw": "91340.1.99999", "tz": "US4", "l": "/q/locid:9134003324", "lat": "34.279999", "lon": " -118.440002" }, { "name": "San Fernando Rd / Ronald Reagan Frwy, California", "type": "city", "c": "US", "zmw": "91331.1.99999", "tz": "US4", "l": "/q/locid:29796", "lat": "34.270000", "lon": " -118.430000" }, { "name": "San Fernando Senior High School, California", "type": "city", "c": "US", "zmw": "91340.1.99999", "tz": "US4", "l": "/q/locid:9134003325", "lat": "34.270000", "lon": " -118.440002" }, { "name": "San Fernando Valley Academy, California", "type": "city", "c": "US", "zmw": "91325.1.99999", "tz": "US4", "l": "/q/locid:AA890090", "lat": "34.250000", "lon": " -118.519997" } ] }

Hurricanes without Cities

{ "RESULTS": [{ "name": "Katrina, Major Hurricane - Atlantic, 2005", "type": "hurricanes", "date": "8/23/2005", "strmnum": "11", "basin": "at", "damage": "108000", "l": "/hurricane/at200511.asp" }, { "name": "Katie, Major Hurricane - Atlantic, 1955", "type": "hurricanes", "date": "10/14/1955", "strmnum": "12", "basin": "at", "damage": "0", "l": "/hurricane/at195512.asp" }, { "name": "Kate, Major Hurricane - Atlantic, 1985", "type": "hurricanes", "date": "11/15/1985", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at198511.asp" }, { "name": "Katrina, Hurricane - Atlantic, 1981", "type": "hurricanes", "date": "11/3/1981", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at198111.asp" }, { "name": "Kate, Major Hurricane - Atlantic, 2003", "type": "hurricanes", "date": "9/25/2003", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at200311.asp" }, { "name": "Katia, Hurricane - Atlantic, 2011", "type": "hurricanes", "date": "-1/-1/2011", "strmnum": "12", "basin": "at", "damage": "0", "l": "/hurricane/at201112.asp" }, { "name": "Katrina, Tropical Storm - Atlantic, 1999", "type": "hurricanes", "date": "10/28/1999", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at199911.asp" }, { "name": "Kate, Hurricane - Eastern Pacific, 1976", "type": "hurricanes", "date": "9/21/1976", "strmnum": "16", "basin": "ep", "damage": "-1", "l": "/hurricane/ep197616.asp" }, { "name": "Kate, Hurricane - Western Pacific, 1951", "type": "hurricanes", "date": "6/25/1951", "strmnum": "8", "basin": "wp", "damage": "-1", "l": "/hurricane/wp19518.asp" }, { "name": "Kate, Hurricane - Western Pacific, 1955", "type": "hurricanes", "date": "9/16/1955", "strmnum": "28", "basin": "wp", "damage": "-1", "l": "/hurricane/wp195528.asp" }, { "name": "Kate, Hurricane - Western Pacific, 1962", "type": "hurricanes", "date": "7/16/1962", "strmnum": "9", "basin": "wp", "damage": "-1", "l": "/hurricane/wp19629.asp" }, { "name": "Kate, Hurricane - Western Pacific, 1964", "type": "hurricanes", "date": "11/10/1964", "strmnum": "44", "basin": "wp", "damage": "-1", "l": "/hurricane/wp196444.asp" }, { "name": "Kate, Hurricane - Western Pacific, 1970", "type": "hurricanes", "date": "10/13/1970", "strmnum": "44", "basin": "wp", "damage": "-1", "l": "/hurricane/wp197044.asp" }, { "name": "Kate, Tropical Depression - Western Pacific, 1959", "type": "hurricanes", "date": "8/24/1959", "strmnum": "13", "basin": "wp", "damage": "-1", "l": "/hurricane/wp195913.asp" }, { "name": "Kate, Tropical Storm - Western Pacific, 1967", "type": "hurricanes", "date": "8/16/1967", "strmnum": "25", "basin": "wp", "damage": "-1", "l": "/hurricane/wp196725.asp" }, { "name": "Kate, Tropical Storm - Western Pacific, 1973", "type": "hurricanes", "date": "8/20/1973", "strmnum": "13", "basin": "wp", "damage": "-1", "l": "/hurricane/wp197313.asp" }, { "name": "Kate, Tropical Storm - Western Pacific, 1999", "type": "hurricanes", "date": "4/21/1999", "strmnum": "4", "basin": "wp", "damage": "-1", "l": "/hurricane/wp19994.asp" }, { "name": "Katherine, Hurricane - Eastern Pacific, 1973", "type": "hurricanes", "date": "9/29/1973", "strmnum": "11", "basin": "ep", "damage": "-1", "l": "/hurricane/ep197311.asp" }, { "name": "Kathleen, Hurricane - Eastern Pacific, 1976", "type": "hurricanes", "date": "9/7/1976", "strmnum": "15", "basin": "ep", "damage": "-1", "l": "/hurricane/ep197615.asp" }, { "name": "Kathleen, Tropical Storm - Eastern Pacific, 1961", "type": "hurricanes", "date": "7/14/1961", "strmnum": "4", "basin": "ep", "damage": "-1", "l": "/hurricane/ep19614.asp" }] }

Hurricanes with Cities

{ "RESULTS": [{ "name": "Katrineholm, Sweden", "type": "city", "c": "SE", "zmw": "00000.3.02476", "tz": "Europe/Stockholm", "tzs": "CEST", "l": "/q/zmw:00000.3.02476" }, { "name": "Katra, India", "type": "city", "c": "IN", "zmw": "00000.10.42056", "tz": "Asia/Kolkata", "tzs": "IST", "l": "/q/zmw:00000.10.42056" }, { "name": "Katras, India", "type": "city", "c": "IN", "zmw": "00000.14.42703", "tz": "Asia/Kolkata", "tzs": "IST", "l": "/q/zmw:00000.14.42703" }, { "name": "Katrina, Major Hurricane - Atlantic, 2005", "type": "hurricanes", "date": "8/23/2005", "strmnum": "11", "basin": "at", "damage": "108000", "l": "/hurricane/at200511.asp" }, { "name": "Katrina, Hurricane - Atlantic, 1981", "type": "hurricanes", "date": "11/3/1981", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at198111.asp" }, { "name": "Katrina, Tropical Storm - Atlantic, 1999", "type": "hurricanes", "date": "10/28/1999", "strmnum": "11", "basin": "at", "damage": "0", "l": "/hurricane/at199911.asp" }, { "name": "Katrina, Hurricane - Eastern Pacific, 1967", "type": "hurricanes", "date": "8/30/1967", "strmnum": "12", "basin": "ep", "damage": "-1", "l": "/hurricane/ep196712.asp" }, { "name": "Katrina, Hurricane - Eastern Pacific, 1975", "type": "hurricanes", "date": "8/28/1975", "strmnum": "12", "basin": "ep", "damage": "-1", "l": "/hurricane/ep197512.asp" }, { "name": "Katrina, Tropical Storm - Eastern Pacific, 1971", "type": "hurricanes", "date": "8/8/1971", "strmnum": "12", "basin": "ep", "damage": "-1", "l": "/hurricane/ep197112.asp" }] }