요청 헤더
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | timezone-by-city.p.rapidapi.com |
엔드포인트
GET
/v1/time/zone Look up the IANA time zone and current local time of a city
매개변수
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
city | string | required | — | matches \S |
country | string | optional | — | — |
코드 예
curl --request GET \
--url 'https://timezone-by-city.p.rapidapi.com/v1/time/zone?city=example' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: timezone-by-city.p.rapidapi.com' const url = "https://timezone-by-city.p.rapidapi.com/v1/time/zone?city=example";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "timezone-by-city.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://timezone-by-city.p.rapidapi.com/v1/time/zone"
querystring = {"city": "example"}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "timezone-by-city.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) GET
/v1/time/zone/countries List all countries with timezone data in the dataset, sorted alphabetically by ISO code.
코드 예
curl --request GET \
--url 'https://timezone-by-city.p.rapidapi.com/v1/time/zone/countries' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: timezone-by-city.p.rapidapi.com' const url = "https://timezone-by-city.p.rapidapi.com/v1/time/zone/countries";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "timezone-by-city.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://timezone-by-city.p.rapidapi.com/v1/time/zone/countries"
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "timezone-by-city.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
print(response.json()) 대화형 예
$ GET /v1/time/zone?city=London
{"city":"London","country":"GB","timezone":"Europe/London","current_time":"2026-07-02T13:00:00+01:00","utc_offset":"+01:00"} 구독 및 라이센스
RapidAPI에서 상용화 가능한 계층으로 이 API에 액세스하세요. 사이드 프로젝트, 스타트업, 대량 생산 아키텍처를 위해 설계된 유연한 계획입니다.
개발자 지원
통합하는 데 도움이 필요하거나 사용자 지정 엔드포인트 요청이 있나요? 우리 엔지니어링 팀은 인증, 페이로드 스키마 및 고주파 속도 제한 증가를 지원하기 위해 왔습니다.
시스템 성능
99.9% 가동 시간 SLA로 연중무휴 24시간 모니터링됩니다. 대기 시간이 매우 짧은 응답 시간을 보장하기 위해 전역적으로 분산된 에지 캐싱을 갖춘 클라우드 네이티브 마이크로서비스 위에 구축되었습니다.
모든 시스템 운영