Time - Address

Free IP Datetime API Endpoint

The free ip_datetime api endpoint answers what time it is where an address is: the zone an address lookup places it in, the local time there, and when summer time starts and ends. Leave the address out and it uses your own.

  • No API key
  • IPv4 and IPv6
  • Your own address by default
  • Summer time included

Local time for an address

GET/ip_datetime

https://aisenseapi.com/services/v1/ip_datetime

Call the free ip_datetime api endpoint

Put the address in the path:

curl https://aisenseapi.com/services/v1/ip_datetime/8.8.8.8
{
  "ip": "8.8.8.8",
  "datetime": "2026-10-03T05:41:07-05:00",
  "timezone": "America/Chicago",
  "abbreviation": "CDT",
  "utc_offset": "-05:00",
  "dst": true,
  "unixtime": 1791024067,
  "raw_offset": -21600,
  "dst_offset": 3600,
  "dst_from": "2026-03-08T08:00:00+00:00",
  "dst_until": "2026-11-01T07:00:00+00:00",
  "day_of_week": 6,
  "day_of_year": 276,
  "week_number": 40,
  "utc_datetime": "2026-10-03T10:41:07+00:00"
}

Without an address the answer is for the one the request came from, which for a browser or a device is usually where it is:

curl https://aisenseapi.com/services/v1/ip_datetime

The signature is GET /ip_datetime[/{ip}], with the address as a path segment rather than a query parameter. IPv6 addresses go in as they are written, colons included.

Response fields

FieldTypeDescription
ipstringThe address looked up: the one in the path, or the caller's.
datetimestringLocal date and time, ISO 8601 to the second with the offset.
timezonestringThe IANA zone name, such as America/Chicago.
abbreviationstringCDT, CEST, IST, or a numeric one such as -03 where the zone database has no letters.
utc_offsetstringThe offset in force now, as +HH:MM, summer time included.
dstbooleanWhether summer time is in force.
unixtimeintegerSeconds since 1970-01-01 UTC.
raw_offsetintegerThe standard offset from UTC in seconds, without summer time.
dst_offsetintegerSeconds summer time adds now: 3600 almost everywhere, 1800 on Lord Howe Island, 0 outside summer time. The zone database counts Irish winter time and Moroccan Ramadan time as summer time with a negative offset, so it is -3600 there and then. raw_offset + dst_offset is always the offset in force.
dst_fromstring or nullWhen the current summer time period began, in UTC. null when dst is false.
dst_untilstring or nullWhen it ends, in UTC. null when dst is false.
day_of_weekinteger0 for Sunday to 6 for Saturday, local.
day_of_yearintegerLocal day of the year, starting at 1.
week_numberintegerThe ISO 8601 week.
utc_datetimestringThe same moment in UTC, ending in +00:00.

Everything after ip is what /datetime/{zone} answers for the same zone, key for key. Slashes in zone names are not escaped.

Where the zone comes from

The zone comes from an address lookup. Each server worker keeps the result in memory, keyed by the address, and reuses it for up to an hour, or ten minutes when no zone was found, so a device that asks every minute costs one lookup an hour. Zone rules come from the IANA time zone database bundled with the server.

A zone from an address is a good guess, not a fact about the device. A phone on mobile data, a laptop on a VPN or a server behind a proxy is placed where its network meets the internet. A device that knows its zone does better to keep the timezone from its first answer and ask /datetime/{zone} from then on, which needs no lookup at all.

Errors

CaseStatusBody
Not an IPv4 or IPv6 address400{"error":"Invalid IP address.","fix":"..."}
No zone known for the address, such as a private or reserved one404{"error":"No time zone is known for this address.","fix":"..."}
Over 5000 calls from one address in a day429With Retry-After until midnight Oslo time

The 404 is an answer, not a guess dressed as one: the fix points at asking by zone name instead.

Common uses

First boot

A device or an agent that does not know its zone yet asks once, keeps the zone name it gets back, and reads the clock by name from then on.

Local time for a request

Show the local time where a webhook or a support request came from, beside the UTC stamp in the log.

The next clock change

dst_until says when the clock changes next, so a scheduler can plan around the hour that repeats in autumn or disappears in spring.

Privacy and limits

The address in /ip_datetime/{ip}, or yours when you leave it out, is held in the memory cache and can also appear in request logs with the URL path. See our privacy policy for log retention. IP-based time zones are approximate and may differ from the device's location.

The base URL is https://aisenseapi.com/services/v1. There is no key, no account and no sign-up step. The service-wide limit is 5000 requests per IP per day. Sibling clock endpoints share that budget and are grouped on the Time APIs hub.