curl -X GET 'https://api.countrystatecity.in/v1/timezone/US/CA' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IN/MH' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/DEU/BY' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/timezone/US/NY',
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const tz = await response.json();
console.log(`${tz.iana} | DST in effect: ${tz.is_dst_now}`);
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/US/HI', # Hawaii — no DST
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json())
# {"iana": "Pacific/Honolulu", "abbreviation": "HST", "offset_utc": "-10:00",
# "dst_offset_utc": "-10:00", "is_dst_now": false}
{
"iana": "America/Los_Angeles",
"abbreviation": "PDT",
"offset_utc": "-08:00",
"dst_offset_utc": "-07:00",
"is_dst_now": true
}
{
"iana": "Pacific/Honolulu",
"abbreviation": "HST",
"offset_utc": "-10:00",
"dst_offset_utc": "-10:00",
"is_dst_now": false
}
{
"error": "State not found."
}
{
"error": "No timezone data available for this state."
}
Timezone Endpoints
Get Timezone by State
Retrieve the timezone for a specific state or province
GET
/
v1
/
timezone
/
{ciso}
/
{siso}
curl -X GET 'https://api.countrystatecity.in/v1/timezone/US/CA' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IN/MH' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/DEU/BY' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/timezone/US/NY',
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const tz = await response.json();
console.log(`${tz.iana} | DST in effect: ${tz.is_dst_now}`);
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/US/HI', # Hawaii — no DST
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json())
# {"iana": "Pacific/Honolulu", "abbreviation": "HST", "offset_utc": "-10:00",
# "dst_offset_utc": "-10:00", "is_dst_now": false}
{
"iana": "America/Los_Angeles",
"abbreviation": "PDT",
"offset_utc": "-08:00",
"dst_offset_utc": "-07:00",
"is_dst_now": true
}
{
"iana": "Pacific/Honolulu",
"abbreviation": "HST",
"offset_utc": "-10:00",
"dst_offset_utc": "-10:00",
"is_dst_now": false
}
{
"error": "State not found."
}
{
"error": "No timezone data available for this state."
}
Get the timezone for a state/province within a country. Useful for federations or countries that span multiple zones — US states, Canadian provinces, Russian federal subjects, Australian states, etc.
Availability: All plans (Community and above). Only an API key is required.
Responses are cached server-side for 24 hours. The cache key includes both the country and state codes, so cross-country state-code collisions never cause cache poisoning.
Authentication
string
required
Your API key for authentication
Path Parameters
string
required
Country code: ISO 3166-1 alpha-2 (
US), alpha-3 (USA), or numeric CSC ID. Case-insensitive.string
required
State/province code in the country’s local subdivision system (e.g.
CA for California within US-CA). Case-insensitive.Response
Identical shape to/v1/timezone/:ciso:
string
Canonical IANA timezone name (e.g.
"America/Los_Angeles").string
Locale-aware short name at request time (e.g.
"PST" / "PDT").string
Standard UTC offset in
±HH:MM form (e.g. "-08:00").string
DST UTC offset in
±HH:MM form (e.g. "-07:00"). Equal to offset_utc for zones that don’t observe DST.boolean
Whether DST is in effect at request time.
curl -X GET 'https://api.countrystatecity.in/v1/timezone/US/CA' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IN/MH' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/DEU/BY' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch(
'https://api.countrystatecity.in/v1/timezone/US/NY',
{ headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' } }
);
const tz = await response.json();
console.log(`${tz.iana} | DST in effect: ${tz.is_dst_now}`);
import requests
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/US/HI', # Hawaii — no DST
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
print(response.json())
# {"iana": "Pacific/Honolulu", "abbreviation": "HST", "offset_utc": "-10:00",
# "dst_offset_utc": "-10:00", "is_dst_now": false}
{
"iana": "America/Los_Angeles",
"abbreviation": "PDT",
"offset_utc": "-08:00",
"dst_offset_utc": "-07:00",
"is_dst_now": true
}
{
"iana": "Pacific/Honolulu",
"abbreviation": "HST",
"offset_utc": "-10:00",
"dst_offset_utc": "-10:00",
"is_dst_now": false
}
{
"error": "State not found."
}
{
"error": "No timezone data available for this state."
}
Related Endpoints
- Get Timezone by Country — country-level resolution (uses the capital’s timezone)
- Get Timezone by City — per-city precision
- Get State Details — full state record including the raw
timezonefield
Was this page helpful?
⌘I