Free time API
A free JSON API for the time anywhere, time zone conversion, public holidays, daylight saving time, sunrise and sunset, and business days. There is no key and no sign-up: call it from a server, a web page, an app or an AI agent, up to 60 times a minute from one IP address.
Try it
Every endpoint answers a plain GET request, so a browser’s address bar will do:
curl "https://123clock.online/api/v1/time?place=tokyo"
How it works
- Free, with no key and no account. Please link to 123Clock where you show its data.
- Every answer is JSON in UTF-8, open to any website (CORS), and no answer sets a cookie.
- Up to 60 requests a minute from one IP address; after that the answer is 429, with Retry-After saying when to try again. Keep what you get for as long as Cache-Control allows: a year’s holidays and a date’s sunrise do not change.
- An error is an HTTP status, 400, 404 or 429, and a JSON object called error with a code for your program and a message in English.
- Names of places, countries and holidays come in any of the site’s 18 languages with lang= (de, ja, ar and so on); everything else is the same in all of them.
- Version 1 will not change in ways that break a program that uses it. New fields may be added.
Endpoints
The time in a place
GET /api/v1/time
The time now in a place or a time zone: the date, the UTC offset, the abbreviation, whether daylight saving time is on, and the last and the next clock change.
| Parameter | Required | What it is | Example |
|---|---|---|---|
place |
Yes | A place’s slug (london, new-york-city), found with /places, or an IANA time zone (Europe/London), or UTC. | london |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/time?place=london
Answer (shortened)
{
"place": {
"slug": "london",
"name": "London",
"region": "England",
"country": "United Kingdom",
"country_code": "GB",
"latitude": 51.50853,
"longitude": -0.12574,
"population": 8961989,
"timezone": "Europe/London",
"url": "https://123clock.online/time/london"
},
"timezone": "Europe/London",
"time": "2026-12-05T13:55:56+00:00",
"date": "2026-12-05",
"weekday": "Saturday",
"utc_offset": "+00:00",
"utc_offset_seconds": 0,
"abbreviation": "GMT",
"dst": false,
"unix": 1796478956,
"iso_week": 49,
"day_of_year": 339,
"last_change": {
"at": "2026-10-25T01:00:00Z",
"local_date": "2026-10-25",
"clocks": "back",
"from": "02:00",
"to": "01:00",
"utc_offset_after": "+00:00",
"abbreviation_after": "GMT",
"dst_after": false
},
"next_change": {
"at": "2027-03-28T01:00:00Z",
"local_date": "2027-03-28",
"clocks": "forward",
"from": "01:00",
"to": "02:00",
"utc_offset_after": "+01:00",
"abbreviation_after": "BST",
"dst_after": true
}
}
Convert a time
GET /api/v1/convert
A time on the clock in one place, in up to ten others, with the difference in hours and whether the date there is a day ahead or behind. Without a time, now.
| Parameter | Required | What it is | Example |
|---|---|---|---|
from |
Yes | Where the time is on the clock: a place’s slug or an IANA time zone. | london |
to |
Yes | Up to ten places or time zones, separated by commas. | tokyo,new-york-city |
time |
No | The time on the clock in from, as YYYY-MM-DDTHH:MM; with Z or an offset (+09:00), that moment. Now by default. | 2027-03-01T09:00 |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/convert?from=london&to=tokyo,new-york-city&time=2027-03-01T09:00
Answer (shortened)
{
"utc": "2027-03-01T09:00:00Z",
"unix": 1803891600,
"from": {
"place": {
"slug": "london",
"name": "London",
"region": "England",
"country": "United Kingdom",
"country_code": "GB",
"latitude": 51.50853,
"longitude": -0.12574,
"population": 8961989,
"timezone": "Europe/London",
"url": "https://123clock.online/time/london"
},
"timezone": "Europe/London",
"time": "2027-03-01T09:00:00+00:00",
"date": "2027-03-01",
"weekday": "Monday",
"utc_offset": "+00:00",
"utc_offset_seconds": 0,
"abbreviation": "GMT",
"dst": false
},
"to": [
{
"place": {
"slug": "tokyo",
"name": "Tokyo",
"region": "Tokyo",
"country": "Japan",
"country_code": "JP",
"latitude": 35.6895,
"longitude": 139.69171,
"population": 9733276,
"timezone": "Asia/Tokyo",
"url": "https://123clock.online/time/tokyo"
},
"timezone": "Asia/Tokyo",
"time": "2027-03-01T18:00:00+09:00",
"date": "2027-03-01",
"weekday": "Monday",
"utc_offset": "+09:00",
"utc_offset_seconds": 32400,
"abbreviation": "JST",
"dst": false,
"difference_seconds": 32400,
"day_difference": 0
},
{
"place": {
"slug": "new-york-city",
"name": "New York City",
"region": "New York",
"country": "United States",
"country_code": "US",
"latitude": 40.71427,
"longitude": -74.00597,
"population": 8804190,
"timezone": "America/New_York",
"url": "https://123clock.online/time/new-york-city"
},
"timezone": "America/New_York",
"time": "2027-03-01T04:00:00-05:00",
"date": "2027-03-01",
"weekday": "Monday",
"utc_offset": "-05:00",
"utc_offset_seconds": -18000,
"abbreviation": "EST",
"dst": false,
"difference_seconds": -18000,
"day_difference": 0
}
]
}
Find a place
GET /api/v1/places
Places by name, the largest first, with the slug the other endpoints take, the time zone, the coordinates and the UTC offset now.
| Parameter | Required | What it is | Example |
|---|---|---|---|
q |
Yes | At least two letters of the place’s name. | lond |
limit |
No | How many places, from 1 to 20. 10 by default. | 2 |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/places?q=lond&limit=2
Answer (shortened)
{
"query": "lond",
"results": [
{
"slug": "london",
"name": "London",
"region": "England",
"country": "United Kingdom",
"country_code": "GB",
"latitude": 51.50853,
"longitude": -0.12574,
"population": 8961989,
"timezone": "Europe/London",
"url": "https://123clock.online/time/london",
"utc_offset": "+00:00",
"abbreviation": "GMT"
},
{
"slug": "londrina",
"name": "Londrina",
"region": "Paraná",
"country": "Brazil",
"country_code": "BR",
"latitude": -23.31028,
"longitude": -51.16278,
"population": 581382,
"timezone": "America/Sao_Paulo",
"url": "https://123clock.online/time/londrina",
"utc_offset": "-03:00",
"abbreviation": "BRT"
}
]
}
Public holidays
GET /api/v1/holidays
A country’s public holidays in a year, named in the language asked for and in the country’s own, with the regions that keep them, the days off in lieu and the weekend days worked in exchange. Without a country, the 23 countries there is data for.
| Parameter | Required | What it is | Example |
|---|---|---|---|
country |
No | A country’s ISO 3166 code (DE), or the site’s name for it (germany). | DE |
year |
No | The year. This year by default. | 2027 |
region |
No | A region’s ISO 3166-2 code (DE-BY), for its holidays as well as the country’s. /holidays lists each country’s regions. | DE-BY |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/holidays?country=DE&year=2027&lang=de
Answer (shortened)
{
"country": {
"code": "DE",
"name": "Deutschland"
},
"year": 2027,
"region": null,
"weekend": [
6,
7
],
"provisional": false,
"holidays": [
{
"date": "2027-01-01",
"id": "new_year",
"name": "Neujahr",
"local_name": "Neujahr",
"nationwide": true,
"regions": [],
"regions_in_part": [],
"day_off": true,
"on_weekend": false,
"in_lieu": false,
"in_lieu_of": null,
"day_off_instead": null,
"weekend_day_worked": null,
"expected": false
},
{
"date": "2027-01-06",
"id": "epiphany",
"name": "Heilige Drei Könige",
"local_name": "Heilige Drei Könige",
"nationwide": false,
"regions": [
"DE-BW",
"DE-BY",
…
],
"regions_in_part": [],
"day_off": true,
"on_weekend": false,
"in_lieu": false,
"in_lieu_of": null,
"day_off_instead": null,
"weekend_day_worked": null,
"expected": false
},
…
],
"weekend_days_worked": [],
"url": "https://123clock.online/de/holidays/germany/2027"
}
Daylight saving time
GET /api/v1/dst
A place’s clock changes in a year: when, which way the clocks go, from what time to what, and the offset and abbreviation afterwards.
| Parameter | Required | What it is | Example |
|---|---|---|---|
place |
Yes | A place’s slug (london, new-york-city), found with /places, or an IANA time zone (Europe/London), or UTC. | berlin |
year |
No | The year, from 1970 to ten years ahead. This year by default. | 2027 |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/dst?place=berlin&year=2027
Answer (shortened)
{
"place": {
"slug": "berlin",
"name": "Berlin",
"region": "State of Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": 52.52437,
"longitude": 13.41053,
"population": 3426354,
"timezone": "Europe/Berlin",
"url": "https://123clock.online/time/berlin"
},
"timezone": "Europe/Berlin",
"year": 2027,
"dst_kept": true,
"changes": [
{
"at": "2027-03-28T01:00:00Z",
"local_date": "2027-03-28",
"clocks": "forward",
"from": "02:00",
"to": "03:00",
"utc_offset_after": "+02:00",
"abbreviation_after": "CEST",
"dst_after": true
},
{
"at": "2027-10-31T01:00:00Z",
"local_date": "2027-10-31",
"clocks": "back",
"from": "03:00",
"to": "02:00",
"utc_offset_after": "+01:00",
"abbreviation_after": "CET",
"dst_after": false
}
],
"url": "https://123clock.online/daylight-saving-time/germany"
}
Sunrise and sunset
GET /api/v1/sun
Sunrise, sunset, solar noon, the length of the day and the three twilights on a date, with moonrise, moonset and the Moon’s phase, as the Sun & Moon pages give them.
| Parameter | Required | What it is | Example |
|---|---|---|---|
place |
No | A place’s slug. Or give lat, lon and tz instead. | london |
date |
No | The date there, as YYYY-MM-DD. Today there by default. | 2027-06-21 |
lat |
No | Latitude in degrees, north positive, with lon and tz instead of a place. | 69.6496 |
lon |
No | Longitude in degrees, east positive. | 18.956 |
tz |
No | The IANA time zone to give the times in, with lat and lon. UTC by default. | Europe/Oslo |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/sun?place=london&date=2027-06-21
Answer (shortened)
{
"place": {
"slug": "london",
"name": "London",
"region": "England",
"country": "United Kingdom",
"country_code": "GB",
"latitude": 51.50853,
"longitude": -0.12574,
"population": 8961989,
"timezone": "Europe/London",
"url": "https://123clock.online/time/london"
},
"timezone": "Europe/London",
"latitude": 51.50853,
"longitude": -0.12574,
"date": "2027-06-21",
"sun": {
"sunrise": "2027-06-21T04:43:00+01:00",
"sunset": "2027-06-21T21:21:33+01:00",
"solar_noon": "2027-06-21T13:02:16+01:00",
"day_length_seconds": 59913,
"polar": null,
"civil_twilight_begin": "2027-06-21T03:55:20+01:00",
"civil_twilight_end": "2027-06-21T22:09:12+01:00",
"nautical_twilight_begin": "2027-06-21T02:40:41+01:00",
"nautical_twilight_end": "2027-06-21T23:23:51+01:00",
"astronomical_twilight_begin": null,
"astronomical_twilight_end": null
},
"moon": {
"moonrise": "2027-06-21T23:12:17+01:00",
"moonset": "2027-06-21T06:39:10+01:00",
"always_up": false,
"always_down": false,
"phase": "waning_gibbous",
"illumination": 0.947,
"age_days": 16.95
},
"url": "https://123clock.online/sunmoon/london/2027-06-21"
}
Business days
GET /api/v1/business-days
The working days from one date to another, both counted: the weekend left out and, with a country, its public holidays on working days, and a region’s with region=.
| Parameter | Required | What it is | Example |
|---|---|---|---|
from |
Yes | The first day, as YYYY-MM-DD. | 2027-01-01 |
to |
Yes | The last day, as YYYY-MM-DD, at most ten years on. | 2027-12-31 |
country |
No | A country (DE, or germany) whose public holidays and weekend to use. | DE |
region |
No | A region’s ISO 3166-2 code (DE-BY), for its holidays as well as the country’s. /holidays lists each country’s regions. | DE-BY |
weekend |
No | The days off each week by ISO number, Monday 1 to Sunday 7 (6,7), or none. By default the country’s weekend, else Saturday and Sunday. | 6,7 |
lang |
No | The language of the names: one of the site’s (en, de, ja and so on). English by default. | de |
Request
GET https://123clock.online/api/v1/business-days?from=2027-01-01&to=2027-12-31&country=DE®ion=DE-BY
Answer (shortened)
{
"from": "2027-01-01",
"to": "2027-12-31",
"country": {
"code": "DE",
"name": "Germany"
},
"region": {
"code": "DE-BY",
"name": "Bavaria"
},
"weekend": [
6,
7
],
"days": 365,
"weekdays": 261,
"holidays": [
{
"date": "2027-01-01",
"name": "New Year's Day",
"in_lieu": false
},
{
"date": "2027-01-06",
"name": "Epiphany",
"in_lieu": false
},
…
],
"weekend_days_worked": [],
"business_days": 253,
"years_without_holiday_data": []
}
OpenAPI
The whole API is described in https://123clock.online/api/v1/openapi.json, in OpenAPI 3.1, for code generators, API clients and AI tools.
Data and credit
Please link to 123Clock where you show the API’s data. The places come from GeoNames under CC BY 4.0, which asks for credit; the time zones from the IANA time zone database; and the public holidays from python-holidays, checked against each government’s own sources. See Licenses.
Frequently asked questions
Is the time API free?
Yes. There is no key, no account and no fee. We only ask that you link to 123Clock where you show its data.
Do I need an API key?
No. Call the addresses as they are, from a server, a web page or an app. Up to 60 requests a minute may come from one IP address.
Can an AI assistant or agent use it?
Yes. The OpenAPI document describes every endpoint and parameter, which is what tools for AI agents read, and every answer is plain JSON.
Where do the times come from?
From the IANA time zone database, release 2026f on this server now, the same data phones and computers use. The public holidays are checked against each government’s own sources.