BYTETOOLS

World Time & Weather API

Free city data API with no key: local time, UTC offset, explicit DST rules and monthly climate normals for hundreds of cities, as static JSON. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the World Time & Weather API?

World Time & Weather serves per-city JSON files with no API key, combining current local time and UTC offset with explicit daylight saving rules and monthly climate normals for maximum and minimum temperature, precipitation and wet days.

Most time APIs give you an offset and leave you to work out whether it will still be right next month. This one is explicit about it: the `dst` block states whether the city observes daylight saving at all, and gives both the winter and summer offsets in seconds. For anything scheduling into the future — a meeting planner, a travel itinerary — that is the difference between correct and confidently wrong.

The climate normals are an unusual pairing to find alongside time data, and they answer the traveller's question rather than the meteorologist's. `climate_normals.months` is keyed "1" through "12" with `tmax`, `tmin`, `prcp` in millimetres and `wet` days per month, computed over a stated recent period — 2021 to 2025 in the captured response, which is a shorter and more current window than the conventional thirty-year normal. Everything is served as static per-city files, so there is no rate limiting to think about, and the response restates its licence and the Open-Meteo weather source in every file.

Quick facts

Base URL
https://worldtimeweather.com/api/v1
Authentication
No API key and no account. Attribution is requested but not required, and the exact HTML snippet is supplied in every response.
Rate limit
No published limit. These are static files regenerated periodically.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the World Time & Weather API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch a city's time, DST rules and climate normals

GET https://worldtimeweather.com/api/v1/city/madrid.json

curl
curl 'https://worldtimeweather.com/api/v1/city/madrid.json'
JavaScript (fetch)
const res = await fetch("https://worldtimeweather.com/api/v1/city/madrid.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://worldtimeweather.com/api/v1/city/madrid.json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "slug": "madrid",
  "name": "Madrid",
  "country_code": "ES",
  "coordinates": {
    "latitude": 40.4169,
    "longitude": -3.7033
  },
  "time": {
    "timezone": "Europe/Madrid",
    "iso": "2026-08-21T09:30:20+02:00",
    "utc_offset_seconds": 7200,
    "utc_offset": "UTC+2",
    "dst": {
      "observes_dst": true,
      "winter_offset_seconds": 3600,
      "summer_offset_seconds": 7200
    }
  },
  "page": {
    "en": "https://worldtimeweather.com/city/madrid-en.html",
    "es": "https://worldtimeweather.com/city/madrid-es.html",
    "ar": "https://worldtimeweather.com/city/madrid-ar.html"
  },
  "license": {
    "terms": "https://worldtimeweather.com/api.html",
    "attribution_required": false,
    "attribution_requested": true,
    "attribution_html": "<a href=\"https://worldtimeweather.com/\">World Time &amp; Weather</a>",
    "weather_source": "https://open-meteo.com"
  },
  "generated_at": "2026-08-21T07:30:20+00:00",
  "climate_normals": {
    "period": "2021-2025",
    "months": {
      "1": {
        "tmax": 10.5,
        "tmin": 1.5,
        "prcp": 46,
        "wet": 7
      },
      "2": {
        "tmax": 14.2,
        "tmin": 3.3,
        "prcp": 24,
        "wet": 6
      },
      "3": {
        "tmax": 15.7,
        "tmin": 5.3,
        "prcp": 103,
        "wet": 12
      },
      "4": {
        "tmax": 19.8,
        "tmin": 7.9,
        "prcp": 59,
        "wet": 8
      },
      "5": {
        "tmax": 24.5,
        "tmin": 11.7,
        "prcp": 43,
        "wet": 6
      },
      "6": {
        "tmax": 30.2,
        "tmin": 17.2,
        "prcp": 3

Parameters

ParameterTypeRequiredDescription
(city slug)pathRequiredCity slug with a `.json` suffix. Fetch `/cities.json` for the full list. madrid.json
/cities.jsonpathOptionalEvery available city with its slug, for building a picker.
/timezones.jsonpathOptionalThe timezone reference file.
/index.jsonpathOptionalIndex of what the API publishes.

Response fields

slug / name / country_codestring
City identifier, display name and ISO country code.
coordinatesobject
`latitude` and `longitude` in decimal degrees.
time.timezonestring
IANA timezone name such as `Europe/Madrid`.
time.isostring
Current local time as ISO 8601 with offset, at the moment the file was generated.
time.utc_offset_seconds / utc_offsetinteger / string
Current offset in seconds and in display form such as `UTC+2`.
time.dstobject
`observes_dst` plus `winter_offset_seconds` and `summer_offset_seconds` — the fields that let you compute a future local time correctly.
climate_normals.periodstring
The years the normals were computed over, `2021-2025` in the captured response.
climate_normals.monthsobject
Keyed `"1"` to `"12"`, each with `tmax`, `tmin`, `prcp` in millimetres and `wet` days.
pageobject
Links to the human-facing city page in each supported language.
licenseobject
Terms, whether attribution is required or merely requested, a ready-made `attribution_html` snippet, and `weather_source` crediting Open-Meteo.
generated_atstring
When the file was generated — the reference point for `time.iso`.

What you can build with the World Time & Weather API

  • Build a meeting planner that handles future daylight saving correctly
  • Show travellers the typical weather for a destination by month
  • Populate a world clock with authoritative offsets and DST rules
  • Compare rainfall patterns across cities for trip planning

Common errors and how to fix them

Current time is stale

`time.iso` is fixed at file generation, not computed per request.

Fix: Use `time.timezone` with your own clock to derive the current time. Read `generated_at` to see how old the snapshot is.

Future times off by an hour

Daylight saving changes between now and then.

Fix: That is exactly what the `dst` block is for. Apply `winter_offset_seconds` or `summer_offset_seconds` according to the target date.

Month lookup fails

`climate_normals.months` is keyed by string, not integer.

Fix: Index with `"7"` rather than `7` in languages that distinguish the two.

404 on a city

The slug does not exist or was guessed.

Fix: Fetch `/cities.json` and use the slugs it publishes.

World Time & Weather API — frequently asked questions

Is the World Time & Weather API free?

Yes, free with no key or account. Attribution is requested rather than required, and the response supplies a ready-made HTML snippet for it.

Can I use it as a live clock?

Not directly. `time.iso` is a snapshot from when the file was generated. Take `time.timezone` and apply it to your own clock for live time; use the file for offsets and DST rules.

What period are the climate normals from?

The `period` field states it explicitly — 2021 to 2025 in the captured response. That is a shorter and more recent window than the conventional thirty-year normal, so it reflects current conditions more closely.

Where does the weather data come from?

Open-Meteo, credited in the `license.weather_source` field of every response. The time and DST information is derived from the IANA timezone database.

Tools that pair with this API

World Time & Weather is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.