/api/v1/metadata/Your plan’s fields, coverage, source and forecast bounds in period.start and period.end.
Activate a plan in your account. Create a key with weather.read and send it with every request. The secret is shown once.
Authorization: ApiKey eol_your_secret_key/api/v1/metadata/Your plan’s fields, coverage, source and forecast bounds in period.start and period.end.
/api/v1/point/Values and units for one location at an exact forecast timestamp.
/api/v1/series/A paginated time series for one location. Available with a Free API key.
latitude, longitude · point, seriestime · pointstart, end · seriesparameters · point, seriesinterpolation · point, seriespage, page_size · seriesThis example uses exact metadata bounds and follows next_page. If a dataset spans more than 31 days, the example requests its first timestamp.
import json
from datetime import datetime, timedelta
from urllib.parse import urlencode
from urllib.request import Request, urlopen
BASE = "https://weatherapi.projecteol.ru/api/v1/"
HEADERS = {"Authorization": "ApiKey eol_your_key"}
def get(path, **params):
url = BASE + path + ("?" + urlencode(params) if params else "")
with urlopen(Request(url, headers=HEADERS), timeout=15) as response:
return json.load(response)
def utc_time(timestamp):
return datetime.fromisoformat(timestamp.replace("Z", "+00:00"))
period = get("metadata/")["period"]
start, end = period["start"], period["end"]
if utc_time(end) - utc_time(start) > timedelta(days=31):
end = start
page = 1
while page is not None:
result = get("series/", latitude=51.1694, longitude=71.4491,
start=start, end=end, page=page,
parameters="surface.air_temperature_2m,wind_speed_10m")
for row in result["results"]:
print(json.dumps(row))
page = result["next_page"]
Check the request format, coordinates, field codes and timestamp availability.
Send the Authorization header with a valid key. Replace a revoked key.
Check weather.read, the active plan, and whether the plan allows the field, operation or key.
The per-minute rate or monthly quota was reached. Retry-After gives the wait in seconds.
The published forecast is temporarily unavailable. Retry after a delay.
Both Free API limits are per account. The monthly quota resets at the start of the calendar month in UTC.
Open Swagger ↗