Endpoint: places

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.

Use our wizard to try out this endpoint

Supported Actions

The following actions are supported with the places endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an endpoint's detailed documentation for specific information regarding how to use the :id action.
closest The closest action will query the API for data that is closest to the requested place and return the results, if any, in order from closest to farthest. If no limit is provided in the request, then only the closest single result will be returned.

If your request does not return results, you may try setting or increasing the radius being used.
within The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), rectangle (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.
search The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order.

Supported Parameters

The following parameters are optional unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
radius radius=:distance:unit When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "25miles". If no unit is provided, your value is assumed to be in meters by default.

Most endpoints utilize a default radius of 50 miles, though some endpoints, such as lightning, may have tighter restrictions specified.
minradius minradius=:distance:unit When requesting the closest results within a circle, the minradius determines how far from the specified location to search to begin searching results. A valid unit value must be included in your minimum radius value, e.g., "5mi", "10km", or "25miles". If no unit is provided, your value is assumed to be in meters by default.
When combined with the radius parameter, donut style queries can be made for point data, such as lightning.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified. The maximum limit for this endpoint is 250.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
sort sort=:string Used to sort results based on certain fields in the data set. See Sorting for more details.
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.
skip skip=:number Used to skip over a specific number of results in the data set.
format format=:string Defines the API output format. The available options include:
format=json - Standard JSON output. This is the default.
format=geojson - API will output GeoJSON.

If obtaining GeoJSON and using the fields parameter, be sure to include loc to ensure geographical references are available in the response.

Supported Filters

The following filters can be passed to the filter parameter to reduce the results that are returned:

airport Returns all airports, including airbases, airfields and heliports.
amusement Returns all theme and adventure parks.
bridge Returns all structures erected across an obstacle, such as a stream, road, etc., in order to carry roads, rail and pedestrians.
camp Returns all sites occupied by tents, hunts, or other shelters for temporary use.
church Returns all buildings used for public christian worship.
county Returns US counties (Parishes in Louisiana).
divisions Returns smaller US towns, non-incorporation locations such as census divisions.
feature Returns all natural geological features.
fort Returns all defensive structures or earthworks.
golf Returns all golf courses.
lake Returns all lakes, including crater lakes, salt lakes, oxbow lakes and underground lakes.
neighborhood Returns smaller US non-incorporation locations such as census divisions, local areas of a city etc.
parish Alias for the county filter.
park Returns all parks and other areas maintained as a place of recreation.
poi Returns all categories of places across all filters.
port Returns all places that transfer waterborne cargo or passengers, usually in a harbor.
ppl Returns all populated places, including larger cities, towns and smaller locations and neighborhoods.
reserve Returns all tracts of public land reserved for future use or restricted use, including agricultural, forest, hunting, nature, reservation and wildlife.
school Returns all schools, including colleges, military, maritime and technical.
stadium Returns all facilities used for athletic games and spectators.
temple Returns all places used for religious worship.
trail Returns all paths, tracks or routes used by pedestrians, animals, or off-road vehicles.
tunnel Returns all subterranean passageways used for transportation, including natural caves, road and rail passages.
university Returns all institutions for higher learning, including prep schools.
worship Returns all churches and temples.
complex For improved speed the search action does not include the expanded profile information for locations. The complex filter forces the API to return the expanded profile information, though may lead to a slower response.
simple Forces the API to not return the expanded profile information for places, leading to faster responses.

Supported Query Properties

Use the following supported property keys when creating custom queries for your requests:

name Query for a place with the specified name. This queries against the primary name in our database. NOTE: The string to search should be in lowercase.

Example:
/places/search?query=name:austin&limit=10 (returns 10 locations that match the name "Austin")
altname Query for a place based on the primary or alternate names. Useful for locations that may have multiple names such as "dc, washington, washington dc". NOTE: The string to search should be in lowercase.

Example:
/places/search?query=altname:dc&limit=10 (returns 10 locations that match the name "dc")
state Query for a place with the specified state or province two letter abbreviation. This should be used in conjunction with the name property. NOTE: The string to search should be in lowercase.

Example:
/places/search?query=name:austin,state:tx (returns a single location matching the name "Austin" in the state of "TX")
country Query for a place with the specified country two letter abbreviation.. This should be used in conjunction with the name property. NOTE: The string to search should be in lowercase.

Example:
/places/search?query=name:paris,country:fr (returns a single location matching the name "Paris" in the country of "FR")
pop Query for a place based on it's population.

Example:
/places/closest?p=minneapolis,mn&query=pop:75000&limit=10 (returns up to 10 closest locations to Minneapolis that have a population of 75,000 or higher)

Sortable Fields

You can use the following fields to sort data. Review the sorting docs page for more information on the sort functionality.

name Sort by place name.

Example:
/places/closest?p=minneapolis,mn&limit=10&sort=place (returns 10 closest locations to Minneapolis, with the results sorted by place name alphabetically)
pop Sort by place population:

Example:
/places/search?query=state:mn&limit=10&sort=pop:-1 (returns the top 10 locations in Minnesota, by population, sorted descending)

Examples

The /[:endpoint]/[:action]? portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID] and [SECRET] fields which can be found under the Apps section of the members area.

https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]

Return the location closest to the coordinate 42.25N, 95.25W.
/places/closest?p=45.25,-95.25&

Return up to five places within 50 miles of zip code 55403 (Minneapolis). Results will be sorted by distance (ascending) from the specified zip code.
/places/closest?p=55403&limit=5&radius=50mi&

Search for and returns data for Seattle, WA.
/places/search?query=name:seattle,state:wa&

Return up to 10 locations, with a name starting with "seat". The locations will be sorted by population descending.
/places/search?query=name:^seat&limit=10&

Return the location information for Minneapolis,MN
/places/minneapolis,mn?

Return the location information for Paris, France
/places/paris,fr?

Return the location information for Paris, France. Example of using the full country name.
/places/paris,france?

Return the location information for Paris, France. Example using a search action.
/places/search?query=name:paris,country:fr&

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.

Default
GeoJSON

{
    "success": true,
    "error": null,
    "response": {
        "loc": {
            "lat": -7.23333,
            "long": -62.9
        },
        "place": {
            "name": "Sao Paulo",
            "state": "",
            "stateFull": "",
            "country": "BR",
            "countryFull": "Brazil",
            "region": "",
            "regionFull": "",
            "continent": "sa",
            "continentFull": "South America"
        },
        "profile": {
            "elevM": 60,
            "elevFT": 197,
            "pop": null,
            "tz": "America\/Manaus",
            "tzname": "AMT",
            "tzoffset": -14400,
            "isDST": false,
            "wxzone": null,
            "firezone": null,
            "fips": null,
            "countyid": null
        }
    }
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [-62.9, -7.23333]
        },
        "properties": {
            "loc": {
                "lat": -7.23333,
                "long": -62.9
            },
            "place": {
                "name": "Sao Paulo",
                "state": "",
                "stateFull": "",
                "country": "BR",
                "countryFull": "Brazil",
                "region": "",
                "regionFull": "",
                "continent": "sa",
                "continentFull": "South America"
            },
            "profile": {
                "elevM": 60,
                "elevFT": 197,
                "pop": null,
                "tz": "America\/Manaus",
                "tzname": "AMT",
                "tzoffset": -14400,
                "isDST": false,
                "wxzone": null,
                "firezone": null,
                "fips": null,
                "countyid": null
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

profile.pop (number) The .
profile.wxzone (array) Array of public weather zones (US) or Canadian Location Codes (CLCs for Canada) that the location is within. Null if not available
profile.firezone (array) Array of public fire zones (US only) that the location is within. Null if not available
profile.fips (array) Array of county FIPs codes (US only) that the location is within. Null if not available
profile.countyid (array) Array of county codes (US only) that the location is within. NULL if not available
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
place.name (string) The primary name of the location.
place.state (string) The abbreviated state or province for the location.
place.stateFull (string) The full state or province name for the location.
place.country (string) The abbreviated country for the location.
place.countryFull (string) The full country name for the location.
place.region (string) The region for the location (primarily for US-based locations).
place.regionFull (string) The full region name 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.elevM (number) The elevation of the location in meters.
profile.elevFT (number) The elevation of the location in feet.
profile.tz (string) Timezone name of the location.
profile.tzname (string) The timezone abbreviation for the location.
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.

Last modified: October 05, 2022