v2

latestOpenAPI 3.1.02026-08-0176498.0 KB
Point weather

Returns air quality data for a single point (geographic name or GPS)

Air quality forecast for a single location

Location specification

The location of the weather data is the only parameter that is required and must be specified. There are two ways to do this:

  1. Specify the GPS coordinates of the location using the parameters lat and lon.
  2. OR specify the name of the place using the parameter place_id. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Notes

  • For a detailed description of variables, please consult ⚠️ <a href="https://www.meteosource.com/documentation#description_aq" target="_blank">description of variables</a> ⚠️ in Documentation or Schema of the response (link next to Example value in the Responses section below).
  • Do not make any assumptions about the number and ordering of the variables. New variables and sections may be introduced in the future. Always check the data are present before you try to use them.
  • The response contains an Expires header, which defines the point at which the API response will not change for the same request. We highly recommend using this to avoid unnecessary requests and increase the performance of your app.
  • Meteosource API supports HTTP compression. To enable it, simply add an Accept-Encoding: gzip header to your request.
  • When daylight saving time starts, one hourly record will be missing (typically 2:00:00 AM). When daylight saving time ends, the hourly forecast will contain two records with duplicate times (typically 2:00:00 AM).
get/air_quality

Query parameters

place_idstring

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

Identifier of a place. To obtain the place_id for the location you want, please use endpoints /find_places_prefix (search by prefix) or /find_places (search by full name).

latstring

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lonstring

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

timezonestring

Timezone to be used for the date fields. If not specified, local timezone of the forecast location will be used. The format is according to the tzinfo database, so values like Europe/Prague or UTC can be used. Alternatively you may use the value auto in which case the local timezone of the location is used. The full list of valid timezone strings can be found here.

Timezone to be used for the date fields. If not specified, local timezone of the forecast location will be used. The format is according to the tzinfo database, so values like Europe/Prague or UTC can be used. Alternatively you may use the value auto in which case the local timezone of the location is used. The full list of valid timezone strings can be found here.

keystring

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Response

Successful Response

latstring required

Latitude of the point, always in the format <float><N/S>, for example 23.5S

lonstring required

Longitude of the point, always in the format <float><E/W>, for example 23.5W

elevationinteger required

Elevation above sea level in metres (for units 'metric', 'uk', 'ca') or feet (for units 'us')

timezonestring

Name of the timezone in format like 'Europe/London'. Available only when the place is specified through place ID.

Example response

{
  "data": [
    {
      "date": "2022-03-30T18:00:00"
    }
  ]
}