curl -X GET 'https://api.countrystatecity.in/v1/timezone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/timezone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const tz = await response.json();
// Format current time in that zone
const local = new Date().toLocaleString('en-US', { timeZone: tz.iana });
console.log(`${tz.iana} | ${local} | DST: ${tz.is_dst_now}`);
import requests
from datetime import datetime
from zoneinfo import ZoneInfo
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
tz = response.json()
now_local = datetime.now(ZoneInfo(tz['iana']))
print(f"{tz['iana']} ({tz['abbreviation']}) — {now_local}")
{
"iana": "America/New_York",
"abbreviation": "EDT",
"offset_utc": "-05:00",
"dst_offset_utc": "-04:00",
"is_dst_now": true
}
{
"iana": "Asia/Kolkata",
"abbreviation": "GMT+5:30",
"offset_utc": "+05:30",
"dst_offset_utc": "+05:30",
"is_dst_now": false
}
{
"error": "Unauthorized. You shouldn't be here."
}
{
"error": "Country not found."
}
{
"error": "No timezone data available for this country."
}
Timezones
Get Timezone by Country
Retrieve the canonical timezone for a country including current DST state
GET
/
timezone
/
{ciso}
curl -X GET 'https://api.countrystatecity.in/v1/timezone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/timezone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const tz = await response.json();
// Format current time in that zone
const local = new Date().toLocaleString('en-US', { timeZone: tz.iana });
console.log(`${tz.iana} | ${local} | DST: ${tz.is_dst_now}`);
import requests
from datetime import datetime
from zoneinfo import ZoneInfo
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
tz = response.json()
now_local = datetime.now(ZoneInfo(tz['iana']))
print(f"{tz['iana']} ({tz['abbreviation']}) — {now_local}")
{
"iana": "America/New_York",
"abbreviation": "EDT",
"offset_utc": "-05:00",
"dst_offset_utc": "-04:00",
"is_dst_now": true
}
{
"iana": "Asia/Kolkata",
"abbreviation": "GMT+5:30",
"offset_utc": "+05:30",
"dst_offset_utc": "+05:30",
"is_dst_now": false
}
{
"error": "Unauthorized. You shouldn't be here."
}
{
"error": "Country not found."
}
{
"error": "No timezone data available for this country."
}
Return the canonical IANA timezone for a country, plus its standard and DST UTC offsets and whether the country is observing DST at request time.
Resolution order:
- The capital city’s timezone — most countries with multiple zones use this as the canonical default.
- The first entry in the country’s
timezonesJSON column — fallback when no capital-city match exists.
Availability: All plans (Community and above). Only an API key is required.
Responses are cached server-side for 24 hours.
Known DST sampling limitation: standard and DST offsets are determined by sampling Jan 1 and Jul 1 of the current year, which is correct for almost every populated IANA zone. A small number of zones with non-standard DST windows (most notably
Africa/Casablanca with Ramadan-based transitions) can report incorrect offset_utc / dst_offset_utc / is_dst_now values during their actual DST window. Use a dedicated timezone library if you need exact DST behaviour for those edge cases.curl -X GET 'https://api.countrystatecity.in/v1/timezone/US' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/IND' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
curl -X GET 'https://api.countrystatecity.in/v1/timezone/233' \
-H 'X-CSCAPI-KEY: YOUR_API_KEY'
const response = await fetch('https://api.countrystatecity.in/v1/timezone/US', {
headers: { 'X-CSCAPI-KEY': 'YOUR_API_KEY' }
});
const tz = await response.json();
// Format current time in that zone
const local = new Date().toLocaleString('en-US', { timeZone: tz.iana });
console.log(`${tz.iana} | ${local} | DST: ${tz.is_dst_now}`);
import requests
from datetime import datetime
from zoneinfo import ZoneInfo
response = requests.get(
'https://api.countrystatecity.in/v1/timezone/IN',
headers={'X-CSCAPI-KEY': 'YOUR_API_KEY'}
)
tz = response.json()
now_local = datetime.now(ZoneInfo(tz['iana']))
print(f"{tz['iana']} ({tz['abbreviation']}) — {now_local}")
{
"iana": "America/New_York",
"abbreviation": "EDT",
"offset_utc": "-05:00",
"dst_offset_utc": "-04:00",
"is_dst_now": true
}
{
"iana": "Asia/Kolkata",
"abbreviation": "GMT+5:30",
"offset_utc": "+05:30",
"dst_offset_utc": "+05:30",
"is_dst_now": false
}
{
"error": "Unauthorized. You shouldn't be here."
}
{
"error": "Country not found."
}
{
"error": "No timezone data available for this country."
}
Related Endpoints
- Get Timezone by State — finer-grained timezone for federations / countries with multiple zones (US, Canada, Russia, Australia, etc.)
- Get Timezone by City — per-city precision
- Get Country Details — includes the raw
timezonesJSON column
Authorizations
API key for authentication. Get your free key at app.countrystatecity.in.
Path Parameters
ISO 3166-1 alpha-2 (e.g., IN), alpha-3 (e.g., IND), or numeric country ID (e.g., 101)
Example:
"IN"
Response
Timezone information for the country
IANA timezone with current UTC offset and DST status. Standard and DST offsets are sampled from Jan 1 and Jul 1 of the current year.
Canonical IANA timezone identifier
Example:
"Asia/Kolkata"
Locale-aware short code (display only — not unique across timezones)
Example:
"IST"
Standard UTC offset in ±HH:MM format
Example:
"+05:30"
DST UTC offset in ±HH:MM format; equals offset_utc for zones without DST
Example:
"+05:30"
Whether DST is currently active
Example:
false