API - Local time at a place (local_time)

Geolocation

Tells you the local date and time right now at a place, an address, coordinates or an IP address, with its time zone.

Endpointhttps://api.opensolr.com/solr_manager/api/local_time
MethodGET or POST, a JSON body works too
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

Send any mix of the three kinds, up to 25 lookups in all.

place, placesOne kind at least

Place names or addresses: an array, a JSON array, or separated by ; or new lines.

coords, lat + lonOne kind at least

lat,lon pairs, separated by ;.

ip, ipsOne kind at least

Public IP addresses.

countryOptional

A two-letter country code the places are in.

02 · Example

curl -s "https://api.opensolr.com/solr_manager/api/local_time?email=YOUR_EMAIL&api_key=YOUR_API_KEY&places=Tokyo;Sao Paulo&ip=8.8.8.8"

03 · Answer

{
    "status": true,
    "contract_version": 1,
    "count": 3,
    "results": {
        "Tokyo": {
            "found": true,
            "timezone": "Asia/Tokyo",
            "date": "Sunday, 11 October 2026",
            "time": "21:05:10",
            "iso": "2026-10-11T21:05:10+09:00",
            "weekday": "Sunday",
            "utc_offset": "+09:00",
            "abbreviation": "JST",
            "unix": 1791720310,
            "place": "Tokyo",
            "country_code": "JP",
            "lat": 35.6895,
            "lon": 139.69171
        },
        "Sao Paulo": {
            "found": true,
            "...": "..."
        },
        "8.8.8.8": {
            "found": true,
            "...": "..."
        }
    }
}

results is keyed by each item as you sent it. The time is read at the moment of the call. Values shown are an example.

04 · Errors

ERROR_NO_PLACE_SUPPLIEDHTTP 200

Nothing to look up.

ERROR_MAX_25_LOOKUPS_PER_CALLHTTP 200

More than 25 lookups.

ERROR_GEO_NO_DATA, ERROR_TIMEZONE_UNKNOWN, ERROR_GEO_LOOKUP_UNAVAILABLEHTTP 200

In one entry: place not found, no time zone known there, or the lookup failed.

WRONG_API_HOSTHTTP 404

Called on opensolr.com. The answer carries the right URL.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds.

Each call counts once toward your per-minute and per-hour limits, whatever the number of items: Rate limits. Lookups never use the AI allowance.

05 · Related

The chat bot command that uses it: Chat bot commands.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.