Skip to content
ClockCrest

API Reference: Time, Date & Holiday Endpoints

Every endpoint of the free ClockCrest API, generated from the code that serves it. 26 operations on 28 paths, API version 1.1.0.

Every example is real output, captured on 2026-12-01 from a local run of the same code. Live values differ.

Basics

Base URL: https://clockcrest.com

  • Every endpoint is a GET request that returns JSON in UTF-8. HEAD is answered like GET; OPTIONS answers the CORS preflight; any other method gets 405.
  • There is no key, no account and no cookie, and nothing you send is stored.
  • Time zones are IANA names (Europe/Paris), countries are ISO 3166-1 alpha-2 codes (FR), dates are YYYY-MM-DD and instants are UTC in ISO 8601.
  • Each parameter may appear once, and the whole query string is limited to 512 characters. Parameters an endpoint does not declare are ignored by the REST API, except on /api/v1/status, which refuses them.
  • Every response names its “source”; where relevant it also carries “sourceUrl”, “dataYears”, “lastUpdated” and a “notes” list with its caveats.

Errors

An error is an HTTP 4xx or 5xx status with one JSON shape. “code” is stable and meant for programs; “message” is English, meant for people, and never repeats the value that was rejected. Error responses are sent with Cache-Control: no-store.

{
  "error": {
    "code": "invalid_timezone",
    "message": "Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."
  }
}
Every error code
CodeStatusWhen it happens
missing_parameter400A required parameter is absent or empty.
invalid_parameter400A parameter has the wrong type or shape, is not one of the allowed values, or is given more than once.
unknown_parameter400A parameter the endpoint (or MCP tool) does not accept was sent.
out_of_range400A number or a date is outside the range the endpoint documents.
invalid_request400The query string is longer than 512 characters.
invalid_timezone400The value is not an IANA time zone the runtime knows.
invalid_time400The wall-clock time is not YYYY-MM-DDTHH:MM[:SS], or lies outside 1970–2100.
invalid_date400The value is not a real calendar date in the YYYY-MM-DD form.
invalid_year400The year is not four digits.
invalid_country400The country is not a two-letter ISO 3166-1 code.
invalid_calendar400The calendar system is not one of the supported ones.
invalid_range400The end date is before the start date, or the range is longer than 1500 days.
range_not_covered400The calculation would leave the years the holiday data covers; it is refused rather than guessed.
country_not_found404There is no data for that country.
year_not_found404There is holiday data for the country, but not for that year.
exchange_not_found404No exchange has that identifier.
city_not_found404No city in the index matches the name.
method_not_allowed405A method other than GET (or OPTIONS for the CORS preflight) was used.
rate_limited429Too many requests for weather forecasts that are not cached yet came from one address. Wait for the Retry-After seconds.
internal_error500Something unexpected failed on the server. The message never contains details.
data_unavailable503A data file or upstream service the endpoint needs (for weather, MET Norway) could not be read. Try again later.

A request with the wrong method, for example:

curl -X POST 'https://clockcrest.com/api/v1/time/now?tz=UTC'
{"error":{"code":"method_not_allowed","message":"Only GET is supported."}}

Caching

Successful responses carry a Cache-Control header chosen per endpoint, from one second for the current time to one day for data that only changes when the site is rebuilt. The value each endpoint sends is shown in its block below, as declared in the code and as captured from a real response. Please honour it: it is the main thing keeping the service free.

CORS

The API can be called from a browser on any site. These headers are sent:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, X-API-Key
Access-Control-Max-Age: 86400

The first one is on every response, errors included; the others answer the OPTIONS preflight. No credentials are involved, so there is nothing to allow.

Versioning and compatibility

  • The API version is 1.1.0 (info.version in the OpenAPI file). It rises when operations, parameters or response fields are added.
  • Paths under /api/v1/ are kept: changes are additive, so write clients that ignore fields they do not know.
  • When an endpoint moved, its original path stayed and returns the same response: /api/v1/time → /api/v1/time/now, /api/v1/convert → /api/v1/time/convert.
  • MCP tools that were renamed still answer to their earlier names: convert_time → convert_timezone, get_public_holidays → get_country_holidays, count_business_days → calculate_business_days.

Time zones and daylight saving

Offsets and daylight-saving rules come from the IANA time zone database built into the serving runtime. A zone name is accepted in any capitalisation and reported under its current IANA name.

A wall-clock time has no UTC offset, so around a clock change it can be ambiguous or not exist at all. The conversion endpoint never resolves that silently: “resolution” says what was done and “note” explains it.

A time that does not exist

At 02:00 on 14 March 2027 clocks in New York jump to 03:00, so 02:30 never happens. The offset in force before the jump is applied and the result lands after it (“gap_shifted_forward”):

curl 'https://clockcrest.com/api/v1/convert?from=America/New_York&to=UTC&time=2027-03-14T02:30'
Example response
{
  "input": {
    "from": "America/New_York",
    "to": "UTC",
    "time": "2027-03-14T02:30:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2027-03-14T03:30:00",
    "iso": "2027-03-14T03:30:00-04:00",
    "utcOffset": "-04:00",
    "utcOffsetMinutes": -240,
    "abbreviation": "EDT",
    "isDst": true
  },
  "to": {
    "timeZone": "UTC",
    "local": "2027-03-14T07:30:00",
    "iso": "2027-03-14T07:30:00+00:00",
    "utcOffset": "+00:00",
    "utcOffsetMinutes": 0,
    "abbreviation": "UTC",
    "isDst": false
  },
  "utc": "2027-03-14T07:30:00Z",
  "resolution": "gap_shifted_forward",
  "note": "The source time does not exist: clocks in the source zone jumped forward over it. The offset in force before the jump was applied, so the time was read as the equivalent moment after the jump.",
  "source": "IANA tz database (runtime Intl)"
}

A time that happens twice

At 02:00 on 1 November 2026 clocks in New York go back to 01:00, so 01:30 happens twice. The earlier occurrence is used and both are listed in “occurrences” (“overlap_earlier”):

curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30'
Example response
{
  "input": {
    "from": "America/New_York",
    "to": "UTC",
    "time": "2026-11-01T01:30:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2026-11-01T01:30:00",
    "iso": "2026-11-01T01:30:00-04:00",
    "utcOffset": "-04:00",
    "utcOffsetMinutes": -240,
    "abbreviation": "EDT",
    "isDst": true
  },
  "to": {
    "timeZone": "UTC",
    "local": "2026-11-01T05:30:00",
    "iso": "2026-11-01T05:30:00+00:00",
    "utcOffset": "+00:00",
    "utcOffsetMinutes": 0,
    "abbreviation": "UTC",
    "isDst": false
  },
  "utc": "2026-11-01T05:30:00Z",
  "resolution": "overlap_earlier",
  "note": "The source time occurs twice because clocks in the source zone were set back. The earlier occurrence was used; pass overlap=later for the second one.",
  "occurrences": ["2026-11-01T01:30:00-04:00", "2026-11-01T01:30:00-05:00"],
  "source": "IANA tz database (runtime Intl)"
}

Pass overlap=later for the second one (“overlap_later”):

curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30&overlap=later'

Data set dates

The date each data set was last generated or checked. The same dates are returned as “lastUpdated” in the responses that use them.

Data setLast updated
Public holidays (Nager.Date)2026-11-30
Cities and countries (GeoNames, CC BY 4.0)2026-11-30
Stock-exchange hours (each exchange’s page)2026-11-30
Time-zone rules (IANA tz database)follows the runtime

Where each data set comes from and what it does not cover is on the developer overview. The same reference in machine-readable form: /openapi.json

Endpoints

Service

Version, build and data-set information about the API itself.

GET /api/v1/status

API version, build and data-set dates. What is running: the API version, the number of operations, the commit and build time of the deployment, and the source, date and size of every data set. Takes no parameters. It is a liveness answer, not an uptime measurement: no history is kept.

Parameters

This endpoint takes no parameters.

Caching

Cache-Control: no-store ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/status'
{
  "status": "ok",
  "at": "2026-12-01T13:46:26Z",
  "unixMs": 1796132786019,
  "api": {
    "version": "1.1.0",
    "operations": 26,
    "paths": 28,
    "mcpTools": 16,
    "openapi": "https://clockcrest.com/openapi.json",
    "documentation": "https://clockcrest.com/developers/docs/"
  },
  "build": {
    "commit": "759afb9",
    "builtAt": "2026-12-01T09:45:24Z"
  },
  "datasets": [
    {
      "id": "time-zones",
      "name": "Time-zone rules",
      "source": "IANA tz database (runtime Intl)",
      "sourceUrl": "https://www.iana.org/time-zones",
      "license": null,
      "lastUpdated": null,
      "records": 419,
      "unit": "time zones",
      "coverage": "Every zone the serving runtime knows. The tz release is the one built into the runtime; Intl does not expose its version."
    },
    // … 4 more
  ],
  "notes": [
    "This response means the API code answered this request; it is not an uptime measurement and no history is kept.",
    "\"build\" is null on both fields when the deployment was not produced by the normal build (for example a local development run)."
  ],
  "source": "ClockCrest (clockcrest.com)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (25)

Schema: #/components/schemas/ServiceStatus

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/status?verbose=1'
400  {"error":{"code":"unknown_parameter","message":"This endpoint takes no parameters."}}

Try it in the playground

Time

Current time, conversion, time zones, UTC offsets and daylight-saving transitions (IANA tz database).

GET /api/v1/time/now

Current time in a time zone. The current date and time in an IANA time zone, with its UTC offset, abbreviation, whether daylight saving time is in effect and the next offset change. /api/v1/time is the original path and stays available.

Original path, still served: /api/v1/time · MCP tool: get_current_time

Parameters

ParameterDescription
tz
required string
IANA time zone name, e.g. Europe/Paris
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: Europe/Paris

Caching

Cache-Control: public, max-age=1 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/now?tz=Europe/Paris'
{
  "timeZone": "Europe/Paris",
  "local": "2026-12-01T14:46:26",
  "iso": "2026-12-01T14:46:26+01:00",
  "utcOffset": "+01:00",
  "utcOffsetMinutes": 60,
  "abbreviation": "CET",
  "isDst": false,
  "utc": "2026-12-01T13:46:26Z",
  "unixMs": 1796132786067,
  "nextTransition": {
    "at": "2027-03-28T01:00:00Z",
    "utcOffsetBefore": "+01:00",
    "utcOffsetAfter": "+02:00"
  },
  "source": "IANA tz database (runtime Intl)"
}
Response fields (14)

Schema: #/components/schemas/CurrentTime

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/time/now?tz=Mars/Olympus'
400  {"error":{"code":"invalid_timezone","message":"Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."}}

Try it in the playground

GET /api/v1/time/convert

Convert a wall-clock time between zones. Converts a wall-clock time from one IANA zone to another. A time skipped by a daylight-saving jump or repeated when clocks go back is resolved explicitly ("resolution", "note", "occurrences"). /api/v1/convert is the original path and stays available.

Original path, still served: /api/v1/convert · MCP tool: convert_timezone

Parameters

ParameterDescription
from
required string
Source IANA time zone, e.g. America/New_York
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: America/New_York
to
required string
Target IANA time zone, e.g. Asia/Tokyo
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: Asia/Tokyo
time
required string
Wall-clock time in the source zone, YYYY-MM-DDTHH:MM or YYYY-MM-DDTHH:MM:SS, without a UTC offset (1970–2100)
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/ · Example: 2026-12-25T09:00
overlap
optional string
Which occurrence to use when the time happens twice. Default: earlier.
earlier | later · Default: earlier

Caching

Cache-Control: public, max-age=3600 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=2026-12-25T09:00'
{
  "input": {
    "from": "America/New_York",
    "to": "Asia/Tokyo",
    "time": "2026-12-25T09:00:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2026-12-25T09:00:00",
    "iso": "2026-12-25T09:00:00-05:00",
    "utcOffset": "-05:00",
    "utcOffsetMinutes": -300,
    "abbreviation": "EST",
    "isDst": false
  },
  "to": {
    "timeZone": "Asia/Tokyo",
    "local": "2026-12-25T23:00:00",
    "iso": "2026-12-25T23:00:00+09:00",
    "utcOffset": "+09:00",
    "utcOffsetMinutes": 540,
    "abbreviation": "GMT+9",
    "isDst": false
  },
  "utc": "2026-12-25T14:00:00Z",
  "resolution": "exact",
  "note": "The source time exists exactly once in the source zone.",
  "source": "IANA tz database (runtime Intl)"
}
Response fields (25)

Schema: #/components/schemas/Conversion

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=tomorrow'
400  {"error":{"code":"invalid_time","message":"Parameter \"time\" must look like 2026-12-25T09:00 (optionally with :SS), without a UTC offset."}}

Try it in the playground

GET /api/v1/time/zones

IANA time zones with their current offset. Every IANA time zone the serving runtime supports, with its current UTC offset and whether daylight saving time is in effect. With "country", only the zones used in that country.

Parameters

ParameterDescription
country
optional string
Only the zones of this country (ISO 3166-1 alpha-2), e.g. AU
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: AU

Caching

Cache-Control: public, max-age=300 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/zones?country=AU'
{
  "at": "2026-12-01T13:46:26Z",
  "country": "AU",
  "count": 8,
  "timeZones": [
    {
      "timeZone": "Australia/Adelaide",
      "utcOffset": "+10:30",
      "utcOffsetMinutes": 630,
      "isDst": true,
      "countries": ["AU"]
    },
    // … 7 more
  ],
  "notes": [
    "The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
    // … 1 more
  ],
  "source": "IANA tz database (runtime Intl)",
  "countrySource": "GeoNames",
  "countrySourceUrl": "https://www.geonames.org"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (13)

Schema: #/components/schemas/ZoneList

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/time/zones?country=Australia'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"country\" is too long (max 2 characters)."}}
curl 'https://clockcrest.com/api/v1/time/zones?country=ZZ'
404  {"error":{"code":"country_not_found","message":"No time-zone data for country \"ZZ\"."}}

404: The country is not in the data set.

Try it in the playground

GET /api/v1/time/offsets

Time zones grouped by current UTC offset. The UTC offsets in use right now, each with the IANA zones currently on it. With "minutes", only that offset.

Parameters

ParameterDescription
minutes
optional integer
Only this offset, in minutes east of UTC (e.g. 345 for +05:45)
≥ -720 · ≤ 840 · Example: 345

Caching

Cache-Control: public, max-age=300 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=345'
{
  "at": "2026-12-01T13:46:26Z",
  "count": 1,
  "offsets": [
    {
      "utcOffset": "+05:45",
      "utcOffsetMinutes": 345,
      "count": 1,
      "timeZones": ["Asia/Kathmandu"]
    }
  ],
  "notes": [
    "The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
    // … 1 more
  ],
  "source": "IANA tz database (runtime Intl)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (9)

Schema: #/components/schemas/OffsetList

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=9000'
400  {"error":{"code":"out_of_range","message":"Parameter \"minutes\" must be between -720 and 840."}}

Try it in the playground

GET /api/v1/time/dst

UTC-offset changes of a zone in a year. Every change of UTC offset in a zone during a year (daylight saving time starting and ending, or a permanent change), found by searching the runtime's tz data and exact to the second.

Parameters

ParameterDescription
tz
required string
IANA time zone name, e.g. America/New_York
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: America/New_York
year
required integer
Four-digit year, 1970–2100
≥ 1970 · ≤ 2100 · Example: 2027

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=2027'
{
  "timeZone": "America/New_York",
  "year": 2027,
  "observesDst": true,
  "count": 2,
  "transitions": [
    {
      "at": "2027-03-14T07:00:00Z",
      "localBefore": "2027-03-14T01:59:59",
      "localAfter": "2027-03-14T03:00:00",
      "utcOffsetBefore": "-05:00",
      "utcOffsetAfter": "-04:00",
      "changeMinutes": 60,
      "direction": "forward",
      "isDstAfter": true
    },
    // … 1 more
  ],
  "notes": [
    "Every change of UTC offset during the UTC calendar year is listed, whatever its cause (daylight saving time or a permanent change of standard time).",
    // … 2 more
  ],
  "source": "IANA tz database (runtime Intl)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (15)

Schema: #/components/schemas/DstTransitions

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=1800'
400  {"error":{"code":"out_of_range","message":"Parameter \"year\" must be between 1970 and 2100."}}

Try it in the playground

GET /api/v1/time/find

Find the time zone of a city or country by name. Looks a name up among countries (name or ISO code) and the ~34,000 cities of the GeoNames index, and returns the matching IANA zones with their current local time.

MCP tool: find_timezone

Parameters

ParameterDescription
q
required string
City or country name (any language the index knows, e.g. Cairo, القاهرة, Le Caire) or an ISO country code
length ≥ 1 · length ≤ 64 · Example: Kathmandu
limit
optional integer
Maximum number of city matches (1–10). Default 5.
≥ 1 · ≤ 10 · Default: 5 · Example: 2

Caching

Cache-Control: public, max-age=60 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/time/find?q=Kathmandu&limit=2'
{
  "query": "Kathmandu",
  "at": "2026-12-01T13:46:26Z",
  "countries": [],
  "cities": [
    {
      "name": "Kathmandu",
      "nameAr": "كاتماندو",
      "alternateNames": ["كاتماندو", "काठमाडौं", "Katmandou", "Katmandú", "Катманду", "加德滿都"],
      "country": "NP",
      "countryName": "Nepal",
      "timeZone": "Asia/Kathmandu",
      "lat": 27.7,
      "lon": 85.32,
      "population": 1442271,
      "slug": "kathmandu",
      "url": "https://clockcrest.com/time/kathmandu/",
      "utcOffset": "+05:45",
      "local": "2026-12-01T19:31:26"
    }
  ],
  "notes": [
    "A country can span several time zones: each one is listed with its largest cities. City matches are ordered by relevance, then population.",
    "The index holds GeoNames populated places of 15,000+ people (about 34,000 cities). Smaller places are not in it.",
    // … 1 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30",
  "timeZoneSource": "IANA tz database (runtime Intl)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (37)

Schema: #/components/schemas/TimezoneSearch

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/time/find'
400  {"error":{"code":"missing_parameter","message":"Missing required parameter \"q\"."}}

Try it in the playground

Places

Cities and countries (GeoNames, CC BY 4.0).

GET /api/v1/cities

Largest cities of a country. The cities of a country in the GeoNames index, most populous first.

Parameters

ParameterDescription
country
required string
ISO 3166-1 alpha-2 country code, e.g. FR
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: NP
limit
optional integer
Maximum number of cities (1–200). Default 50.
≥ 1 · ≤ 200 · Default: 50 · Example: 3

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/cities?country=NP&limit=3'
{
  "country": "NP",
  "countryName": "Nepal",
  "total": 46,
  "count": 3,
  "cities": [
    {
      "name": "Kathmandu",
      "nameAr": "كاتماندو",
      "alternateNames": ["كاتماندو", "काठमाडौं", "Katmandou", "Katmandú", "Катманду", "加德滿都"],
      "country": "NP",
      "countryName": "Nepal",
      "timeZone": "Asia/Kathmandu",
      "lat": 27.7,
      "lon": 85.32,
      "population": 1442271,
      "slug": "kathmandu",
      "url": "https://clockcrest.com/time/kathmandu/"
    },
    // … 2 more
  ],
  "notes": [
    "Cities are ordered by population, largest first.",
    "The index holds GeoNames populated places of 15,000+ people (about 34,000 cities). Smaller places are not in it.",
    // … 1 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (22)

Schema: #/components/schemas/CityList

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/cities?country=Nepal'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"country\" is too long (max 2 characters)."}}
curl 'https://clockcrest.com/api/v1/cities?country=ZZ'
404  {"error":{"code":"country_not_found","message":"No city data for country \"ZZ\"."}}

404: The country has no city in the index.

Try it in the playground

GET /api/v1/countries

Countries with their time zones. Countries known to the site, with capital, IANA time zones and the years of public-holiday data available.

Parameters

ParameterDescription
continent
optional string
Only this continent: af, as, eu, na, sa, oc or an (case-insensitive)
af | as | eu | na | sa | oc | an · Example: an

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/countries?continent=an'
{
  "continent": "AN",
  "count": 2,
  "countries": [
    {
      "code": "TF",
      "name": "French Southern Territories",
      "continent": "AN",
      "capital": "Port-aux-Francais",
      "timeZones": ["Indian/Kerguelen"],
      "publicHolidayYears": []
    },
    // … 1 more
  ],
  "notes": [
    "Countries are those with at least one city page on clockcrest.com (GeoNames data); \"publicHolidayYears\" lists the years with Nager.Date holiday data and is empty when there is none.",
    // … 2 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (14)

Schema: #/components/schemas/CountryList

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/countries?continent=atlantis'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"continent\" must be one of: af, as, eu, na, sa, oc, an."}}

Try it in the playground

GET /api/v1/countries/{cc}

One country in detail. Capital, population, area, calling code, currency, weekend days, public-holiday coverage and every time zone of the country with its current offset and largest cities.

Parameters

ParameterDescription
cc
required string
ISO 3166-1 alpha-2 country code, e.g. EG (in the path)
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: EG

Caching

Cache-Control: public, max-age=300 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/countries/EG'
{
  "code": "EG",
  "name": "Egypt",
  "continent": "AF",
  "continentName": "Africa",
  "capital": {
    "name": "Cairo",
    "slug": "cairo",
    "url": "https://clockcrest.com/time/cairo/"
  },
  "population": 118365995,
  "areaKm2": 1001450,
  "callingCode": "+20",
  "currency": "EGP",
  "tld": ".eg",
  "cityCount": 242,
  "timeZones": [
    {
      "timeZone": "Africa/Cairo",
      "utcOffset": "+02:00",
      "utcOffsetMinutes": 120,
      "isDst": false,
      "cityCount": 242,
      "largestCities": [
        {
          "name": "Cairo",
          "slug": "cairo",
          "url": "https://clockcrest.com/time/cairo/"
        },
        // … 2 more
      ]
    }
  ],
  "weekend": ["Friday", "Saturday"],
  "weekendBasis": "listed",
  "publicHolidayYears": [2025, 2026, 2027, 2028],
  "at": "2026-12-01T13:46:26Z",
  "notes": [
    "Countries are those with at least one city page on clockcrest.com (GeoNames data); \"publicHolidayYears\" lists the years with Nager.Date holiday data and is empty when there is none.",
    // … 3 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30",
  "timeZoneSource": "IANA tz database (runtime Intl)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (34)

Schema: #/components/schemas/Country

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/countries/E1'
400  {"error":{"code":"invalid_country","message":"Parameter \"cc\" must be a two-letter ISO 3166-1 code such as FR."}}
curl 'https://clockcrest.com/api/v1/countries/ZZ'
404  {"error":{"code":"country_not_found","message":"No data for country \"ZZ\"."}}

404: The country is not in the data set.

Try it in the playground

Holidays and business days

Public holidays (Nager.Date, 2025–2028) and business-day arithmetic.

GET /api/v1/holidays

Public holidays of a country for one year. Public holidays from the site's static Nager.Date files (2025–2028). Regional holidays are included and flagged with their subdivisions.

MCP tool: get_country_holidays

Parameters

ParameterDescription
country
required string
ISO 3166-1 alpha-2 country code, e.g. FR
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: FR
year
required integer
Four-digit year with data (2025–2028)
≥ 2025 · ≤ 2028 · Example: 2026

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2026'
{
  "country": "FR",
  "countryName": "France",
  "year": 2026,
  "count": 11,
  "holidays": [
    {
      "date": "2026-01-01",
      "name": "New Year's Day",
      "localName": "Jour de l'an",
      "nationwide": true,
      "types": ["Public"]
    },
    // … 10 more
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (15)

Schema: #/components/schemas/Holidays

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/holidays?country=..&year=2026'
400  {"error":{"code":"invalid_country","message":"Parameter \"country\" must be a two-letter ISO 3166-1 code such as FR."}}
curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2031'
404  {"error":{"code":"year_not_found","message":"No data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}

404: No data for that country or year.

Try it in the playground

GET /api/v1/business-days

Count business days between two dates. Business days between two dates, both inclusive, excluding the country's weekend days and nationwide public holidays. The whole range must lie inside the years the holiday data covers.

MCP tool: calculate_business_days

Parameters

ParameterDescription
country
required string
ISO 3166-1 alpha-2 country code, e.g. FR
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: FR
start
required string
First day, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01
end
required string
Last day (inclusive), YYYY-MM-DD; at most 1500 days after start
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-31

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-01&end=2026-12-31'
{
  "country": "FR",
  "countryName": "France",
  "start": "2026-12-01",
  "end": "2026-12-31",
  "endInclusive": true,
  "calendarDays": 31,
  "businessDays": 22,
  "weekend": ["Sunday", "Saturday"],
  "holidaysExcluded": [
    {
      "date": "2026-12-25",
      "name": "Christmas Day",
      "localName": "Noël"
    }
  ],
  "holidaysOnWeekend": [],
  "rules": "Weekend days and nationwide public holidays are excluded; regional holidays are not.",
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}
Response fields (21)

Schema: #/components/schemas/BusinessDays

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-31&end=2026-12-01'
400  {"error":{"code":"invalid_range","message":"Parameter \"end\" must not be before \"start\"."}}
curl 'https://clockcrest.com/api/v1/business-days?country=ZZ&start=2026-12-01&end=2026-12-31'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

Try it in the playground

GET /api/v1/business-days/add

Add or subtract business days. The date reached by stepping a number of business days forward (or backward, with a negative number) from a start date, skipping the country's weekend days and nationwide public holidays. The start date itself is not counted.

MCP tool: add_business_days

Parameters

ParameterDescription
country
required string
ISO 3166-1 alpha-2 country code, e.g. FR
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: EG
start
required string
Start date, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-30
days
required integer
Business days to add; negative to go back (−1000 to 1000)
≥ -1000 · ≤ 1000 · Example: 5

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/business-days/add?country=EG&start=2026-12-30&days=5'
{
  "country": "EG",
  "countryName": "Egypt",
  "start": "2026-12-30",
  "startWeekday": "Wednesday",
  "startIsBusinessDay": true,
  "days": 5,
  "result": "2027-01-06",
  "resultWeekday": "Wednesday",
  "calendarDays": 7,
  "weekend": ["Friday", "Saturday"],
  "holidaysSkipped": [],
  "rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. The start date itself is not counted: the result is the 5 business days after it.",
  "notes": ["The weekend used for EG is the one documented for that country."],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "lastUpdated": "2026-11-30",
  "dataYears": [2025, 2026, 2027, 2028]
}
Response fields (20)

Schema: #/components/schemas/BusinessDaysAdd

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/business-days/add?country=FR&start=2028-12-20&days=20'
400  {"error":{"code":"range_not_covered","message":"Holiday data for FR covers 2025, 2026, 2027, 2028 only; 2029 is outside it."}}
curl 'https://clockcrest.com/api/v1/business-days/add?country=ZZ&start=2026-12-01&days=5'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

Try it in the playground

GET /api/v1/business-days/next

Is a date a business day, and what is the next one. Whether a date is a business day in a country (and if not, why) and the first business day strictly after it.

Parameters

ParameterDescription
country
required string
ISO 3166-1 alpha-2 country code, e.g. FR
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: FR
date
required string
Date to check, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-24

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-12-24'
{
  "country": "FR",
  "countryName": "France",
  "date": "2026-12-24",
  "weekday": "Thursday",
  "isBusinessDay": true,
  "reason": null,
  "holiday": null,
  "nextBusinessDay": "2026-12-28",
  "nextBusinessDayWeekday": "Monday",
  "daysUntilNext": 4,
  "weekend": ["Sunday", "Saturday"],
  "rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. \"nextBusinessDay\" is strictly after \"date\".",
  "notes": [
    "No special weekend is documented for FR: Saturday–Sunday is assumed. Countries with a documented different weekend: BD, BH, DZ, EG, IL, IQ, IR, JO, KW, LY, MV, NP, OM, PS, QA, SA, SD, SY, YE."
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "lastUpdated": "2026-11-30",
  "dataYears": [2025, 2026, 2027, 2028]
}
Response fields (20)

Schema: #/components/schemas/NextBusinessDay

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-02-30'
400  {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}
curl 'https://clockcrest.com/api/v1/business-days/next?country=ZZ&date=2026-12-24'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

Try it in the playground

Dates and calendars

Date arithmetic, ISO weeks, month calendars and calendar-system conversion.

GET /api/v1/calendar

Month calendar with ISO weeks, weekend days and holidays. A month laid out in ISO weeks (Monday first) with ISO week numbers. With "country", that country's weekend days and public holidays are marked and its business days counted.

MCP tool: get_calendar

Parameters

ParameterDescription
year
required integer
Four-digit year (1900–2100; with a country, a year that has holiday data)
≥ 1900 · ≤ 2100 · Example: 2026
month
required integer
Month number, 1–12
≥ 1 · ≤ 12 · Example: 12
country
optional string
Mark this country's weekend and public holidays (ISO 3166-1 alpha-2)
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · Example: FR

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2026&month=12'
{
  "year": 2026,
  "month": 12,
  "monthName": "December",
  "country": "FR",
  "countryName": "France",
  "weekStart": "Monday",
  "weekend": ["Sunday", "Saturday"],
  "daysInMonth": 31,
  "businessDays": 22,
  "weeks": [
    {
      "isoWeek": 49,
      "isoWeekYear": 2026,
      "days": [
        null,
        // … 6 more
      ]
    },
    // … 4 more
  ],
  "holidays": [
    {
      "date": "2026-12-25",
      "name": "Christmas Day",
      "localName": "Noël",
      "nationwide": true,
      "types": ["Public"]
    }
  ],
  "notes": [
    "Rows are ISO 8601 weeks (Monday to Sunday); null cells pad the first and last week. Week 1 is the week that contains the first Thursday of the year.",
    // … 2 more
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (33)

Schema: #/components/schemas/MonthCalendar

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/calendar?year=2026&month=13'
400  {"error":{"code":"out_of_range","message":"Parameter \"month\" must be between 1 and 12."}}
curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2031&month=1'
404  {"error":{"code":"year_not_found","message":"No holiday data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}

404: No holiday data for that country or year.

Try it in the playground

GET /api/v1/calendar/convert

Convert a date between calendar systems. Converts a date between the Gregorian, Hijri (Umm al-Qura), Persian (Solar Hijri) and Hebrew calendars. The response notes state the Hijri variant and the moon-sighting caveat.

MCP tool: convert_calendar

Parameters

ParameterDescription
date
required string
Date in the source calendar as year-month-day with a four-digit year, e.g. 2026-12-01 or 1448-09-01
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01
from
required string
Source calendar
gregorian | islamic-umalqura | persian | hebrew · Example: gregorian
to
required string
Target calendar
gregorian | islamic-umalqura | persian | hebrew · Example: islamic-umalqura

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-umalqura'
{
  "input": {
    "calendar": "gregorian",
    "year": 2026,
    "month": 12,
    "day": 1,
    "monthName": "December",
    "date": "2026-12-01"
  },
  "result": {
    "calendar": "islamic-umalqura",
    "year": 1448,
    "month": 6,
    "day": 21,
    "monthName": "Jumada II",
    "date": "1448-06-21"
  },
  "gregorian": "2026-12-01",
  "weekday": "Tuesday",
  "notes": [
    "Months are numbered by their position in the year. A Hebrew leap year has 13 months (Adar I = 6, Adar II = 7); month names are the English names from the runtime's CLDR data.",
    // … 3 more
  ],
  "supportedCalendars": ["gregorian", "islamic-umalqura", "persian", "hebrew"],
  "source": "ICU / CLDR calendars (runtime Intl)"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (19)

Schema: #/components/schemas/CalendarConversion

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-civil'
400  {"error":{"code":"invalid_calendar","message":"Parameter \"to\" must be one of: gregorian, islamic-umalqura, persian, hebrew. Other calendars (including islamic-civil) are not supported."}}

Try it in the playground

GET /api/v1/date/difference

Difference between two dates. Days between two calendar dates, also expressed as weeks and days and as years, months and days.

MCP tool: calculate_date_difference

Parameters

ParameterDescription
start
required string
First date, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2024-02-29
end
required string
Second date, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/date/difference?start=2024-02-29&end=2026-12-01'
{
  "start": "2024-02-29",
  "startWeekday": "Thursday",
  "end": "2026-12-01",
  "endWeekday": "Tuesday",
  "days": 1006,
  "negative": false,
  "weeks": {
    "weeks": 143,
    "days": 5
  },
  "calendar": {
    "years": 2,
    "months": 9,
    "days": 2
  },
  "notes": [
    "\"days\" is end minus start (the end date is not counted; negative when end is before start). \"weeks\" and \"calendar\" describe the absolute difference.",
    "\"calendar\" counts whole years and months first, then the remaining days; a month-end start is clamped (31 January + 1 month = 28 or 29 February)."
  ],
  "source": "Proleptic Gregorian calendar arithmetic"
}
Response fields (15)

Schema: #/components/schemas/DateDifference

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/date/difference?start=2026-02-29&end=2026-03-01'
400  {"error":{"code":"invalid_date","message":"Parameter \"start\" must be a calendar date like 2026-12-01."}}

Try it in the playground

GET /api/v1/date/add

Add years, months, weeks and days to a date. Adds (or, with negative numbers, subtracts) years, months, weeks and days. Years and months are applied first, clamped to the end of the month; then weeks and days.

MCP tool: add_duration

Parameters

ParameterDescription
date
required string
Start date, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2024-01-31
years
optional integer
Years to add (may be negative)
≥ -9999 · ≤ 9999
months
optional integer
Months to add (may be negative)
≥ -120000 · ≤ 120000 · Example: 1
weeks
optional integer
Weeks to add (may be negative)
≥ -520000 · ≤ 520000
days
optional integer
Days to add (may be negative)
≥ -3650000 · ≤ 3650000

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/date/add?date=2024-01-31&months=1'
{
  "date": "2024-01-31",
  "weekday": "Wednesday",
  "added": {
    "years": 0,
    "months": 1,
    "weeks": 0,
    "days": 0
  },
  "result": "2024-02-29",
  "resultWeekday": "Thursday",
  "resultIsoWeek": 9,
  "resultIsoWeekYear": 2024,
  "daysBetween": 29,
  "notes": [
    "Years and months are added first, clamping to the last day of the month when needed (31 January + 1 month = 28 or 29 February); weeks and days are added afterwards."
  ],
  "source": "Proleptic Gregorian calendar arithmetic"
}
Response fields (14)

Schema: #/components/schemas/DateAdd

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/date/add?date=2026-01-31'
400  {"error":{"code":"missing_parameter","message":"Give at least one of \"years\", \"months\", \"weeks\" or \"days\"."}}

Try it in the playground

GET /api/v1/date/week-number

ISO week number of a date. ISO 8601 week number and week-year of a date, with the Monday and Sunday of that week, the day of the year and leap-year information.

Parameters

ParameterDescription
date
required string
Date, YYYY-MM-DD
/^\d{4}-\d{2}-\d{2}$/ · Example: 2027-01-01

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/date/week-number?date=2027-01-01'
{
  "date": "2027-01-01",
  "weekday": "Friday",
  "isoWeekday": 5,
  "isoWeek": 53,
  "isoWeekYear": 2026,
  "isoWeekDate": "2026-W53-5",
  "weeksInIsoYear": 53,
  "weekStart": "2026-12-28",
  "weekEnd": "2027-01-03",
  "dayOfYear": 1,
  "daysInYear": 365,
  "isLeapYear": false,
  "notes": [
    "ISO 8601 week numbering: weeks start on Monday and week 1 is the week with the year's first Thursday, so the first and last days of a year can belong to a week of the neighbouring year (\"isoWeekYear\")."
  ],
  "source": "ISO 8601 week date (proleptic Gregorian calendar)"
}
Response fields (14)

Schema: #/components/schemas/WeekNumber

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/date/week-number?date=01/01/2027'
400  {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}

Try it in the playground

Astronomy

Sunrise and sunset, moon phases and Islamic prayer times (calculated).

GET /api/v1/astronomy/sun

Sunrise, sunset, solar noon and twilight. Sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight for a place and date. Polar day and polar night are reported explicitly.

MCP tool: get_sunrise_sunset

Parameters

ParameterDescription
lat
required number
Latitude in decimal degrees, north positive
≥ -90 · ≤ 90 · Example: 30.06
lon
required number
Longitude in decimal degrees, east positive
≥ -180 · ≤ 180 · Example: 31.25
date
required string
Local date at the place, YYYY-MM-DD (1900–2100)
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01
tz
required string
IANA time zone of the place, e.g. Africa/Cairo
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: Africa/Cairo

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/astronomy/sun?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo'
{
  "date": "2026-12-01",
  "lat": 30.06,
  "lon": 31.25,
  "timeZone": "Africa/Cairo",
  "sunrise": {
    "utc": "2026-12-01T04:33:21Z",
    "local": "2026-12-01T06:33:21+02:00"
  },
  "sunset": {
    "utc": "2026-12-01T14:54:38Z",
    "local": "2026-12-01T16:54:38+02:00"
  },
  "solarNoon": {
    "utc": "2026-12-01T09:43:59Z",
    "local": "2026-12-01T11:43:59+02:00"
  },
  "dayLengthSeconds": 37277,
  "dayLength": "10:21:17",
  "polar": null,
  "polarNote": null,
  "twilight": {
    "civil": {
      "dawn": {
        "utc": "2026-12-01T04:07:21Z",
        "local": "2026-12-01T06:07:21+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T15:20:38Z",
        "local": "2026-12-01T17:20:38+02:00"
      }
    },
    "nautical": {
      "dawn": {
        "utc": "2026-12-01T03:37:49Z",
        "local": "2026-12-01T05:37:49+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T15:50:10Z",
        "local": "2026-12-01T17:50:10+02:00"
      }
    },
    "astronomical": {
      "dawn": {
        "utc": "2026-12-01T03:08:50Z",
        "local": "2026-12-01T05:08:50+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T16:19:09Z",
        "local": "2026-12-01T18:19:09+02:00"
      }
    }
  },
  "notes": [
    "Sunrise and sunset are the moments the Sun's upper limb is on a sea-level horizon with standard refraction (centre 0.833° below it). Typical accuracy is 1–2 minutes below 72° latitude; terrain, elevation and unusual refraction are not modelled.",
    // … 2 more
  ],
  "source": "NOAA solar position algorithm (Jean Meeus, Astronomical Algorithms)",
  "sourceUrl": "https://gml.noaa.gov/grad/solcalc/calcdetails.html"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (42)

Schema: #/components/schemas/Sun

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/astronomy/sun?lat=95&lon=31.25&date=2026-12-01&tz=Africa/Cairo'
400  {"error":{"code":"out_of_range","message":"Parameter \"lat\" must be between -90 and 90."}}

Try it in the playground

GET /api/v1/astronomy/moon

Moon phase, illumination and next phases. Phase name, illuminated fraction and age of the Moon, and the next new moon, first quarter, full moon and last quarter. Without "date" the phase is for the current moment.

MCP tool: get_moon_phase

Parameters

ParameterDescription
date
optional string
Date, YYYY-MM-DD, evaluated at 12:00 UTC (1900–2100). Default: now.
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01

Caching

Cache-Control: public, max-age=86400 (when the request names a date) · public, max-age=300 (otherwise) · public, max-age=86400 (sent in the captured response)

Example request and response
curl 'https://clockcrest.com/api/v1/astronomy/moon?date=2026-12-01'
{
  "date": "2026-12-01",
  "at": "2026-12-01T12:00:00Z",
  "phase": "last-quarter",
  "phaseName": "Last Quarter",
  "illumination": 0.4747,
  "illuminationPercent": 47.5,
  "ageDays": 22.21,
  "cycleAngle": 272.8,
  "waxing": false,
  "nextNewMoon": "2026-12-09T00:51:46Z",
  "nextFirstQuarter": "2026-12-17T05:42:35Z",
  "nextFullMoon": "2026-12-24T01:28:08Z",
  "nextLastQuarter": "2026-12-30T18:59:29Z",
  "notes": [
    "A date without a time is evaluated at 12:00:00 UTC.",
    "The phase is geocentric: it is the same everywhere on Earth at a given instant. Principal phases (new, quarters, full) are reported for about half a day either side of their exact moment.",
    // … 1 more
  ],
  "source": "Jean Meeus, Astronomical Algorithms (2nd ed.), chapters 48–49"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (15)

Schema: #/components/schemas/Moon

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/astronomy/moon?date=1600-01-01'
400  {"error":{"code":"out_of_range","message":"Parameter \"date\" must be between 1900-01-01 and 2100-12-31."}}

Try it in the playground

GET /api/v1/prayer-times

Islamic prayer times. Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha for a place and date, with the parameters of the calculation method used. Local authorities may publish times that differ by a few minutes.

MCP tool: get_prayer_times

Parameters

ParameterDescription
lat
required number
Latitude in decimal degrees, north positive
≥ -90 · ≤ 90 · Example: 30.06
lon
required number
Longitude in decimal degrees, east positive
≥ -180 · ≤ 180 · Example: 31.25
date
required string
Local date at the place, YYYY-MM-DD (1900–2100)
/^\d{4}-\d{2}-\d{2}$/ · Example: 2026-12-01
tz
required string
IANA time zone of the place, e.g. Africa/Cairo
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: Africa/Cairo
method
optional string
Calculation method: mwl (Muslim World League), umm-al-qura, egyptian, karachi or isna. Default mwl.
mwl | umm-al-qura | egyptian | karachi | isna · Default: mwl · Example: egyptian
asr
optional string
Asr rule: standard (Shafi'i, Maliki, Hanbali) or hanafi. Default standard.
standard | hanafi · Default: standard

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/prayer-times?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo&method=egyptian'
{
  "date": "2026-12-01",
  "lat": 30.06,
  "lon": 31.25,
  "timeZone": "Africa/Cairo",
  "times": {
    "fajr": {
      "utc": "2026-12-01T03:01:40Z",
      "local": "2026-12-01T05:01:40+02:00"
    },
    "sunrise": {
      "utc": "2026-12-01T04:33:21Z",
      "local": "2026-12-01T06:33:21+02:00"
    },
    "dhuhr": {
      "utc": "2026-12-01T09:43:59Z",
      "local": "2026-12-01T11:43:59+02:00"
    },
    "asr": {
      "utc": "2026-12-01T12:35:32Z",
      "local": "2026-12-01T14:35:32+02:00"
    },
    "maghrib": {
      "utc": "2026-12-01T14:54:38Z",
      "local": "2026-12-01T16:54:38+02:00"
    },
    "isha": {
      "utc": "2026-12-01T16:16:45Z",
      "local": "2026-12-01T18:16:45+02:00"
    }
  },
  "method": {
    "id": "egyptian",
    "name": "Egyptian General Authority of Survey",
    "fajrAngle": 19.5,
    "ishaAngle": 17.5,
    "ishaMinutesAfterMaghrib": null,
    "ramadan": null
  },
  "asr": {
    "school": "standard",
    "shadowFactor": 1
  },
  "highLatitudeApproximation": false,
  "polar": false,
  "notes": [
    "Calculated times. Mosques and local religious authorities may publish times that differ by a few minutes (rounding, safety margins, a different method or local practice); follow the local timetable where one exists.",
    // … 3 more
  ],
  "methods": ["mwl", "umm-al-qura", "egyptian", "karachi", "isna"],
  "source": "Solar position: NOAA algorithm (Jean Meeus); angles: the published parameters of each method"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (38)

Schema: #/components/schemas/PrayerTimes

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/prayer-times?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo&method=custom'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"method\" must be one of: mwl, umm-al-qura, egyptian, karachi, isna."}}

Try it in the playground

Weather

Weather forecasts from MET Norway (Locationforecast 2.0, CC BY 4.0), cached.

GET /api/v1/weather

Weather forecast for a place (MET Norway). Current conditions, the next 24 hours hour by hour and a 7-day outlook (daily low, high, precipitation and symbol) for coordinates or a city, from MET Norway's Locationforecast 2.0. Give "lat" and "lon", or "city". Coordinates are snapped to a 0.1° grid (about 11 km) and forecasts are cached until MET's own expiry time (at least 10 minutes); forecasts that are not cached yet are limited per client (429 rate_limited) and in total (503 data_unavailable), both with Retry-After. Credit "Weather data from MET Norway" (CC BY 4.0) wherever the data is shown.

MCP tool: get_weather

Parameters

ParameterDescription
lat
optional number
Latitude in decimal degrees, north positive (−90 to 90). Use with lon, instead of city.
≥ -90 · ≤ 90 · Example: 59.91
lon
optional number
Longitude in decimal degrees, east positive (−180 to 180). Use with lat, instead of city.
≥ -180 · ≤ 180 · Example: 10.75
city
optional string
City instead of coordinates: a city slug of clockcrest.com (e.g. new-york) or a name looked up in the city index (e.g. Oslo, القاهرة)
length ≥ 1 · length ≤ 64
tz
optional string
IANA time zone for local times and daily grouping. Default: the city's zone, or UTC with coordinates.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · Example: Europe/Oslo

Caching

Cache-Control: public, max-age=600 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/weather?lat=59.91&lon=10.75&tz=Europe/Oslo'
{
  "location": {
    "lat": 59.9,
    "lon": 10.8,
    "elevation": 138,
    "name": null,
    "country": null,
    "timeZone": "Europe/Oslo"
  },
  "updated": "2026-12-01T12:35:33Z",
  "expires": "2026-12-01T13:53:01Z",
  "current": {
    "time": "2026-12-01T13:00:00Z",
    "local": "2026-12-01T14:00:00+01:00",
    "temperature": 7.7,
    "symbol": "lightrain",
    "windSpeed": 5.8,
    "windDirection": 188,
    "humidity": 99.9,
    "cloudCover": 100,
    "pressure": 1014,
    "precipitationNextHour": 0.1
  },
  "hourly": [
    {
      "time": "2026-12-01T13:00:00Z",
      "local": "2026-12-01T14:00:00+01:00",
      "temperature": 7.7,
      "symbol": "lightrain",
      "windSpeed": 5.8,
      "windDirection": 188,
      "precipitation": 0.1,
      "humidity": 99.9
    },
    // … 23 more
  ],
  "daily": [
    {
      "date": "2026-12-01",
      "min": 6.7,
      "max": 7.7,
      "symbol": "lightrain",
      "precipitation": 1.1
    },
    // … 6 more
  ],
  "units": {
    "temperature": "celsius",
    "windSpeed": "m/s",
    "windDirection": "degrees",
    "precipitation": "mm",
    "humidity": "%",
    "cloudCover": "%",
    "pressure": "hPa"
  },
  "notes": [
    "Forecast for the coordinates snapped to a 0.1° grid (about 11 km); \"location\" gives the point used. \"current\" is the forecast step for the present hour, not a station observation.",
    // … 3 more
  ],
  "source": "MET Norway Locationforecast 2.0",
  "sourceUrl": "https://api.met.no/weatherapi/locationforecast/2.0/documentation",
  "attribution": "Weather data from MET Norway",
  "license": "CC BY 4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (49)

Schema: #/components/schemas/Weather

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/weather?lat=95&lon=10.75'
400  {"error":{"code":"out_of_range","message":"Parameter \"lat\" must be between -90 and 90."}}
curl 'https://clockcrest.com/api/v1/weather?city=xqzvw'
404  {"error":{"code":"city_not_found","message":"No city in the index matches the \"city\" parameter."}}

404: No city in the index matches "city".

Try it in the playground

Markets

Regular trading hours of major stock exchanges.

GET /api/v1/markets/hours

Stock-exchange regular trading hours and status. Regular trading sessions of major stock exchanges with each exchange's own source page, whether the timetable says it is open now, and the next open and close. Exchange holidays and early closes are not modelled.

MCP tool: get_market_hours

Parameters

ParameterDescription
exchange
optional string
Only this exchange: nyse, nasdaq, tsx, lse, euronext-paris, xetra, six, bist, tadawul, dfm, adx, egx, jse, nse, bse, sgx, hkex, sse, szse, tse, krx, asx, nzx
nyse | nasdaq | tsx | lse | euronext-paris | xetra | six | bist | tadawul | dfm | adx | egx | jse | nse | bse | sgx | hkex | sse | szse | tse | krx | asx | nzx · Example: nyse

Caching

Cache-Control: public, max-age=30 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=nyse'
{
  "at": "2026-12-01T13:46:27Z",
  "exchange": "nyse",
  "count": 1,
  "exchanges": [
    {
      "id": "nyse",
      "name": "NYSE",
      "fullName": "New York Stock Exchange",
      "city": "New York",
      "country": "US",
      "region": "americas",
      "timeZone": "America/New_York",
      "tradingDays": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "open": "09:30",
      "close": "16:00",
      "lunchBreak": null,
      "closingAuction": null,
      "sourceUrl": "https://www.nyse.com/markets/hours-calendars",
      "status": {
        "state": "closed",
        "isOpen": false,
        "localTime": "2026-12-01T08:46:27-05:00",
        "nextEvent": {
          "kind": "open",
          "at": "2026-12-01T14:30:00Z",
          "local": "2026-12-01T09:30:00-05:00"
        },
        "nextOpen": "2026-12-01T14:30:00Z",
        "nextClose": "2026-12-01T21:00:00Z"
      }
    }
  ],
  "notes": [
    "Exchange holidays, early closes and unscheduled halts are NOT modelled: \"status\" is what the regular weekly timetable says. Check the exchange's own calendar (\"sourceUrl\") before relying on it.",
    // … 2 more
  ],
  "source": "Each exchange's published trading hours (see \"sourceUrl\" per exchange)",
  "lastUpdated": "2026-11-30"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (32)

Schema: #/components/schemas/MarketHours

Loading…
Error examples (2)
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=NYSE!'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"exchange\" must be an exchange id such as nyse."}}
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=lse2'
404  {"error":{"code":"exchange_not_found","message":"Unknown exchange. Available ids: nyse, nasdaq, tsx, lse, euronext-paris, xetra, six, bist, tadawul, dfm, adx, egx, jse, nse, bse, sgx, hkex, sse, szse, tse, krx, asx, nzx."}}

404: Unknown exchange id.

Try it in the playground

Widgets

Embeddable clock templates and the parameters of the embed pages.

GET /api/v1/widgets/templates

Embeddable widget templates and their parameters. The thirty clock designs of the embeddable ClockCrest widgets — id, name in four languages, category, natural size and defaults — with an example embed URL each, the designs of the other widgets (calendar, countdown, stopwatch, timer, world clock table, prayer times, public holidays, converter, sunrise and sunset), and every query parameter the embed pages accept. Read-only reference data: the widgets themselves run in the visitor's browser and do not call this API.

Parameters

ParameterDescription
category
optional string
Only the templates of this category: analog, digital, advanced
analog | digital | advanced · Example: digital

Caching

Cache-Control: public, max-age=86400 ✓ sent in the captured response

Example request and response
curl 'https://clockcrest.com/api/v1/widgets/templates?category=digital'
{
  "category": "digital",
  "count": 10,
  "templates": [
    {
      "id": "digital-classic",
      "names": {
        "en": "Classic digital",
        "ar": "رقمية كلاسيكية",
        "fr": "Numérique classique",
        "es": "Digital clásico"
      },
      "category": "digital",
      "engine": "text",
      "width": 320,
      "height": 160,
      "defaults": {
        "theme": "auto",
        "seconds": true,
        "date": true,
        "weekday": true,
        "abbr": false,
        "offset": true,
        "flag": false,
        "transparent": false,
        "font": "system",
        "radius": 0,
        "border": 1,
        "shadow": 0,
        "zones": []
      },
      "supports": {
        "seconds": true,
        "extraZones": 0,
        "coordinates": false
      },
      "embedUrl": "https://clockcrest.com/embed/clock/?template=digital-classic",
      "studioUrl": "https://clockcrest.com/widgets/studio/?template=digital-classic"
    },
    // … 9 more
  ],
  "widgets": [
    {
      "type": "countdown",
      "element": "clockcrest-countdown",
      "embedUrl": "https://clockcrest.com/embed/countdown/",
      "defaultTemplate": "cd-classic",
      "templates": [
        {
          "id": "cd-classic",
          "names": {
            "en": "Classic countdown",
            "ar": "عدّ تنازلي كلاسيكي",
            "fr": "Compte à rebours classique",
            "es": "Cuenta regresiva clásica"
          },
          "width": 320,
          "height": 160,
          "embedUrl": "https://clockcrest.com/embed/countdown/?to=2027-01-01T00%3A00",
          "studioUrl": "https://clockcrest.com/widgets/studio/?type=countdown&to=2027-01-01T00%3A00"
        },
        // … 2 more
      ]
    },
    // … 8 more
  ],
  "parameters": [
    {
      "name": "template",
      "type": "enum",
      "description": "Design: for a clock one of the ids listed in \"templates\" (omitted: digital-classic); for another widget one of the ids listed for it in \"widgets\" (omitted: its first design).",
      "values": [
        "analog-classic",
        "analog-minimal",
        "analog-luxury",
        "analog-roman",
        "analog-wood",
        "analog-scandi",
        "analog-transparent",
        "analog-industrial",
        "analog-swiss",
        "analog-kids",
        "digital-classic",
        "digital-led-red",
        // … 48 more
      ],
      "minimum": null,
      "maximum": null,
      "appliesTo": ["clock", "countdown", "calendar"]
    },
    // … 38 more
  ],
  "notes": [
    "A widget is the page at \"embedUrl\", meant to be placed in an <iframe>. It shows the time of the visitor's device clock converted with the IANA time zone database of their browser; the embed pages make no network request, so they do not use this API.",
    // … 5 more
  ],
  "source": "ClockCrest widget template registry",
  "lastUpdated": "2026-12-01"
}

Shortened: long lists show their first item and a “// … N more” line.

Response fields (60)

Schema: #/components/schemas/WidgetTemplates

Loading…
Error examples (1)
curl 'https://clockcrest.com/api/v1/widgets/templates?category=round'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"category\" must be one of: analog, digital, advanced."}}

Try it in the playground