Zeitzone nach Stadt API
Löst einen Stadtnamen auf seine IANA-Zeitzone und aktuelle Ortszeit auf, disambiguiert nach Bevölkerung.
Anforderungsheader
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | timezone-by-city.p.rapidapi.com |
Endpunkte
/v1/time/zone Look up the IANA time zone and current local time of a city
Parameter
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
city | string | required | — | matches \S |
country | string | optional | — | — |
Codebeispiele
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()) /v1/time/zone/countries List all countries with timezone data in the dataset, sorted alphabetically by ISO code.
Codebeispiele
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()) Interaktives Beispiel
$ 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"} Abonnieren und lizenzieren
Greifen Sie auf diese API mit kommerziellen Stufen auf RapidAPI zu. Flexible Pläne für Nebenprojekte, Startups und großvolumige Produktionsarchitekturen.
Entwicklerunterstützung
Benötigen Sie Hilfe bei der Integration oder haben Sie eine individuelle Endpunktanfrage? Unser Technikteam ist hier, um Sie bei der Authentifizierung, Nutzlastschemata und der Erhöhung der Hochfrequenz-Ratenbegrenzung zu unterstützen.
Systemleistung
Rund um die Uhr überwacht mit einem SLA für eine Verfügbarkeit von 99,9 %. Basierend auf Cloud-nativen Microservices mit global verteiltem Edge-Caching, um Reaktionszeiten mit äußerst geringer Latenz zu gewährleisten.