RapidAPI documentation
Preserved marketplace examples, headers, signing notes, and endpoint guides for existing RapidAPI customers.
Legacy RapidAPI documentation
These are the original marketplace-oriented guides, retained for existing RapidAPI integrations. They cover the RapidAPI key and host headers, endpoint selectors, bulk requests, signed responses, calendar calculations, clocks, and error handling.
Endpoint guides
Read request details and examples for a specific endpoint, or browse them all.
Getting started
- Open the RapidAPI compatibility guide and subscribe to the TimeLogic API listing.
- Copy your RapidAPI key and keep it server-side as RAPIDAPI_KEY.
- Make your first request:
curl "https://timelogic-api-world-time-timezones-time-calculations.p.rapidapi.com/v1/time/current?tz=Europe/Paris" -H "X-RapidAPI-Key: $RAPIDAPI_KEY" -H "X-RapidAPI-Host: timelogic-api-world-time-timezones-time-calculations.p.rapidapi.com"
RapidAPI supplies the marketplace subscription, authentication headers, and usage dashboard for this transport.
Authentication
RapidAPI requests use the marketplace key and host headers. Keep both values server-side; never embed them in browser code or commit them to source control.
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: timelogic-api-world-time-timezones-time-calculations.p.rapidapi.com
Use the RapidAPI compatibility guide for marketplace billing and subscription details.
Selectors
Most endpoints accept exactly one selector family per request to identify the location or moment you care about:
tz: IANA timezone name, e.g.Europe/Parisip: IPv4 or IPv6 address (resolved via MaxMind GeoLite2)lat+lon: coordinates in decimal degreesoffset: fixed UTC offset, URL-encode+as%2B(e.g.offset=%2B02:00)auto_tz=true: the timezone of the caller's IP address, as seen by the edge network (accepted on every route that takes a target except/v1/time/clock)
Mixing families in the same request returns 400 AMBIGUOUS_TARGET ("Provide only one of tz, ip, lat/lon, offset, auto_tz."). On /v1/time/convert and /v1/time/add, utc=true is a sixth target and cannot be combined with the others either; the error message lists only the five selector families, but utc=true counts as one.
On /v1/time/convert, /v1/time/calendar, /v1/time/clock, /v1/time/add and /v1/time/elapsed, the input timestamp uses a separate set of forms: unix=…, unix_ms=…, or iso=… (optionally paired with a source_tz / source_ip / source_lat+source_lon / source_offset hint when iso is local). The target is then chosen with the standard selector family above.
Timezone names
- Names are matched case-insensitively:
tz=america/new_yorkworks and the response uses the canonical spelling (America/New_York). - Links and aliases are resolved to their canonical tzdata zone, so the returned
timezonecan differ from the name you sent:Europe/StockholmreturnsEurope/Berlin,Asia/CalcuttareturnsAsia/Kolkata,US/EasternreturnsAmerica/New_York, andUTCreturnsEtc/UTC. Always render the returnedtimezone, not your input. Etc/GMT±Nzones use the POSIX sign convention, which is the reverse of what most people expect:Etc/GMT+5is UTC−05:00. URL-encode the+(tz=Etc/GMT%2B5).- An unknown name returns
400 INVALID_PARAMETER("Invalid timezone.").
Offsets
- The only accepted form is
±HH:MM, for example%2B05:30or-03:00.+0530,+5and+05are rejected with400 INVALID_PARAMETER("Invalid offset. Use ±HH:MM."). - An unencoded
+in a query string is read as a space, sooffset=+02:00fails with the same message. Send%2B02:00. - An offset target has no IANA zone:
timezoneisnullandhumanends with a label such asUTC+02:00. /v1/timezone?offset=…lists the real places currently at that offset inmatching_zones. It returns geographic zones only:UTCandEtc/*zones are intentionally left out, sooffset=%2B00:00lists places such asEurope/London,Europe/LisbonandAfrica/Abidjan. Usetz=UTC(ortz=Etc/UTC) when you want UTC itself.
No selector, and utc=true
With no selector, /v1/time/current, /v1/time/dst, /v1/time/calendar and /v1/time/add answer in UTC, and the response has "iso_local": null and "timezone": null (the human text ends in UTC). utc=true on convert and add gives the same shape. /v1/time/convert and /v1/timezone need a target and return 400 MISSING_TARGET without one.
Input timestamps
unixis whole seconds (1711300000.5is rejected) andunix_mswhole milliseconds. Negative values (before 1970) are fine.- Every timestamp input, and every computed result, must fall between
0001-01-01T00:00:00Zand9999-12-31T23:59:59Z(unix-62135596800 to 253402300799). Values outside that range return400 INVALID_TIMESTAMPwith the supported range in the message andmin_unix/max_unixindetails. - Accepted
isoshapes:2026-04-16T09:00:00Z,2026-04-16T09:00:00+05:30, an offset with seconds (1900-06-01T12:09:21+00:09:21, the formiso_localuses for old local-mean-time offsets, so aniso_localvalue can be sent back as input), fractional seconds (2026-04-16T09:00:00.789Z, kept inunix_ms), a space instead ofT(2026-04-16 09:00:00Z, URL-encoded), a local time with no offset (2026-04-16T09:00:00), and a date alone (2026-04-16, read as 00:00). Basic format (20260416T090000Z) and offsets without a colon (+0530) return400 INVALID_TIMESTAMP. - Dates must exist:
2027-02-29or2026-04-31return400 INVALID_TIMESTAMP("Invalid ISO timestamp: 2027-02-29 is not a valid calendar date.") instead of rolling over to the next month. - A local
iso(noZor offset) is interpreted in the zone given by itssource_*hint. Without a hint it is read as UTC, with no warning. - Daylight-saving edges for local times: a wall time that does not exist (inside a spring-forward gap, such as
2026-03-08T02:30:00inAmerica/New_York) returns400 INVALID_TIMESTAMP("Local time could not be resolved for the requested timezone."). A wall time that happens twice (fall-back, such as2026-11-01T01:30:00in New York) resolves to the first occurrence (01:30 EDT,05:30Z); there is no parameter to choose the second. Send an explicit offset when you need the later one.
Boolean flags
Flags such as sign, business_days, week, next, utc and auto_tz are turned on by true, 1 or yes, in any letter case. Any other value (false, 0, no, an empty value, a bare ?sign, or an unrecognized word such as maybe) leaves the flag off without an error.
Unknown parameters
Parameters the endpoint does not know are ignored, not rejected. A typo such as day=1 (for days) or time=… (for iso) silently has no effect, so check your parameter names against each endpoint's reference.
Other response conventions
day_numbercounts from Sunday: 1 = Sunday, 2 = Monday … 7 = Saturday. (This is neither ISO 8601, where Monday is 1, nor JavaScript'sgetDay(), where Sunday is 0.)- Coordinates at sea resolve to nautical zones such as
Etc/GMT+8(UTC−08:00, with the POSIX sign);lat=0&lon=0resolves toAfrica/Abidjan. dstfollows tzdata, including negative DST:Europe/Dublinreportsdst: truein winter (at +00:00) andfalsein summer. That is tzdata's model for Ireland, not an error.
format
format adds a formatted field rendered with a strftime-style pattern. The supported directives are:
%a %A %b %B %C %d %D %e %F %h %H %I %j %k %l %m %M %n %p %P %r %R %s %S %t %T %u %v %w %x %X %y %Y %z %:z %Z %%
The flags - (no padding), _ (space padding) and 0 (zero padding) work on the numeric directives, for example %-d. Any other directive (for example %U, %f or %Q), or a trailing %, returns 400 INVALID_PARAMETER naming the directive, with the supported list in details.supported. Use %% for a literal percent sign.
%Z prints the IANA zone name (Europe/London), not an abbreviation such as GMT or BST. For an offset target it prints a label such as UTC+02:00, and UTC when there is no target. %z prints +0100 and %:z prints +01:00.
/v1/time/diff and /v1/time/elapsed use their own duration placeholders instead (see their reference pages).
Bulk mode
/v1/time/current and /v1/time/convert support bulk mode by passing a comma-separated list to one selector (tz, ip, or offset). The response is an array in input order.
curl "https://api.timelogicapi.com/v1/time/current?tz=Europe/Paris,Asia/Tokyo,America/New_York" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
# convert one instant into three target offsets
curl "https://api.timelogicapi.com/v1/time/convert?unix=1711300000&offset=-04:00,%2B00:00,%2B09:00" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
Rules:
- At most 10 values per request. More returns
400 INVALID_PARAMETER("Bulk selector 'tz' accepts at most 10 values."). - Any comma turns the request into a bulk request, even a trailing one:
tz=Europe/Paris,returns a one-element array, not an object. Empty items are dropped. lat/lonare never bulk:lat=48.85,35.6&lon=2.35,139.6returns400 INVALID_PARAMETER("Invalid coordinates.").- A bulk selector cannot be combined with another target selector, including
utc=true(400 AMBIGUOUS_TARGET).
Partial failures. A bulk call returns HTTP 200 even when some items fail. A failed item takes the place of its payload as an object with the input value, the error and the request ID:
[
{ "unix": 1711300000, "timezone": "Europe/Paris", "...": "..." },
{
"item": "Not/AZone",
"error": { "code": "INVALID_PARAMETER", "message": "Invalid timezone.", "details": { "tz": "Not/AZone" } },
"request_id": "3534e3fe-f916-4d44-a50b-8f92a74074c4"
}
]
Check each element for an error key. Item errors have no timestamp field.
Single-target routes. All other routes take one target. A comma-separated value there is read as one name and fails as such (for example 400 INVALID_PARAMETER "Invalid timezone." on add, dst, calendar or timezone); /v1/time/clock answers "Bulk selectors are not supported on /v1/time/clock."
Signed responses
Set sign=true (or 1 / yes, in any letter case) on a supported JSON route to receive a cryptographically signed response. Supported routes are current, convert, diff, add, calendar, DST, elapsed, and timezone. /v1/time/clock does not support signing. The WorldTimeAPI-compatible routes accept sign=true as well, on both JSON and .txt responses, with the body left byte-identical.
sign=false, any other value (for example sign=maybe), a bare ?sign, or repeated sign values do not request a signature, and no error is returned.
Error responses are signed too: a 400 such as tz=Not/AZone&sign=true carries the same signature headers, and so does a bulk response.
The JSON body is unchanged. The gateway adds these response headers:
| Header | Meaning |
|---|---|
X-TimeLogic-Key-Id | JWKS kid for the public key that verifies this response. On unsigned responses the same header carries the ID of your API key instead (see Errors & rate limits). |
X-TimeLogic-Signature-Alg | Signature algorithm: Ed25519. |
X-TimeLogic-Signature-Timestamp | Unix seconds used in the envelope. |
X-TimeLogic-Content-SHA256 | Standard-base64 SHA-256 of the exact response body bytes. |
X-TimeLogic-Signature-Input | Base64URL encoding of the exact UTF-8 v1 envelope that was signed. |
X-TimeLogic-Signature | Standard-base64 Ed25519 signature over the decoded Signature-Input bytes. |
What is signed
Decode X-TimeLogic-Signature-Input as Base64URL UTF-8. For v1 it contains exactly these newline-separated fields:
v1
kid:<key id>
status:<HTTP status>
method:<HTTP method>
path:<origin-form path and query>
timestamp:<Unix seconds>
content-sha256:<standard-base64 SHA-256>
The path includes the query string, including sign=true. For example, it can be /v1/time/current?tz=Europe%2FLondon&sign=true. The gateway writes this path in its own normalized, percent-encoded form, so it may not match the bytes you sent (tz=Europe/London becomes tz=Europe%2FLondon). An api_key query parameter is removed from the signed path. Compare the path semantically if you need to; verify the decoded header bytes exactly as received.
Host and proxy behavior
The envelope does not include the scheme, host, or Content-Type. It signs only the origin-form path and query, status, method, timestamp, and body hash.
This is intentional: a request can pass through the RapidAPI hostname and the gateway hostname without making verification depend on either host. Proxies may also normalize Content-Type. Do not rebuild a signing input from the URL host or a response content type; decode and verify the X-TimeLogic-Signature-Input header exactly as received.
Verify a response
- Keep the response body exactly as received and compute its SHA-256.
- Decode
X-TimeLogic-Signature-Input, confirm itscontent-sha256matches the body hash, and use itskidto select the matching public JWK. - Verify
X-TimeLogic-Signatureover the decoded envelope bytes. Do not reconstruct the envelope yourself. - Optionally compare the mirrored
kid, timestamp, and content-hash headers to the values inside the envelope.
Fetch the public keys from:
GET https://api.timelogicapi.com/.well-known/time-api-public-key
This route needs no API key. Add ?kid=<kid> to fetch a single key; an unknown kid returns 404 NOT_FOUND. Cache keys by kid; retained historical keys may remain available after rotation. The browser verifier performs these checks locally - paste a complete curl -i response and no response data is uploaded.
Diff & business days
Use /v1/time/diff for duration math between two specifier-encoded instants and /v1/time/elapsed for "since now" calculations.
from and to on /v1/time/diff are embedded specifiers: the value itself is a key=value pair, such as from=unix=1711300000, from=iso=2026-04-16T09:00:00, or from=now.
curl "https://api.timelogicapi.com/v1/time/diff?from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=FR" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
This returns "business_days": 83.
Add business_days=true to include a business_days count in the response. Pair it with holiday_country to subtract public holidays: any of the 249 countries with holiday calendars (862 calendars including subdivisions), as an ISO 3166-1 alpha-2 code in any letter case. Add holiday_subdivision for a regional calendar, for example holiday_country=GB&holiday_subdivision=ENG (England) or holiday_country=CH&holiday_subdivision=ZH (Zürich). holiday_country also accepts the combined ISO 3166-2 form, such as holiday_country=CH-ZH or holiday_country=US-CA; both forms select the same calendar.
How business days are counted
- Days are counted by calendar date: the start date is included and the end date is excluded (
[from, to)). A partial day counts as a whole day, so Monday 18:00Z to Tuesday 08:00Z is 1 business day. - The count is unsigned: swapping
fromandtogives the same number. - Weekends follow the calendar's country: Saturday and Sunday in 221 countries, Friday and Saturday in 18 (for example
SA,EG,IL), Sunday only in 8, Friday only inIR, and Friday and Sunday inBN; a subdivision uses its country's weekend. Withoutholiday_country, weekends are Saturday and Sunday. Public holidays of the chosen calendar are not counted. The current weekend applies to every year, so historical weekend changes are not modelled (see Holiday calendars). - Which calendar date: when a timezone is known for an endpoint, its date is taken in that zone. On diff that is
from_tz/to_tz(or the otherfrom_*/to_*hints) for anisoendpoint, or the zone of atz=,ip=oroffset=specifier. On elapsed it issource_tz(or anothersource_*hint) for the reference andcompare_source_*for the compared instant. With no zone, the UTC date is used. Example:from=iso=2026-01-12T08:00:00&from_tz=Asia/Tokyo&to=iso=2026-01-13T08:00:00&to_tz=Asia/Tokyocounts Monday Jan 12 in Tokyo and returns 1.
Supported holiday calendars
Holiday calendars cover 249 countries: 862 calendars in all, 249 national and 613 subdivision calendars in 35 countries. Holiday data covers the years 1900 to 2100.
- Subdivision codes are the ISO 3166-2 suffixes used by python-holidays: 1 to 3 letters or digits, any letter case. Digits and leading zeros are part of the code:
AT-9,FI-01,FR-971,FR-6AE(FI-1is notFI-01). - Subdivisions exist for
ADAMARATAUBABOBQBRBTCACHCLCVDEESFIFMFRGBGQINITMOMYNINONZPTSBSHSTSVTVUS. For example:UShas the 50 states,DCand 6 territories (USPS codes such asCA,NY,TX);IThas 107 provinces (RMRome,MIMilan);INhas 36 states and union territories (MHMaharashtra);NZhas 17 regional anniversary calendars (AUK,CAN,WGN, ...);FRhas 14 (6AEAlsace,57Moselle, the overseas regions and collectivities such as971Guadeloupe).IEhas a national calendar only. - Every country, its weekend and all subdivision codes: Holiday calendars.
More results for the example range above (January 2 to April 30, 2026):
| Calendar | business_days |
|---|---|
holiday_country=FR | 83 |
holiday_country=FR-6AE (Alsace: Good Friday is a holiday) | 82 |
holiday_country=CH&holiday_subdivision=ZH | 82 |
holiday_country=IN-MH | 76 |
holiday_country=SA (Friday–Saturday weekend) | 79 |
Errors
- A country with no holiday calendar returns
400 INVALID_PARAMETER("Unsupported holiday calendar."), for exampleLKorZZ, withholiday_country(andholiday_subdivision, when given) indetails. - An unknown subdivision for a supported country returns
400 INVALID_PARAMETER, for example "Unknown holiday_subdivision 'XX' for country DE.", withholiday_countryandholiday_subdivisionindetails. Codes must match exactly, soholiday_country=FI-1returns "Unknown holiday_subdivision '1' for country FI." (the code isFI-01). - A malformed code returns
400 INVALID_PARAMETER("Invalid holiday_country parameter." when the country part is not two letters, "Invalid holiday_subdivision parameter." whenholiday_subdivisionhas characters other than letters, digits and hyphens). holiday_country=US-CAtogether with a differentholiday_subdivisionreturns400 INVALID_PARAMETER("holiday_subdivision conflicts with the subdivision in holiday_country.").holiday_subdivisionwithoutholiday_countryreturns "holiday_subdivision requires holiday_country.", and either holiday parameter withoutbusiness_daysturned on returns "holiday_country and holiday_subdivision require business_days=true." (both400 INVALID_PARAMETER).- A business-day count with a holiday calendar whose dates fall outside the covered years returns
400 INVALID_PARAMETER("Holiday calendar coverage is only available for years 1900-2100."). business_daysis turned on bytrue,1oryes; any other value leaves it off and nobusiness_daysfield is returned.
Holiday calendars
862 holiday calendars in 249 countries: 249 national calendars and 613 subdivision calendars in 35 countries. Holiday data covers the years 1900 to 2100 (python-holidays 0.107). Use a calendar with business_days=true on diff and elapsed.
Codes
holiday_countryis the ISO 3166-1 alpha-2 code from the table, in any letter case.- A subdivision is selected with
holiday_subdivision, or with the combined ISO 3166-2 form inholiday_country:holiday_country=CH-ZHandholiday_country=CH&holiday_subdivision=ZHare the same calendar. - Subdivision codes are the ISO 3166-2 suffixes used by python-holidays: 1 to 3 letters or digits, any letter case. Digits and leading zeros are part of the code and must match exactly:
AT-9,FI-01,AD-02,FR-971,FR-6AE.FI-1is notFI-01and returns the unknown-subdivision error. - A subdivision calendar includes its country's national holidays and uses the country's weekend.
Weekends
Each calendar uses its country's current working week:
- Saturday + Sunday: 221 countries (every country not listed below).
- Friday + Saturday (18):
AFBDBHDJDZEGILIQJOKWMRMVOMQASASDSYYE - Sunday (8):
AICDHKKNNEPYTKVE - Friday + Sunday (1):
BN - Friday (1):
IR
Coverage caveats
- Historical weekends are not modelled. The current weekend is applied to every year from 1900 to 2100. For example,
AEuses Saturday + Sunday for all years although its weekend was Friday + Saturday before 2022, andSAuses Friday + Saturday for all years although its weekend was Thursday + Friday before 2013. - Islamic-calendar holidays (Eid and others) are tabulated only through 2077. About 50 countries (for example
SA,AE,EG,TR,ID,MY,PK,BD,MA,NG) count fewer holidays from about 2078 to 2100. - Hindu-calendar festivals:
INand its subdivisions have them only for 2001 to about 2035;NPandMUdrop them after about 2035 to 2038. - Ukraine (
UA) has no public holidays from 2023 on, following the martial-law rule in the holiday data. BV,HMandIO(uninhabited territories) have no holidays; only weekends are excluded.- Years before a country's data starts count weekends only (for example before 1991 for several post-Soviet states, before 2023 for
GW). - Bridge and transfer days decreed by governments (for example
RU,BY,KZ,CN) are included only for years already announced. JPhas no holidays in 2100.- Not available:
LK(holiday data ends in 2026) and named local calendars that have no ISO code (AU "NSW Western", BR "São Paulo Capital", CH "Stadt Zurich", DE "Augsburg", ES "Barcelona", IT "Andria", "Barletta", "Cesena", "Forli", "Pesaro", "Trani", "Urbino", NZ "South Canterbury"). They return "Unsupported holiday calendar." or the unknown-subdivision error.
All calendars
The same list is available as JSON at /content/holiday-calendars.json (weekdays numbered 0 = Sunday to 6 = Saturday).
| Code | Country | Weekend | Subdivisions |
|---|---|---|---|
AD | Andorra | Sat–Sun | 7 |
AE | United Arab Emirates | Sat–Sun | — |
AF | Afghanistan | Fri–Sat | — |
AG | Antigua and Barbuda | Sat–Sun | — |
AI | Anguilla | Sun | — |
AL | Albania | Sat–Sun | — |
AM | Armenia | Sat–Sun | 11 |
AO | Angola | Sat–Sun | — |
AQ | Antarctica | Sat–Sun | — |
AR | Argentina | Sat–Sun | 24 |
AS | American Samoa | Sat–Sun | — |
AT | Austria | Sat–Sun | 9 |
AU | Australia | Sat–Sun | 8 |
AW | Aruba | Sat–Sun | — |
AX | Åland Islands | Sat–Sun | — |
AZ | Azerbaijan | Sat–Sun | — |
BA | Bosnia and Herzegovina | Sat–Sun | 3 |
BB | Barbados | Sat–Sun | — |
BD | Bangladesh | Fri–Sat | — |
BE | Belgium | Sat–Sun | — |
BF | Burkina Faso | Sat–Sun | — |
BG | Bulgaria | Sat–Sun | — |
BH | Bahrain | Fri–Sat | — |
BI | Burundi | Sat–Sun | — |
BJ | Benin | Sat–Sun | — |
BL | Saint Barthélemy | Sat–Sun | — |
BM | Bermuda | Sat–Sun | — |
BN | Brunei Darussalam | Fri + Sun | — |
BO | Bolivia | Sat–Sun | 9 |
BQ | Bonaire, Sint Eustatius and Saba | Sat–Sun | 3 |
BR | Brazil | Sat–Sun | 27 |
BS | Bahamas | Sat–Sun | — |
BT | Bhutan | Sat–Sun | 20 |
BV | Bouvet Island | Sat–Sun | — |
BW | Botswana | Sat–Sun | — |
BY | Belarus | Sat–Sun | — |
BZ | Belize | Sat–Sun | — |
CA | Canada | Sat–Sun | 13 |
CC | Cocos (Keeling) Islands | Sat–Sun | — |
CD | Democratic Republic of the Congo | Sun | — |
CF | Central African Republic | Sat–Sun | — |
CG | Republic of the Congo | Sat–Sun | — |
CH | Switzerland | Sat–Sun | 26 |
CI | Côte d'Ivoire | Sat–Sun | — |
CK | Cook Islands | Sat–Sun | — |
CL | Chile | Sat–Sun | 16 |
CM | Cameroon | Sat–Sun | — |
CN | China | Sat–Sun | — |
CO | Colombia | Sat–Sun | — |
CR | Costa Rica | Sat–Sun | — |
CU | Cuba | Sat–Sun | — |
CV | Cabo Verde | Sat–Sun | 22 |
CW | Curaçao | Sat–Sun | — |
CX | Christmas Island | Sat–Sun | — |
CY | Cyprus | Sat–Sun | — |
CZ | Czechia | Sat–Sun | — |
DE | Germany | Sat–Sun | 16 |
DJ | Djibouti | Fri–Sat | — |
DK | Denmark | Sat–Sun | — |
DM | Dominica | Sat–Sun | — |
DO | Dominican Republic | Sat–Sun | — |
DZ | Algeria | Fri–Sat | — |
EC | Ecuador | Sat–Sun | — |
EE | Estonia | Sat–Sun | — |
EG | Egypt | Fri–Sat | — |
EH | Western Sahara | Sat–Sun | — |
ER | Eritrea | Sat–Sun | — |
ES | Spain | Sat–Sun | 19 |
ET | Ethiopia | Sat–Sun | — |
FI | Finland | Sat–Sun | 19 |
FJ | Fiji | Sat–Sun | — |
FK | Falkland Islands | Sat–Sun | — |
FM | Micronesia | Sat–Sun | 4 |
FO | Faroe Islands | Sat–Sun | — |
FR | France | Sat–Sun | 14 |
GA | Gabon | Sat–Sun | — |
GB | United Kingdom | Sat–Sun | 4 |
GD | Grenada | Sat–Sun | — |
GE | Georgia | Sat–Sun | — |
GF | French Guiana | Sat–Sun | — |
GG | Guernsey | Sat–Sun | — |
GH | Ghana | Sat–Sun | — |
GI | Gibraltar | Sat–Sun | — |
GL | Greenland | Sat–Sun | — |
GM | Gambia | Sat–Sun | — |
GN | Guinea | Sat–Sun | — |
GP | Guadeloupe | Sat–Sun | — |
GQ | Equatorial Guinea | Sat–Sun | 8 |
GR | Greece | Sat–Sun | — |
GS | South Georgia and the South Sandwich Islands | Sat–Sun | — |
GT | Guatemala | Sat–Sun | — |
GU | Guam | Sat–Sun | — |
GW | Guinea-Bissau | Sat–Sun | — |
GY | Guyana | Sat–Sun | — |
HK | Hong Kong | Sun | — |
HM | Heard Island and McDonald Islands | Sat–Sun | — |
HN | Honduras | Sat–Sun | — |
HR | Croatia | Sat–Sun | — |
HT | Haiti | Sat–Sun | — |
HU | Hungary | Sat–Sun | — |
ID | Indonesia | Sat–Sun | — |
IE | Ireland | Sat–Sun | — |
IL | Israel | Fri–Sat | — |
IM | Isle of Man | Sat–Sun | — |
IN | India | Sat–Sun | 36 |
IO | British Indian Ocean Territory | Sat–Sun | — |
IQ | Iraq | Fri–Sat | — |
IR | Iran | Fri | — |
IS | Iceland | Sat–Sun | — |
IT | Italy | Sat–Sun | 107 |
JE | Jersey | Sat–Sun | — |
JM | Jamaica | Sat–Sun | — |
JO | Jordan | Fri–Sat | — |
JP | Japan | Sat–Sun | — |
KE | Kenya | Sat–Sun | — |
KG | Kyrgyzstan | Sat–Sun | — |
KH | Cambodia | Sat–Sun | — |
KI | Kiribati | Sat–Sun | — |
KM | Comoros | Sat–Sun | — |
KN | Saint Kitts and Nevis | Sun | — |
KP | North Korea | Sat–Sun | — |
KR | South Korea | Sat–Sun | — |
KW | Kuwait | Fri–Sat | — |
KY | Cayman Islands | Sat–Sun | — |
KZ | Kazakhstan | Sat–Sun | — |
LA | Laos | Sat–Sun | — |
LB | Lebanon | Sat–Sun | — |
LC | Saint Lucia | Sat–Sun | — |
LI | Liechtenstein | Sat–Sun | — |
LR | Liberia | Sat–Sun | — |
LS | Lesotho | Sat–Sun | — |
LT | Lithuania | Sat–Sun | — |
LU | Luxembourg | Sat–Sun | — |
LV | Latvia | Sat–Sun | — |
LY | Libya | Sat–Sun | — |
MA | Morocco | Sat–Sun | — |
MC | Monaco | Sat–Sun | — |
MD | Moldova | Sat–Sun | — |
ME | Montenegro | Sat–Sun | — |
MF | Saint Martin | Sat–Sun | — |
MG | Madagascar | Sat–Sun | — |
MH | Marshall Islands | Sat–Sun | — |
MK | North Macedonia | Sat–Sun | — |
ML | Mali | Sat–Sun | — |
MM | Myanmar | Sat–Sun | — |
MN | Mongolia | Sat–Sun | — |
MO | Macao | Sat–Sun | 2 |
MP | Northern Mariana Islands | Sat–Sun | — |
MQ | Martinique | Sat–Sun | — |
MR | Mauritania | Fri–Sat | — |
MS | Montserrat | Sat–Sun | — |
MT | Malta | Sat–Sun | — |
MU | Mauritius | Sat–Sun | — |
MV | Maldives | Fri–Sat | — |
MW | Malawi | Sat–Sun | — |
MX | Mexico | Sat–Sun | — |
MY | Malaysia | Sat–Sun | 16 |
MZ | Mozambique | Sat–Sun | — |
NA | Namibia | Sat–Sun | — |
NC | New Caledonia | Sat–Sun | — |
NE | Niger | Sun | — |
NF | Norfolk Island | Sat–Sun | — |
NG | Nigeria | Sat–Sun | — |
NI | Nicaragua | Sat–Sun | 17 |
NL | Netherlands | Sat–Sun | — |
NO | Norway | Sat–Sun | 17 |
NP | Nepal | Sat–Sun | — |
NR | Nauru | Sat–Sun | — |
NU | Niue | Sat–Sun | — |
NZ | New Zealand | Sat–Sun | 17 |
OM | Oman | Fri–Sat | — |
PA | Panama | Sat–Sun | — |
PE | Peru | Sat–Sun | — |
PF | French Polynesia | Sat–Sun | — |
PG | Papua New Guinea | Sat–Sun | — |
PH | Philippines | Sat–Sun | — |
PK | Pakistan | Sat–Sun | — |
PL | Poland | Sat–Sun | — |
PM | Saint Pierre and Miquelon | Sat–Sun | — |
PN | Pitcairn | Sat–Sun | — |
PR | Puerto Rico | Sat–Sun | — |
PS | Palestine | Sat–Sun | — |
PT | Portugal | Sat–Sun | 20 |
PW | Palau | Sat–Sun | — |
PY | Paraguay | Sun | — |
QA | Qatar | Fri–Sat | — |
RE | Réunion | Sat–Sun | — |
RO | Romania | Sat–Sun | — |
RS | Serbia | Sat–Sun | — |
RU | Russian Federation | Sat–Sun | — |
RW | Rwanda | Sat–Sun | — |
SA | Saudi Arabia | Fri–Sat | — |
SB | Solomon Islands | Sat–Sun | 10 |
SC | Seychelles | Sat–Sun | — |
SD | Sudan | Fri–Sat | — |
SE | Sweden | Sat–Sun | — |
SG | Singapore | Sat–Sun | — |
SH | Saint Helena, Ascension and Tristan da Cunha | Sat–Sun | 3 |
SI | Slovenia | Sat–Sun | — |
SJ | Svalbard and Jan Mayen | Sat–Sun | — |
SK | Slovakia | Sat–Sun | — |
SL | Sierra Leone | Sat–Sun | — |
SM | San Marino | Sat–Sun | — |
SN | Senegal | Sat–Sun | — |
SO | Somalia | Sat–Sun | — |
SR | Suriname | Sat–Sun | — |
SS | South Sudan | Sat–Sun | — |
ST | Sao Tome and Principe | Sat–Sun | 7 |
SV | El Salvador | Sat–Sun | 14 |
SX | Sint Maarten | Sat–Sun | — |
SY | Syria | Fri–Sat | — |
SZ | Eswatini | Sat–Sun | — |
TC | Turks and Caicos Islands | Sat–Sun | — |
TD | Chad | Sat–Sun | — |
TF | French Southern Territories | Sat–Sun | — |
TG | Togo | Sat–Sun | — |
TH | Thailand | Sat–Sun | — |
TJ | Tajikistan | Sat–Sun | — |
TK | Tokelau | Sun | — |
TL | Timor-Leste | Sat–Sun | — |
TM | Turkmenistan | Sat–Sun | — |
TN | Tunisia | Sat–Sun | — |
TO | Tonga | Sat–Sun | — |
TR | Türkiye | Sat–Sun | — |
TT | Trinidad and Tobago | Sat–Sun | — |
TV | Tuvalu | Sat–Sun | 8 |
TW | Taiwan | Sat–Sun | — |
TZ | Tanzania | Sat–Sun | — |
UA | Ukraine | Sat–Sun | — |
UG | Uganda | Sat–Sun | — |
UM | United States Minor Outlying Islands | Sat–Sun | — |
US | United States | Sat–Sun | 57 |
UY | Uruguay | Sat–Sun | — |
UZ | Uzbekistan | Sat–Sun | — |
VA | Vatican City | Sat–Sun | — |
VC | Saint Vincent and the Grenadines | Sat–Sun | — |
VE | Venezuela | Sun | — |
VG | British Virgin Islands | Sat–Sun | — |
VI | U.S. Virgin Islands | Sat–Sun | — |
VN | Vietnam | Sat–Sun | — |
VU | Vanuatu | Sat–Sun | — |
WF | Wallis and Futuna | Sat–Sun | — |
WS | Samoa | Sat–Sun | — |
XK | Kosovo | Sat–Sun | — |
YE | Yemen | Fri–Sat | — |
YT | Mayotte | Sat–Sun | — |
ZA | South Africa | Sat–Sun | — |
ZM | Zambia | Sat–Sun | — |
ZW | Zimbabwe | Sat–Sun | — |
Subdivision codes
Use these with holiday_subdivision (or as holiday_country=XX-SUB). 35 countries have subdivision calendars:
ADAndorra (7):02Canillo ·03Encamp ·04La Massana ·05Ordino ·06Sant Julià de Lòria ·07Andorra la Vella ·08Escaldes-EngordanyAMArmenia (11):AGAragac̣otn ·ARArarat ·AVArmavir ·ERErevan ·GRGeġark'unik' ·KTKotayk' ·LOLoṙi ·SHŠirak ·SUSyunik' ·TVTavuš ·VDVayoć JorARArgentina (24):ASalta ·BBuenos Aires ·CCiudad Autónoma de Buenos Aires ·DSan Luis ·EEntre Ríos ·FLa Rioja ·GSantiago del Estero ·HChaco ·JSan Juan ·KCatamarca ·LLa Pampa ·MMendoza ·NMisiones ·PFormosa ·QNeuquén ·RRío Negro ·SSanta Fe ·TTucumán ·UChubut ·VTierra del Fuego ·WCorrientes ·XCórdoba ·YJujuy ·ZSanta CruzATAustria (9):1Burgenland ·2Kärnten ·3Niederösterreich ·4Oberösterreich ·5Salzburg ·6Steiermark ·7Tirol ·8Vorarlberg ·9WienAUAustralia (8):ACTAustralian Capital Territory ·NSWNew South Wales ·NTNorthern Territory ·QLDQueensland ·SASouth Australia ·TASTasmania ·VICVictoria ·WAWestern AustraliaBABosnia and Herzegovina (3):BIHFederacija Bosne i Hercegovine ·BRCBrčko distrikt ·SRPRepublika SrpskaBOBolivia (9):BEl Beni ·CCochabamba ·HChuquisaca ·LLa Paz ·NPando ·OOruro ·PPotosí ·SSanta Cruz ·TTarijaBQBonaire, Sint Eustatius and Saba (3):BONBonaire ·SABSaba ·STASint EustatiusBRBrazil (27):ACAcre ·ALAlagoas ·AMAmazonas ·APAmapá ·BABahia ·CECeará ·DFDistrito Federal ·ESEspírito Santo ·GOGoiás ·MAMaranhão ·MGMinas Gerais ·MSMato Grosso do Sul ·MTMato Grosso ·PAPará ·PBParaíba ·PEPernambuco ·PIPiauí ·PRParaná ·RJRio de Janeiro ·RNRio Grande do Norte ·RORondônia ·RRRoraima ·RSRio Grande do Sul ·SCSanta Catarina ·SESergipe ·SPSão Paulo ·TOTocantinsBTBhutan (20):11Paro ·12Chhukha ·13Haa ·14Samtse ·15Thimphu ·21Tsirang ·22Dagana ·23Punakha ·24Wangdue Phodrang ·31Sarpang ·32Trongsa ·33Bumthang ·34Zhemgang ·41Trashigang ·42Monggar ·43Pema Gatshel ·44Lhuentse ·45Samdrup Jongkhar ·GAGasa ·TYTrashi YangtseCACanada (13):ABAlberta ·BCBritish Columbia ·MBManitoba ·NBNew Brunswick ·NLNewfoundland and Labrador ·NSNova Scotia ·NTNorthwest Territories ·NUNunavut ·ONOntario ·PEPrince Edward Island ·QCQuebec ·SKSaskatchewan ·YTYukonCHSwitzerland (26):AGAargau ·AIAppenzell Innerrhoden ·ARAppenzell Ausserrhoden ·BEBern ·BLBasel-Landschaft ·BSBasel-Stadt ·FRFreiburg ·GEGenève ·GLGlarus ·GRGraubünden ·JUJura ·LULuzern ·NENeuchâtel ·NWNidwalden ·OWObwalden ·SGSankt Gallen ·SHSchaffhausen ·SOSolothurn ·SZSchwyz ·TGThurgau ·TITicino ·URUri ·VDVaud ·VSValais ·ZGZug ·ZHZürichCLChile (16):AIAisén del General Carlos Ibañez del Campo ·ANAntofagasta ·APArica y Parinacota ·ARLa Araucanía ·ATAtacama ·BIBiobío ·COCoquimbo ·LILibertador General Bernardo O'Higgins ·LLLos Lagos ·LRLos Ríos ·MAMagallanes ·MLMaule ·NBÑuble ·RMRegión Metropolitana de Santiago ·TATarapacá ·VSValparaísoCVCabo Verde (22):BRBrava ·BVBoa Vista ·CASanta Catarina ·CFSanta Catarina do Fogo ·CRSanta Cruz ·MAMaio ·MOMosteiros ·PAPaul ·PNPorto Novo ·PRPraia ·RBRibeira Brava ·RGRibeira Grande ·RSRibeira Grande de Santiago ·SDSão Domingos ·SFSão Filipe ·SLSal ·SMSão Miguel ·SOSão Lourenço dos Órgãos ·SSSão Salvador do Mundo ·SVSão Vicente ·TATarrafal ·TSTarrafal de São NicolauDEGermany (16):BBBrandenburg ·BEBerlin ·BWBaden-Württemberg ·BYBayern ·HBBremen ·HEHessen ·HHHamburg ·MVMecklenburg-Vorpommern ·NINiedersachsen ·NWNordrhein-Westfalen ·RPRheinland-Pfalz ·SHSchleswig-Holstein ·SLSaarland ·SNSachsen ·STSachsen-Anhalt ·THThüringenESSpain (19):ANAndalucía ·ARAragón ·ASAsturias ·CBCantabria ·CECeuta ·CLCastilla y León ·CMCastilla-La Mancha ·CNCanarias ·CTCataluña ·EXExtremadura ·GAGalicia ·IBIslas Baleares ·MCMurcia ·MDMadrid ·MLMelilla ·NCNavarra ·PVPaís Vasco ·RILa Rioja ·VCValencianaFIFinland (19):01Ahvenanmaan maakunta ·02Etelä-Karjala ·03Etelä-Pohjanmaa ·04Etelä-Savo ·05Kainuu ·06Kanta-Häme ·07Keski-Pohjanmaa ·08Keski-Suomi ·09Kymenlaakso ·10Lappi ·11Pirkanmaa ·12Pohjanmaa ·13Pohjois-Karjala ·14Pohjois-Pohjanmaa ·15Pohjois-Savo ·16Päijät-Häme ·17Satakunta ·18Uusimaa ·19Varsinais-SuomiFMMicronesia (4):KSAKosrae ·PNIPohnpei ·TRKChuuk ·YAPYapFRFrance (14):57Moselle ·6AEAlsace ·971Guadeloupe ·972Martinique ·973Guyane (French Guiana) ·974La Réunion ·976Mayotte ·BLSaint-Barthélemy ·MFSaint-Martin ·NCNouvelle-Calédonie ·PFPolynésie Française ·PMSaint-Pierre-et-Miquelon ·TFTerres australes françaises ·WFWallis-et-FutunaGBUnited Kingdom (4):ENGEngland ·NIRNorthern Ireland ·SCTScotland ·WLSWalesGQEquatorial Guinea (8):ANAnnobón ·BNBioko Norte ·BSBioko Sur ·CSCentro Sur ·DJDjibloho ·KNKié-Ntem ·LILitoral ·WNWele-NzasINIndia (36):ANAndaman and Nicobar Islands ·APAndhra Pradesh ·ARArunachal Pradesh ·ASAssam ·BRBihar ·CGChhattisgarh ·CHChandigarh ·DHDadra and Nagar Haveli and Daman and Diu ·DLDelhi ·GAGoa ·GJGujarat ·HPHimachal Pradesh ·HRHaryana ·JHJharkhand ·JKJammu and Kashmir ·KAKarnataka ·KLKerala ·LALadakh ·LDLakshadweep ·MHMaharashtra ·MLMeghalaya ·MNManipur ·MPMadhya Pradesh ·MZMizoram ·NLNagaland ·ODOdisha ·PBPunjab ·PYPuducherry ·RJRajasthan ·SKSikkim ·TNTamil Nadu ·TRTripura ·TSTelangana ·UKUttarakhand ·UPUttar Pradesh ·WBWest BengalITItaly (107):AGAgrigento ·ALAlessandria ·ANAncona ·AOAosta ·APAscoli Piceno ·AQL'Aquila ·ARArezzo ·ATAsti ·AVAvellino ·BABari ·BGBergamo ·BIBiella ·BLBelluno ·BNBenevento ·BOBologna ·BRBrindisi ·BSBrescia ·BTBarletta-Andria-Trani ·BZBolzano ·CACagliari ·CBCampobasso ·CECaserta ·CHChieti ·CLCaltanissetta ·CNCuneo ·COComo ·CRCremona ·CSCosenza ·CTCatania ·CZCatanzaro ·ENEnna ·FCForli-Cesena ·FEFerrara ·FGFoggia ·FIFirenze ·FMFermo ·FRFrosinone ·GEGenova ·GOGorizia ·GRGrosseto ·IMImperia ·ISIsernia ·KRCrotone ·LCLecco ·LELecce ·LILivorno ·LOLodi ·LTLatina ·LULucca ·MBMonza e Brianza ·MCMacerata ·MEMessina ·MIMilano ·MNMantova ·MOModena ·MSMassa-Carrara ·MTMatera ·NANapoli ·NONovara ·NUNuoro ·OROristano ·PAPalermo ·PCPiacenza ·PDPadova ·PEPescara ·PGPerugia ·PIPisa ·PNPordenone ·POPrato ·PRParma ·PTPistoia ·PUPesaro e Urbino ·PVPavia ·PZPotenza ·RARavenna ·RCReggio Calabria ·REReggio Emilia ·RGRagusa ·RIRieti ·RMRoma ·RNRimini ·RORovigo ·SASalerno ·SISiena ·SOSondrio ·SPLa Spezia ·SRSiracusa ·SSSassari ·SUSud Sardegna ·SVSavona ·TATaranto ·TETeramo ·TNTrento ·TOTorino ·TPTrapani ·TRTerni ·TSTrieste ·TVTreviso ·UDUdine ·VAVarese ·VBVerbano-Cusio-Ossola ·VCVercelli ·VEVenezia ·VIVicenza ·VRVerona ·VTViterbo ·VVVibo ValentiaMOMacao (2):IConcelho das Ilhas ·MConcelho de MacauMYMalaysia (16):01Johor ·02Kedah ·03Kelantan ·04Melaka ·05Negeri Sembilan ·06Pahang ·07Pulau Pinang ·08Perak ·09Perlis ·10Selangor ·11Terengganu ·12Sabah ·13Sarawak ·14Wilayah Persekutuan Kuala Lumpur ·15Wilayah Persekutuan Labuan ·16Wilayah Persekutuan PutrajayaNINicaragua (17):ANCosta Caribe Norte ·ASCosta Caribe Sur ·BOBoaco ·CACarazo ·CIChinandega ·COChontales ·ESEstelí ·GRGranada ·JIJinotega ·LELeón ·MDMadriz ·MNManagua ·MSMasaya ·MTMatagalpa ·NSNueva Segovia ·RIRivas ·SJRío San JuanNONorway (17):03Oslo ·11Rogaland ·15Møre og Romsdal ·18Nordland ·21Svalbard ·22Jan Mayen ·31Østfold ·32Akershus ·33Buskerud ·34Innlandet ·39Vestfold ·40Telemark ·42Agder ·46Vestland ·50Trööndelage ·55Romssa ·56FinmarkunNZNew Zealand (17):AUKAuckland ·BOPBay of Plenty ·CANCanterbury ·CITChatham Islands Territory ·GISGisborne ·HKBHawke's Bay ·MBHMarlborough ·MWTManawatū Whanganui ·NSNNelson ·NTLNorthland ·OTAOtago ·STLSouthland ·TASTasman ·TKITaranaki ·WGNGreater Wellington ·WKOWaikato ·WTCWest CoastPTPortugal (20):01Aveiro ·02Beja ·03Braga ·04Bragança ·05Castelo Branco ·06Coimbra ·07Évora ·08Faro ·09Guarda ·10Leiria ·11Lisboa ·12Portalegre ·13Porto ·14Santarém ·15Setúbal ·16Viana do Castelo ·17Vila Real ·18Viseu ·20Região Autónoma dos Açores ·30Região Autónoma da MadeiraSBSolomon Islands (10):CECentral ·CHChoiseul ·CTCapital Territory ·GUGuadalcanal ·ISIsabel ·MKMakira-Ulawa ·MLMalaita ·RBRennell and Bellona ·TETemotu ·WEWesternSHSaint Helena, Ascension and Tristan da Cunha (3):ACAscension ·HLSaint Helena ·TATristan da CunhaSTSao Tome and Principe (7):01Água Grande ·02Cantagalo ·03Caué ·04Lembá ·05Lobata ·06Mé-Zóchi ·PPríncipeSVEl Salvador (14):AHAhuachapán ·CACabañas ·CHChalatenango ·CUCuscatlán ·LILa Libertad ·MOMorazán ·PALa Paz ·SASanta Ana ·SMSan Miguel ·SOSonsonate ·SSSan Salvador ·SVSan Vicente ·UNLa Unión ·USUsulutánTVTuvalu (8):FUNFunafuti ·NITNiutao ·NKFNukufetau ·NKLNukulaelae ·NMANanumea ·NMGNanumaga ·NUINui ·VAIVaitupuUSUnited States (57):AKAlaska ·ALAlabama ·ARArkansas ·ASAmerican Samoa ·AZArizona ·CACalifornia ·COColorado ·CTConnecticut ·DCDistrict of Columbia ·DEDelaware ·FLFlorida ·GAGeorgia ·GUGuam ·HIHawaii ·IAIowa ·IDIdaho ·ILIllinois ·INIndiana ·KSKansas ·KYKentucky ·LALouisiana ·MAMassachusetts ·MDMaryland ·MEMaine ·MIMichigan ·MNMinnesota ·MOMissouri ·MPNorthern Mariana Islands ·MSMississippi ·MTMontana ·NCNorth Carolina ·NDNorth Dakota ·NENebraska ·NHNew Hampshire ·NJNew Jersey ·NMNew Mexico ·NVNevada ·NYNew York ·OHOhio ·OKOklahoma ·OROregon ·PAPennsylvania ·PRPuerto Rico ·RIRhode Island ·SCSouth Carolina ·SDSouth Dakota ·TNTennessee ·TXTexas ·UMUnited States Minor Outlying Islands ·UTUtah ·VAVirginia ·VIVirgin Islands, U.S. ·VTVermont ·WAWashington ·WIWisconsin ·WVWest Virginia ·WYWyoming
Embeddable clocks
/v1/time/clock returns a self-bootstrapping HTML fragment: a host <div>, a JSON config <script>, and <link>/<script> tags pointing at the hosted CSS and JS bundle. Drop the entire snippet anywhere on your page.
curl "https://api.timelogicapi.com/v1/time/clock?tz=Europe/Paris&style=analog-station" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
style is required and must be one of 30 named styles (10 analog + 20 digital). See the endpoint reference for the full list. Responses are uncached (Cache-Control: no-store) so each fetch reflects the current request.
The clock syncs once from the snippet and then ticks locally. Periodic network refresh is off by default (it would need your API key in the page), so a page left open across a daylight-saving change keeps its old UTC offset until the snippet is fetched again. Fetch the snippet from your server on each page load, and reload it periodically on pages that stay open for days. To opt in to refresh, set refresh.enabled = true in the config and point refresh.path at a same-origin proxy that adds your key. See the clock reference for details.
Best practices
- JSON responses are not marked cacheable (they carry no
Cache-Controlheader). If you cache "now" values on your side, keep the lifetime short (a second or so), and compute elapsed time locally fromunix_msinstead of re-requesting. - Use bulk mode to fold up to 10 city lookups into a single request, and check each array element for an
errorkey. - Store and compare instants as
unix_msorutc; useiso_localandhumanonly for display. - Always render the
timezonethe API returns: aliases resolve to their canonical zone. - Send local
isovalues with asource_*hint (or an explicit offset). Without one they are read as UTC. - Verify signed responses on the server, not the client.
- Keep the API key on your server. Browser code should go through your own proxy.
- Retry
5xxwith exponential backoff. A429 QUOTA_EXCEEDEDmeans the monthly quota is used up: it clears at the start of the next UTC month or when you upgrade, so do not retry it in a loop. - Pin your client to API version
v1in the URL.
Errors & rate limits
Errors are JSON with a stable shape:
{
"error": {
"code": "INVALID_PARAMETER",
"message": "Invalid timezone.",
"details": { "tz": "Not/AZone" }
},
"request_id": "3534e3fe-f916-4d44-a50b-8f92a74074c4"
}
details is optional and varies by error. Error responses do not include a timestamp field, at the top level or inside bulk items.
Error codes
| HTTP | code | When |
|---|---|---|
| 400 | INVALID_PARAMETER | A value is not valid: unknown timezone, bad offset format, unsupported strftime directive in format, a holiday_country outside the supported calendars or an unknown holiday_subdivision, a business-day range outside 1900–2100 with a holiday calendar, missing clock style, too many bulk values, or an add result outside the supported range. |
| 400 | INVALID_TIMESTAMP | A timestamp input is missing, malformed, not a real calendar date (for example 2027-02-29), a nonexistent local time in a spring-forward gap, or outside the supported range (0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
| 400 | MISSING_TARGET | No target selector where one is required (/v1/time/convert with none of tz/ip/lat+lon/offset/auto_tz/utc=true, or /v1/timezone with no selector; most other routes default to UTC instead). |
| 400 | AMBIGUOUS_TARGET | More than one selector family or input form, a bulk selector combined with another target (including utc=true), or compare_* timestamps combined with a compare target selector on elapsed. |
| 401 | UNAUTHORIZED | Missing API key credentials., Invalid API key credentials., or Conflicting API key credentials. (see Authentication). |
| 403 | SUBSCRIPTION_INACTIVE | The key belongs to an inactive or revoked subscription. |
| 404 | NOT_FOUND | Unknown route (including a trailing slash such as /v1/time/current/), an IP address with no timezone mapping (private, reserved, or loopback addresses such as 10.0.0.1 or ::1 never resolve), or an unknown signing key kid. |
| 405 | METHOD_NOT_ALLOWED | Any method other than GET or HEAD (for example POST): Only GET and HEAD are supported. The response carries Allow: GET, HEAD. |
| 429 | QUOTA_EXCEEDED | The plan's monthly quota is used up: Monthly quota exceeded. |
| 500 | INTERNAL_ERROR | An unexpected server error. Retry with backoff and quote the request ID if it persists. |
| 501 / 502 / 503 | DEPENDENCY_NOT_READY, SIGNING_NOT_READY, INTERNAL_ERROR | A dependent service is temporarily unavailable. Retry with backoff. |
The OpenAPI specs also list INVALID_AUTH in the error-code enum; the direct API currently reports all credential problems as 401 UNAUTHORIZED.
Bulk requests
A bulk request (a comma-separated selector on /v1/time/current or /v1/time/convert) returns HTTP 200 with an array even when some items fail. Each failed item is an object with item, error and request_id in place of the normal payload, so check every element. Errors that apply to the whole request (more than 10 values, an invalid input timestamp, missing credentials) still return a single 4xx error. See Bulk mode.
Response headers
Every response includes an X-Request-Id header; quote it in support tickets. Authenticated responses on the direct API also include:
| Header | Meaning |
|---|---|
X-Auth-Mode | How the request was authenticated (api_key). |
X-TimeLogic-Customer-ID | Your customer ID. |
X-TimeLogic-Key-Id | The ID of the API key used (on unsigned responses). On signed responses this header carries the signing key kid instead; see Signed responses. |
X-TimeLogic-Plan | Your plan, for example free. |
X-TimeLogic-Quota-Limit | Requests included per month, or unlimited. |
X-TimeLogic-Quota-State | active, or exceeded once the monthly quota is used up. |
These headers are exposed to browsers through CORS. There is currently no header for remaining requests or for the reset time; your usage is shown in your account.
Quotas and rate limits
Plans are metered by a monthly request quota (see Pricing). The quota period is the calendar month in UTC: it resets at 00:00 UTC on the 1st. Every successful (200) request counts against the quota, including HEAD requests, which are answered like GET without a body. When the quota is used up, requests return 429 QUOTA_EXCEEDED until the next period starts or the plan is upgraded. A 429 does not carry a Retry-After header, because the wait is until the next month rather than seconds.
The API does not publish a per-second or per-minute rate limit beyond the monthly quota. Keep bursts reasonable, and contact us before sending sustained high-volume traffic; Enterprise plans can arrange dedicated capacity.
Retry 5xx responses with exponential backoff. Do not retry 4xx responses unchanged: fix the request first.