Endpoint: indices

Indices for health and outdoor activities as based on common weather observations and forecasts.

Use our wizard to try out this endpoint

Supported Indice Types

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.

Supported Actions

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.

Supported Parameters

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.

Supported Filters

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

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]

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&

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": -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"
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

indice.type (string) Type of indice
indice.range (object) Object containing the indice range information.
indice.range.min (number) The minimum indice value.
indice.range.max (number) The maximum indice value
indice.range.reverse (boolean) Flag determining order of the indice.
indice.current (object) Object containing the indice based on the latest observation. Null if unavailable.
indice.current.timestamp (number) The unix timestamp, in seconds, for the time of the observation used.
indice.current.dateTimeISO (string) ISO 8601 date of the observation used.
indice.current.index (number) The numeric index value. The value, is normally from 0-5.

0 = Unavailable
If indice.range.reverse = false:
1 = bad
2 = poor
3 = good
4 = very good
5 = excellent

If indice.range.reverse = true:
1 = excellent
2 = very good
3 = good
4 = poor
5 = bad
indice.current.indexENG (string) The English phrase for the index value.

Possible values include:
- unavailable
- bad
- poor
- good
- very good
- excellent
indice.forecast (object) The object containing the forecast indice values. Null if the forecast was not requested.
indice.forecast.periods (array) Array of forecast periods
indice.forecast.periods.#.timestamp (number) The unix timestamp, in seconds, for the forecast period. For daily forecasts this will normally be approx 7am local time of the day the forecast period represents.
indice.forecast.periods.#.dateTimeISO (string) The ISO 8601 date of the forecast period. For daily forecasts this will normally be approx 7am local time of the day the forecast period represents.
indice.forecast.periods.#.index (number) The numeric index value for the forecast period. The numeric index value. The value, is normally from 0-5.

0 = Unavailable
If indice.range.reverse = false:
1 = bad / minimal
2 = poor / minimal
3 = good / moderate
4 = very good / high
5 = excellent / extreme

If indice.range.reverse = true:
1 = excellent / extreme
2 = very good / high
3 = good / moderate
4 = poor / low
5 = bad / minimal
indice.forecast.periods.#.indexEng (number) The English phrase for the index value

Possible values include, based on index:

Outdoors, golf, biking, swimming, campfires, bees:
- unavailable
- bad
- poor
- good
- very good
- excellent

Arthritis, coldflu, migraine, sinus
- unavailable
- extreme
- high
- moderate
- low
- minimal
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
place.name (string) The place or nearest place to the record.
place.state (string) The state abbreviation in which the record is located. This may be null depending on the country.
place.country (string) The country abbreviation in which the record is located.
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: August 22, 2022