Places

Places

URL Path
https://data.api.xweather.com/places/
Data Coverage
Global
Update Interval
Monthly
Time Range
N/A

The places dataset provides the core data for geographical locations, including cities, reporting stations, airports, points of interest (POI), and more. This is typically the first request that is made for every other weather-related request.

Requests

Every request to the endpoint must include one of the supported actions in the url.

https://data.api.xweather.com/places/{action}?client_id={client_id}&client_secret={client_secret}&{params}

Supported Actions

The following actions are supported with the /places endpoint:

ActionDescription
:idType: stringTypically used for passing a geographical location name or identifier such as city name, lat/long, or even US and Canadian postal codes. Learn more.
closestType: stringBased on a location search, the results will be returned in order from closest to farthest. Learn more.
withinType: stringUses a circle or polygon, define an area to search for results. Learn more.
searchType: stringA generalized action that is determined with the endpoints query parameters. Learn more.

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.

Properties

loc (object)

The location of the record.

loc.lat (number)

The latitude coordinate of the record.

loc.long (number)

The place or nearest place to the record.

place (object)

Object containing information about the place or nearest place to the record.

place.name (string)

The place or nearest place to the record.

place.state (string)

The state abbreviation in which the response is located. This may be null or an empty string depending on the country.

place.stateFull (string)

place.country (string)

The 2 letter ISO-3166 country abbreviation in which the response is located.

place.countryFull (string)

The full state or province name for the location.

place.region (string)

The region for the location (primarily for US-based locations).

place.regionFull (string)

The full region for the location (primarily for US-based locations).

place.continent (string)

The continent abbreviation the location belongs to.

place.continentFull (string)

The full name of the continent the location belongs to.

profile (object)

Object containing information about the location or event.

profile.elevM (number)

The elevation of the location in meters.

profile.elevFT (number)

The elevation of the location in feet.

profile.pop (number)

The estimated population of the location.

profile.tz (string)

Timezone name of the location, such as America/New_York.

profile.tzname (string)

The timezone abbreviation for the location, such as EST.

profile.tzoffset (number)

The timezone offset for the location in seconds.

profile.isDST (boolean)

True if the location is currently observing Daylight Savings Time (DST), otherwise false.

profile.wxzone (array)

Array of weather zones for the location. Null or empty if unavailable.

profile.firezone (array)

Array of NOAA fire zones for the location. Null or empty if unavailable.

profile.fips (array)

Array of FIPS codes for the location. US Only. Null or empty if unavailable.

profile.countyid (array)

Array of NOAA county IDs for the location. US Only. Null or empty if unavailable.

profile.code (string)

Location code, based on GeoNames place codes.

{
  "loc": {
    "lat": 44.97997,
    "long": -93.26384
  },
  "place": {
    "name": "Minneapolis",
    "state": "MN",
    "stateFull": "Minnesota",
    "country": "US",
    "countryFull": "United States",
    "region": "usnc",
    "regionFull": "North Central",
    "continent": "na",
    "continentFull": "North America"
  },
  "profile": {
    "elevM": 253,
    "elevFT": 830,
    "pop": 410939,
    "tz": "America/Chicago",
    "tzname": "CST",
    "tzoffset": -21600,
    "isDST": false,
    "wxzone": [
      "MNZ060"
    ],
    "firezone": [
      "MNZ060"
    ],
    "fips": [
      "27053"
    ],
    "countyid": [
      "MNC053"
    ],
    "code": "ppla2"
  }
}