“Yandex.Weather on your site” rate

Attention.

This version of the API is deprecated. Use the new version.

Use this request to get the current weather and forecast for the specified locality.

Request format

The locality is indicated using the latitude (lat parameter) and longitude (lon parameter). If these parameters are set incorrectly, the response will contain a 404 error code.

GET https://api.weather.yandex.ru/v1/informers?
 lat=<latitude>
 & lon=<longitude>
 & [lang=<response language>]

X-Yandex-API-Key: <key value>
Request headers:
X-Yandex-API-Key
The key you received when enabling the Yandex.Weather API.

Request parameters:

lat

The latitude in degrees. Required field.

lon

The longitude in degrees. Required field.

lang

The combination of language and country that weather information will be returned for. Possible values:

  • “ru_RU” — Russian for the Russia locale.
  • “ru_UA” — Russian for the Ukraine locale.
  • “uk_UA” — Ukrainian for the Ukraine locale.
  • “be_BY” — Belarusian for the Belarus locale.
  • “kk_KZ” — Kazakh for the Kazakhstan locale.
  • “tr_TR” — Turkish for the Turkey locale.
  • “en_US” — International English.

Response format

The response to the request is returned in JSON format. The information in the response contains:

Field Description Format
now The time on the server in Unix time. Number
now_dt The time on the server in UTC. String
info Locality information object. Object
fact Current weather information object. Object
forecast Weather forecast object. Object
Field Description Format
now The time on the server in Unix time. Number
now_dt The time on the server in UTC. String
info Locality information object. Object
fact Current weather information object. Object
forecast Weather forecast object. Object

info object

This object contains information about the locality.

Field Description Format
lat The latitude (in degrees). Number
lon The longitude (in degrees). Number
url Locality page on Yandex.Weather. String
Field Description Format
lat The latitude (in degrees). Number
lon The longitude (in degrees). Number
url Locality page on Yandex.Weather. String

fact object

This object contains information about the current weather.

Field Description Format
temp Temperature (°C). Number
feels_like What the temperature feels like (°C). Number
temp_water The water temperature (°C). This parameter is returned for localities where this information is relevant. Number
icon The code of the weather icon. The icon is available at https://yastatic.net/weather/i/icons/funky/dark/<value from the icon field>.svg. String
condition The code for the weather description. Possible values:
  • clear — Clear.
  • partly-cloudy — Partly cloudy.
  • cloudy — Cloudy.
  • overcast — Overcast.
  • partly-cloudy-and-light-rain — Partly cloudy, light rain.
  • partly-cloudy-and-rain — Partly cloudy, rain.
  • overcast-and-rain — Overcast, heavy rain.
  • overcast-thunderstorms-with-rain — Heavy rain, thunderstorm.
  • cloudy-and-light-rain — Cloudy, light rain.
  • overcast-and-light-rain — Overcast, light rain.
  • cloudy-and-rain — Cloudy, rain.
  • overcast-and-wet-snow — Sleet.
  • partly-cloudy-and-light-snow — Light snow.
  • partly-cloudy-and-snow — Partly cloudy, snow.
  • overcast-and-snow — Snowfall.
  • cloudy-and-light-snow — Cloudy, light snow.
  • overcast-and-light-snow — Overcast, light snow.
  • cloudy-and-snow — Cloudy, snow.
String
wind_speed Wind speed (meters per second). Number
wind_gust Speed of wind gusts (meters per second). Number
wind_dir Wind direction. Possible values:
  • “nw” — Northwest.
  • “n” — North.
  • “ne” — Northeast.
  • “e” — East.
  • “se” — Southeast.
  • “s” — South.
  • “sw” — Southwest.
  • “w” — West.
  • “c” — Calm.
String
pressure_mm Atmospheric pressure (mm Hg). Number
pressure_pa Atmospheric pressure (hPa). Number
humidity Humidity (percent). Number
daytime Light or dark time of the day. Possible values:
  • “d” — Light time of day.
  • “n” — Dark time of day.
String
polar Indicates that the time of day specified in the daytime field is polar. Boolean
season Time of year in this locality. Possible values:
  • “summer” — Summer.
  • “autumn” — Autumn.
  • “winter” — Winter.
  • “spring” — Spring.
String
obs_time The time when weather data was measured, in Unix time. Number
Field Description Format
temp Temperature (°C). Number
feels_like What the temperature feels like (°C). Number
temp_water The water temperature (°C). This parameter is returned for localities where this information is relevant. Number
icon The code of the weather icon. The icon is available at https://yastatic.net/weather/i/icons/funky/dark/<value from the icon field>.svg. String
condition The code for the weather description. Possible values:
  • clear — Clear.
  • partly-cloudy — Partly cloudy.
  • cloudy — Cloudy.
  • overcast — Overcast.
  • partly-cloudy-and-light-rain — Partly cloudy, light rain.
  • partly-cloudy-and-rain — Partly cloudy, rain.
  • overcast-and-rain — Overcast, heavy rain.
  • overcast-thunderstorms-with-rain — Heavy rain, thunderstorm.
  • cloudy-and-light-rain — Cloudy, light rain.
  • overcast-and-light-rain — Overcast, light rain.
  • cloudy-and-rain — Cloudy, rain.
  • overcast-and-wet-snow — Sleet.
  • partly-cloudy-and-light-snow — Light snow.
  • partly-cloudy-and-snow — Partly cloudy, snow.
  • overcast-and-snow — Snowfall.
  • cloudy-and-light-snow — Cloudy, light snow.
  • overcast-and-light-snow — Overcast, light snow.
  • cloudy-and-snow — Cloudy, snow.
String
wind_speed Wind speed (meters per second). Number
wind_gust Speed of wind gusts (meters per second). Number
wind_dir Wind direction. Possible values:
  • “nw” — Northwest.
  • “n” — North.
  • “ne” — Northeast.
  • “e” — East.
  • “se” — Southeast.
  • “s” — South.
  • “sw” — Southwest.
  • “w” — West.
  • “c” — Calm.
String
pressure_mm Atmospheric pressure (mm Hg). Number
pressure_pa Atmospheric pressure (hPa). Number
humidity Humidity (percent). Number
daytime Light or dark time of the day. Possible values:
  • “d” — Light time of day.
  • “n” — Dark time of day.
String
polar Indicates that the time of day specified in the daytime field is polar. Boolean
season Time of year in this locality. Possible values:
  • “summer” — Summer.
  • “autumn” — Autumn.
  • “winter” — Winter.
  • “spring” — Spring.
String
obs_time The time when weather data was measured, in Unix time. Number

Forecast object

This object contains weather forecast data.

Field Description Format
date Date of the forecast, in the format YYYY-MM-DD. String
date_ts The date of the forecast in Unix time. Number
week Week number. Number
sunrise Time of the sunrise in local time (may be omitted for polar regions). String
sunset Time of the sunset in local time (may be omitted for polar regions). String
moon_code Code of the lunar phase. Possible values:
  • 0 — Full moon.
  • 1-3 — Waning crescent.
  • 4 — Last quarter.
  • 5-7 — Waning gibbous.
  • 8 — New moon.
  • 9-11 — Waxing gibbous.
  • 12 — First quarter.
  • 13-15 — Waxing crescent.
Number
moon_text Text code for the lunar phase. Possible values:
  • full-moon — Full moon.
  • decreasing-moon — Waning moon.
  • last-quarter — Last quarter.
  • new-moon — New moon.
  • growing-moon — Waxing moon.
  • first-quarter — First quarter.
String
parts Forecasts by time of day. Contains the following fields:

All weather forecasts for a certain time of day have the same set of fields.

The response contains a forecast for the next two periods.

Object
part_name Name of the time of day. Possible values:
  • night — Night.
  • morning — Morning.
  • day — Day.
  • evening — Evening.
String
temp_min Minimum temperature for the time of day (°C). Number
temp_max Maximum temperature for the time of day (°C). Number
temp_avg Average temperature for the time of day (°C). Number
feels_like What the temperature feels like (°C). Number
icon The code of the weather icon. The icon is available at https://yastatic.net/weather/i/icons/funky/dark/<value from the icon field>.svg. String
condition The code for the weather description. Possible values:
  • clear — Clear.
  • partly-cloudy — Partly cloudy.
  • cloudy — Cloudy.
  • overcast — Overcast.
  • partly-cloudy-and-light-rain — Partly cloudy, light rain.
  • partly-cloudy-and-rain — Partly cloudy, rain.
  • overcast-and-rain — Overcast, heavy rain.
  • overcast-thunderstorms-with-rain — Heavy rain, thunderstorm.
  • cloudy-and-light-rain — Cloudy, light rain.
  • overcast-and-light-rain — Overcast, light rain.
  • cloudy-and-rain — Cloudy, rain.
  • overcast-and-wet-snow — Sleet.
  • partly-cloudy-and-light-snow — Light snow.
  • partly-cloudy-and-snow — Partly cloudy, snow.
  • overcast-and-snow — Snowfall.
  • cloudy-and-light-snow — Cloudy, light snow.
  • overcast-and-light-snow — Overcast, light snow.
  • cloudy-and-snow — Cloudy, snow.
String
daytime Light or dark time of the day. Possible values:
  • “d” — Light time of day.
  • “n” — Dark time of day.
String
polar Indicates that the time of day specified in the daytime field is polar. Boolean
wind_speed Wind speed (meters per second). Number
wind_gust Speed of wind gusts (meters per second). Number
wind_dir Wind direction. Possible values:
  • “nw” — Northwest.
  • “n” — North.
  • “ne” — Northeast.
  • “e” — East.
  • “se” — Southeast.
  • “s” — South.
  • “sw” — Southwest.
  • “w” — West.
  • “c” — Calm.
String
pressure_mm Atmospheric pressure (mm Hg). Number
pressure_pa Atmospheric pressure (hPa). Number
humidity Humidity (percent). Number
prec_mm Predicted amount of precipitation (mm). Number
prec_period Predicted duration of precipitation (minutes). Number
prec_prob Chance of precipitation. Number
Field Description Format
date Date of the forecast, in the format YYYY-MM-DD. String
date_ts The date of the forecast in Unix time. Number
week Week number. Number
sunrise Time of the sunrise in local time (may be omitted for polar regions). String
sunset Time of the sunset in local time (may be omitted for polar regions). String
moon_code Code of the lunar phase. Possible values:
  • 0 — Full moon.
  • 1-3 — Waning crescent.
  • 4 — Last quarter.
  • 5-7 — Waning gibbous.
  • 8 — New moon.
  • 9-11 — Waxing gibbous.
  • 12 — First quarter.
  • 13-15 — Waxing crescent.
Number
moon_text Text code for the lunar phase. Possible values:
  • full-moon — Full moon.
  • decreasing-moon — Waning moon.
  • last-quarter — Last quarter.
  • new-moon — New moon.
  • growing-moon — Waxing moon.
  • first-quarter — First quarter.
String
parts Forecasts by time of day. Contains the following fields:

All weather forecasts for a certain time of day have the same set of fields.

The response contains a forecast for the next two periods.

Object
part_name Name of the time of day. Possible values:
  • night — Night.
  • morning — Morning.
  • day — Day.
  • evening — Evening.
String
temp_min Minimum temperature for the time of day (°C). Number
temp_max Maximum temperature for the time of day (°C). Number
temp_avg Average temperature for the time of day (°C). Number
feels_like What the temperature feels like (°C). Number
icon The code of the weather icon. The icon is available at https://yastatic.net/weather/i/icons/funky/dark/<value from the icon field>.svg. String
condition The code for the weather description. Possible values:
  • clear — Clear.
  • partly-cloudy — Partly cloudy.
  • cloudy — Cloudy.
  • overcast — Overcast.
  • partly-cloudy-and-light-rain — Partly cloudy, light rain.
  • partly-cloudy-and-rain — Partly cloudy, rain.
  • overcast-and-rain — Overcast, heavy rain.
  • overcast-thunderstorms-with-rain — Heavy rain, thunderstorm.
  • cloudy-and-light-rain — Cloudy, light rain.
  • overcast-and-light-rain — Overcast, light rain.
  • cloudy-and-rain — Cloudy, rain.
  • overcast-and-wet-snow — Sleet.
  • partly-cloudy-and-light-snow — Light snow.
  • partly-cloudy-and-snow — Partly cloudy, snow.
  • overcast-and-snow — Snowfall.
  • cloudy-and-light-snow — Cloudy, light snow.
  • overcast-and-light-snow — Overcast, light snow.
  • cloudy-and-snow — Cloudy, snow.
String
daytime Light or dark time of the day. Possible values:
  • “d” — Light time of day.
  • “n” — Dark time of day.
String
polar Indicates that the time of day specified in the daytime field is polar. Boolean
wind_speed Wind speed (meters per second). Number
wind_gust Speed of wind gusts (meters per second). Number
wind_dir Wind direction. Possible values:
  • “nw” — Northwest.
  • “n” — North.
  • “ne” — Northeast.
  • “e” — East.
  • “se” — Southeast.
  • “s” — South.
  • “sw” — Southwest.
  • “w” — West.
  • “c” — Calm.
String
pressure_mm Atmospheric pressure (mm Hg). Number
pressure_pa Atmospheric pressure (hPa). Number
humidity Humidity (percent). Number
prec_mm Predicted amount of precipitation (mm). Number
prec_period Predicted duration of precipitation (minutes). Number
prec_prob Chance of precipitation. Number

Example

Request:

GET https://api.weather.yandex.ru/v1/informers?lat=55.75396&lon=37.620393

X-Yandex-API-Key: 3fc...7

Response:

{
  "now": 1470220206,
  "now_dt": "2016-08-03T10:30:06.238Z",
  "info": {
    "lat": 55.833333,
    "lon": 37.616667,
    "url": "https://yandex.ru/pogoda/moscow"
  },
  "fact": {
    "temp": 20,
    "feels_like": 21,
    "icon": "ovc",
    "condition": "overcast",
    "wind_speed": 2,
    "wind_gust": 5.9,
    "wind_dir": "n",
    "pressure_mm": 745,
    "pressure_pa": 994,
    "humidity": 83,
    "daytime": "d",
    "polar": false,
    "season": "summer",
    "obs_time": 1470214800
  },
  "forecast": {
    "date": "2016-08-03",
    "date_ts": 1522702800,
    "week": 15,
    "sunrise": "04:38",
    "sunset": "20:31",
    "moon_code": 1,
    "moon_text": "decreasing-moon",
    "parts": [
      {
        "part_name": "day",
        "temp_min": 20,
        "temp_max": 21,
        "temp_avg": 21,
        "feels_like": 23,
        "icon": "bkn_n",
        "condition": "cloudy",
        "daytime": "n",
        "polar": false,
        "wind_speed": 0.9,
        "wind_gust": 4,
        "wind_dir": "nw",
        "pressure_mm": 746,
        "pressure_pa": 995,
        "humidity": 81,
        "prec_mm": 0,
        "prec_period": 360,
        "prec_prob": 0
      },
      {
        "part_name": "evening",
        ...
      },
      {...}
    ]
  }
}