Weathry API
Save your locations, then get hourly and daily weather forecasts for them. Everything is JSON over HTTPS, and the same features are available to AI assistants through MCP.
Base URL https://api.weathry.com · Format application/json
Quick start
- Get an API key: email info@weathry.com.
- Save a location with your own numeric ID.
- Ask for its forecast.
# 1. Save a location
curl -X POST https://api.weathry.com/location \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": 42, "location": "New York City", "latitude": 40.7128, "longitude": -74.0060}'
# 2. Get its daily forecast
curl https://api.weathry.com/forecast/daily/location/42 \
-H "Authorization: Bearer YOUR_API_KEY"
Authentication
Send your API key as a Bearer token on every request. Keep it secret: anyone with the key can use your account and your tokens.
Authorization: Bearer YOUR_API_KEY
A missing or wrong key returns 401 with "status": "unauthorized".
Locations
Forecasts are always for a saved location. You choose each location’s ID (a positive whole number), so you can use the same IDs as your own system. Managing locations is free and doesn’t use tokens.
/location/list/location/location/{id}/location/{id}/location/upload_csvLocation body (create and update)
{
"id": 42,
"location": "New York City",
"latitude": 40.7128,
"longitude": -74.0060
}
CSV upload format
Send the file as the request body. One location per line, four values separated by a pipe |: ID, name, latitude, longitude. Up to 1,000 rows per upload. Existing IDs are updated and new IDs are added.
42|New York City|40.7128|-74.0060 43|Harbour Front|-33.8568|151.2153 curl -X POST https://api.weathry.com/location/upload_csv \ -H "Authorization: Bearer YOUR_API_KEY" \ --data-binary @locations.csv
Forecasts
Each forecast request uses one token. Times are given in UTC and in the location’s local time zone.
/forecast/location/{id}/forecast/daily/location/{id}Query parameters
All optional. Values are not case-sensitive.
| Name | Values | What it does |
|---|---|---|
unit | M | I | M for metric (°C, km/h, mm) or I for imperial (°F, mph, inches). Leave it out to get both. Wind in knots is always included. |
tod | L | D | L for daylight hours only, D for dark hours only. Daily forecasts summarise only those hours. |
activity | golf | Adds an activity rating to each hour or day. See Activity ratings. |
curl "https://api.weathry.com/forecast/location/42?unit=I&tod=L" \ -H "Authorization: Bearer YOUR_API_KEY"
Response
The location, its time zone and the model run, followed by a forecasts list with one entry per hour (or per day). Hourly forecasts cover about 8 days and daily forecasts 14 days. This example is a real hourly response, shortened to one hour.
{
"location_id": 42,
"location": "New York City",
"tzid": "America/New_York",
"modelrun": "29AUG202600Z",
"latitude": 40.7128,
"longitude": -74.006,
"forecasts": [
{
"day": 7,
"weekday": "Sat",
"fcst_utc": "2026-08-29 17:00",
"fcst_loc": "2026-08-29 13:00",
"tmp_cel": 25,
"tmp_fahr": 77,
"rel_humidity": 28,
"comf_cel": 25,
"comf_fahr": 77,
"ws_kmh": 9,
"ws_mph": 5,
"ws_kts": 5,
"wind_dir": 344.27,
"wind_dir_desc": "NNW",
"gust_kmh": 12,
"gust_mph": 7,
"gust_kts": 6,
"beaufort": "Light Breeze",
"cloud_perc": 2,
"precip_mm": 0,
"precip_in": 0,
"pop_perc": 0,
"sunrise": "06:20",
"sunset": "19:32",
"light_dark": "L",
"pmsl": 102275,
"uv_idx": 7,
"uv_desc": "high",
"uv_col": "orange",
"conditions": "Sunny. Mild",
"icon": "sunny"
}
]
}
Forecast fields
| Field | Meaning |
|---|---|
day, weekday | Forecast day number and day of the week. |
fcst_utc, fcst_loc | Forecast time in UTC and in local time. |
tmp_cel, tmp_fahr | Temperature. |
comf_cel, comf_fahr | Feels-like temperature. |
rel_humidity | Relative humidity, %. |
ws_kmh, ws_mph, ws_kts | Wind speed. |
gust_kmh, gust_mph, gust_kts | Wind gusts. |
wind_dir, wind_dir_desc | Wind direction in degrees and as a compass point. |
beaufort | Wind on the Beaufort scale. |
cloud_perc | Cloud cover, %. |
precip_mm, precip_in | Precipitation amount. |
pop_perc | Chance of precipitation, %. |
sunrise, sunset | Local sunrise and sunset. |
light_dark | L if the hour is in daylight, D if dark. |
pmsl | Air pressure at sea level, in pascals. |
uv_idx, uv_desc, uv_col | UV index, its description and a display colour. |
conditions, icon | Short weather description and an icon name. |
act_rat, act_rat_desc | Activity rating and label. Only when activity is set. |
Daily forecasts give tmp_max_*, tmp_min_*, comf_max_* and comf_min_* instead of single temperatures, give the local date in fcst_loc, and leave out rel_humidity, light_dark and pmsl.
Activity ratings
Add activity to a forecast request to rate how suitable the weather is for that activity. Each hour (or day) then includes act_rat, a number from 0 to 5, and act_rat_desc, its label. The rating looks at wind, gusts, rain and temperature.
Supported today: golf. More activities will be added.
| act_rat | act_rat_desc (activity=golf) |
|---|---|
5 | Excellent |
4 | Good |
3 | Fair |
2 | Poor |
1 | Unplayable |
0 | Dark (no daylight) |
curl "https://api.weathry.com/forecast/location/42?activity=golf&tod=L" \ -H "Authorization: Bearer YOUR_API_KEY"
Tokens and plans
Weathry is prepaid. Each forecast request, through the API or MCP, uses one token. Requests that fail with a server error don’t use a token. Subscriptions are paid on the 1st of each month, with the first month pro rata for the days left. Pay-as-you-go tokens cost USD 0.005 each (top-ups from USD 5) and expire 12 months after purchase. Subscribers top up at their plan’s rate. Subscription tokens, and top-ups bought on a subscription, expire at the end of the calendar month (UTC). Tokens that expire soonest are used first. Prices exclude tax. See pricing.
/plans/tokens/plan/billing/portal?redirect=1 to be sent straight there.curl https://api.weathry.com/tokens \
-H "Authorization: Bearer YOUR_API_KEY"
{
"billing": "prepaid",
"tokens_left": 762590,
"grace_until": "",
"debt": 0,
"grants": [
{
"grant_id": 412,
"source": "subscription",
"tokens": 2000000,
"remaining": 712590,
"expires_at": "2026-12-01 00:00:00",
...
}
]
}
tokens_left is live. Each purchase’s remaining can be a few seconds behind. All times are UTC.
Running out of tokens
Every forecast response tells you how many tokens you have left in the X-Tokens-Remaining header. When you have none, forecast requests return 402 until you buy more. There are no overage charges.
Subscription renewals. If your monthly payment is still going through in the first 3 days of a month, forecasts keep working: you can use up to 25% of your plan’s monthly tokens before the payment arrives. They are taken from the new month’s tokens once it does. If payment doesn’t arrive, requests are refused after the 3rd and the tokens used are taken from your next purchase.
X-Tokens-Remaining: 762590
HTTP/1.1 402 Payment Required
{
"status": "no_tokens",
"message": "You have no tokens left. Email info@weathry.com to buy more."
}
MCP for AI assistants
Weathry has a built-in MCP (Model Context Protocol) server, so any AI assistant or agent that supports MCP over HTTP can manage your locations and read forecasts. It uses the same API key and the same tokens.
Server URL https://api.weathry.com/mcp · Transport Streamable HTTP · Header Authorization: Bearer YOUR_API_KEY
{
"mcpServers": {
"weathry": {
"type": "http",
"url": "https://api.weathry.com/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
Most MCP apps accept this format. Some use different field names; check your app’s MCP settings.
Tools
list_locations | List your saved locations. |
get_location_forecast | Hourly forecast for a saved location. Accepts unit, tod and activity. |
get_location_daily_forecast | Daily forecast for a saved location. Accepts unit, tod and activity. |
create_location | Save a new location. |
update_location | Change a saved location. |
delete_location | Remove a saved location. |
upload_locations_csv | Add or update many locations from CSV text. |
Errors
Errors return a status code and a JSON body with status and message.
{
"status": "Not found",
"message": "No location found for id 99"
}
| Code | When | Uses a token? |
|---|---|---|
400 | A parameter or body is invalid, for example unit=X or a malformed CSV row. | Forecasts: yes |
401 | The API key is missing or wrong. | No |
402 | You have no tokens left. | No |
404 | No saved location has that ID. | Forecasts: yes |
409 | A location with that ID already exists. | No |
500 | Something failed on our side. | No |
503 | We couldn’t check your token balance. Try again in a moment. | No |