التاريخ والوقت
المنطقة الزمنية حسب المدينة API
حوّل اسم مدينة إلى منطقة IANA وتوقيتها الحالي مع الترجيح بالسكان.
طلب الرؤوس
| 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. خطط مرنة مصممة للمشاريع الجانبية والشركات الناشئة وهياكل الإنتاج كبيرة الحجم.
دعم المطورين
هل تحتاج إلى مساعدة في التكامل أو لديك طلب نقطة نهاية مخصص؟ فريقنا الهندسي موجود هنا للمساعدة في المصادقة ومخططات الحمولة وزيادة حدود معدل التردد العالي.
أداء النظام
مراقبة على مدار 24 ساعة طوال أيام الأسبوع مع وقت تشغيل بنسبة 99.9% لاتفاقية مستوى الخدمة. تم تصميمه فوق خدمات صغيرة سحابية أصلية مع تخزين مؤقت على الحافة موزع عالميًا لضمان أوقات استجابة منخفضة للغاية.
جميع الأنظمة التشغيلية