Indices for health and outdoor activities as based on common weather observations and forecasts.
Use our wizard to try out this endpoint
The following types are supported with the indices endpoint:
arthritis | Returns index on how current and forecast weather conditions may affect people with arthritis. |
coldflu | Returns index on how current and forecast weather conditions may relate to catching a cold or flu. |
migraine | Returns index on how current and forecast weather conditions may affect migraines. |
sinus | Returns index on how current and forecast weather conditions may affect sinus headaches. |
outdoors | Returns index on how current and forecast weather conditions are conducive to general outdoor activities. |
golf | Returns index on how current and forecast weather conditions are conducive to golfing. |
biking | Returns index on how current and forecast weather conditions are conducive to biking. |
swimming | Returns index on how current and forecast weather conditions are conducive to swimming. |
campfires | Returns index on how current and forecast weather conditions are conducive to campfires and/or grilling. |
bees | Returns index on how current and forecast weather conditions as related to bees being active. |
The following actions are supported with the indices 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. |
route | The route action returns data for points along a given route. This can be useful to obtain weather information along a transportation route, trails and more. The route is a series of locations, usually latitude/longitudes provided via the p query parameter or for longer routes via GeoJSON within a POST request. The route will return an array of GeoJSON points with the requested data for each point. |
The following parameters are optional unless otherwise noted:
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. |
from | from=:string |
Returns the results starting from the value specified. For best practices we recommend using the to parameter as well to define a specific time frame.Supports a UNIX timestamp or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: from=tomorrow from=friday from=1302883980 from=MM/DD/YYYY from=YYYY/MM/DD from=+2hours from=2017-02-27 5:00 PM |
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. |
p | p=:place |
Defines the location to query data for. Refer to the list of supported place value formats. |
plimit | plimit=:total |
Applied only on the periods property, the total number of periods to return as an integer. The maximum plimit for this endpoint is 250. |
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. |
to | to=:string |
Returns the results between now and the value specified. For best practices we recommend using the from parameter as well to define a specific time frame. When used in conjunction with the from parameter, the value of to will be relative to the value of from, not relative to the current time. Supports a UNIX timestamp or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: to=+6hours to=+5days to=1302883980 to=MM/DD/YYYY to=YYYY/MM/DD to=2017-02-27 5:00 PM |
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. |
mindist | mindist=:distance:unit |
When using the route action, mindist determines the minimum distance along the route to return the requested data for. A valid unit value must be included in your mindist value, e.g. "5mi", "10km", "50miles". If no unit is provided, your value is assumed to be in meters by default. The default minimum distance between route data is 5 miles if not specified. |
The following filters can be passed to the filter parameter to reduce the results that are returned:
day | Use day only forecast periods. Example: Monday, Tuesday, Wednesday |
daynight | Use day and night forecast periods. Example: Monday, Monday Night, Tuesday, Tuesday Night |
#hr | Use interval based forecast. For hourly use '1hr'. Only supported if your subscription supports hourly/interval based forecasts. |
allstations | Use all available observation stations for the current index value |
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]
Provide the migraine index based on the latest observation./indices/migraine/55403?
Provide the migraine index based on the latest observation, and for the next 5 days./indices/migraine/55403?to=+5days&
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.
{
"success": true,
"error": null,
"response": [{
"loc": {
"lat": -33.92584,
"long": 18.42322
},
"indice": {
"type": "migraine",
"range": {
"min": 1,
"max": 5,
"reverse": true
},
"past": null,
"current": {
"timestamp": 1528304400,
"dateTimeISO": "2018-06-06T19:00:00+02:00",
"index": 1,
"indexENG": "minimal"
},
"forecast": null
},
"place": {
"name": "cape town",
"state": "",
"country": "za"
},
"profile": {
"tz": "Africa\/Johannesburg"
}
}]
}
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [18.42322, -33.92584]
},
"properties": {
"loc": {
"lat": -33.92584,
"long": 18.42322
},
"indice": {
"type": "migraine",
"range": {
"min": 1,
"max": 5,
"reverse": true
},
"past": null,
"current": {
"timestamp": 1528304400,
"dateTimeISO": "2018-06-06T19:00:00+02:00",
"index": 1,
"indexENG": "minimal"
},
"forecast": null
},
"place": {
"name": "cape town",
"state": "",
"country": "za"
},
"profile": {
"tz": "Africa\/Johannesburg"
}
}
}]
}
The following properties will be provided in every response object:
Last modified: August 22, 2022