Location API Parameters


Request parameters | Response parameters


Location API Query String Parameters

Parameter Description Default value
api Hostname to be used only in production: api.accuweather.com N/A Required
apidev Hostname to be used only in development: apidev.accuweather.com N/A Required
apikey Unique code used to access the API N/A Required
version Current version of the API v1 Required
q Text to match N/A Required
locationkey Unique ID used to search for a specific location N/A Required
format Format of the response JSON Optional
language String indicating the language in which to return the resource en-us Optional
countryCode Unique country code ID No filter Optional
adminCode Unique administrative area ID No filter Optional
details Boolean value specifies whether or not to include AccuWeather related details with the location False Optional
alias Enumeration that specifies when the alias locations should be included in the results. By default, an alias will only be returned if no official match was found.  Enumeration values: Never or Always NoOfficialMatchFound Optional
includeAliases Boolean value that will return alias location results when true. False Optional
offset When used, offset determines the first result to return. Results will be returned in sets of 25. Offset=0 will return the first 25 results, Offset=1 will return the second 25 results, etc. 0 Optional
group Integer indicates the number of cities to return with the request.  Current supported values are 50, 100, and 150. N/A Required
type Specific type of point of interest (Only use for point of interest searches) No filter Optional
partnerID Unique partner ID number that identifies a display partner for the Designated Marketing Area (DMA). Language dependent. Null Optional
toplevel Used for GeoPosition searches. When toplevel=true for lat/lon searches, the city with the highest rank will be returned. Large cities have higher rank than the neighborhoods within them, so toplevel=true delivers a more generic location result. (Example: 40.73,-74.00 returns Greenwich Village, NY when toplevel=false. If toplevel=true, the same lat/lon pair will return New York, NY.) False Optional

Top of Page


Location API Response Parameters

Parameter Description
Version Current version of the API
Key Unique ID to search a location
Type Location type such as City, PostalCode, POI or LatLong
Rank Number applied to locations set by factors such as population, political importance, and geographic size
LocalizedName Display name in local dialect set with language code in URL. Default is US English (us-en)
EnglishName Location name as displayed in English
PrimaryPostalCode Official postal code provided by our main location data provider for the requested location
IsAlias “True” or “false” verification of whether a location is an “alias” or an alternative name or spelling for a requested location
ParentCity This object will be displayed only if the location is part of a larger metropolitan area or parent city.
DataSets Array of location-specific products that are available for this location. Products include Alerts, PremiumAirQuality, AirQuality, MinuteCast, and ForecastConfidence. If no location-specific products are available, the array will be empty.
Details AccuWeather related details about the specific location

Top of Page