Locations API Parameters

Request parameters | Response parameters

Location API query string parameters

ParameterDescriptionDefault value
api Hostname for use in production applications: api.accuweather.com. N/A Required
apidev Hostname for use in development applications: 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

ParameterDescription
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
Region
ID Unique region code for location
LocalizedName Region name displayed in the local dialect set with the language code in the URL. If no language code is selected, the default is US English (us-en)
EnglishName Region name displayed in English
Country
ID Unique ISO or Microsoft Localization Code for the country
LocalizedName Country name as displayed in the local dialect set with language code in the URL. If no language code is selected, the default is US English (us-en)
EnglishName Country name displayed in English
AdministrativeArea
ID Unique administrative area ID
LocalizedName Administrative area name as displayed in local dialect set with language code in the URL. If no language code is selected, the default is English
EnglishName Administrative area name displayed in English
Level An assigned number to describe the scale of the administrative subdivisions for countries. As the Level number increases, the scale of the subdivision will decrease. Numbers of 10 or greater are reserved for non-political boundaries and should be used independently
LocalizedType Administrative Area type displayed in the local dialect set with the language code in the URL. Default is US English (en-us).
EnglishType Administrative Area type displayed in English.
CountryID Unique ISO or Microsoft Localization Code for the country that contains the AdministrativeArea.
TimeZone
Code Official abbreviation code for designated Time Zone
Name Official name of designated Time Zone
GmtOffset Number of hours offset from local GMT time
IsDaylightSaving A “true” or “false” verification of whether a location is currently observing Day Light Saving time
NextOffsetChange Next time that daylight saving time changes
GeoPosition
Latitude Geographical coordinate that specifies the north-south position of a point on the Earth’s surface
Longitude Geographical coordinate that specifies the east-west position of a point on the Earth’s surface
Elevation
Metric m
Value Rounded value of elevation in above units
Unit Type of unit for the elevation value above
UnitType Numeric ID associated with the type of unit being displayed.
Imperial ft
Value Rounded value of elevation in above units
Unit Type of unit for the elevation value above
UnitType Numeric ID associated with the type of unit being displayed.
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.
Key Parent city location key.
LocalizedName Parent city name as displayed in local dialect set with language code in the URL. If no language code is selected, the default is English
EnglishName Parent city name displayed in English
SupplementalAdminAreas
Level An assigned number to describe the scale of the administrative subdivisions for countries. As the Level number increases, the scale of the subdivision will decrease. Numbers of 10 or greater are reserved for non-political boundaries and should be used independently
LocalizedName Administrative area name as displayed in local dialect set with language code in the URL. If no language code is selected, the default is English
EnglishName Administrative area name displayed in English
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
Key Unique ID to identify a location.
StationCode Weather station code of the location.
StationGmtOffset GMT offset of the weather station.
BandMap Temperature and precipitation band map code.
Climo Source of climatology data for the location.
LocalRadar Local radar code associated with the location.
MediaRegion Media region associated with the location.
Metar Metar station of the location.
NXMetro City level radar code.
NXState State level radar code.
Population Reported population of the location.
PrimaryWarningCountyCode Primary warning county code.
PrimaryWarningZoneCode Primary warning zone code.
Satellite Satellite associated with the location.
Synoptic Synoptic station associated with the location.
MarineStation Marine station code.
MarineStationGMTOffset GMT offset of the marine station.
VideoCode Code that identifies city or region for video.
LocationStem Country ID/location name/postal code or Country ID/location name/Location Key when the location does not have a postal code. For AccuWeather internal use only.
DMA Designated Marketing Area
ID Numeric id to identify the marketing area.
EnglishName Name of the Designated Marketing Area.
PartnerID Unique number that identifies a display partner for the Designated Marketing Area (DMA). Language dependent.
Sources Official sources of data by type
DataType The type of data the source provides.
Source Name of the data provider.
SourceId Id associated with the source. Can be used as a key.
CanonicalPostalCode Optimized postal code which may be the postal code of the location or a nearby metropolitan area. May be empty.
CanonicalLocationKey Optimized locationKey which may be the locationKey of the location or a nearby metropolitan area. May be empty.

Top of page