انتقل إلى المحتوى
ClockCrest

مرجع الواجهة البرمجية: كل نقاط الوصول

كل نقاط الوصول في واجهة ClockCrest المجانية، مولَّدة من الكود الذي يخدّمها. 26 عملية على 28 مساراً، وإصدار الواجهة 1.1.0.

كل مثال مخرجات حقيقية التُقطت بتاريخ 2026-12-01 من تشغيل محلي للكود نفسه. القيم الحيّة تختلف.

الأساسيات

العنوان الأساسي: https://clockcrest.com

  • كل نقطة وصول هي طلب GET يعيد JSON بترميز UTF-8. الطلب HEAD يُجاب مثل GET، والطلب OPTIONS يجيب الطلب التمهيدي في CORS، وأي طريقة أخرى تُقابَل بالرمز 405.
  • لا مفتاح ولا حساب ولا ملفات تعريف ارتباط، ولا يُحفظ أي شيء مما ترسله.
  • المناطق الزمنية بأسماء IANA (مثل Europe/Paris)، والدول برمز ISO 3166-1 من حرفين (مثل FR)، والتواريخ بصيغة YYYY-MM-DD، واللحظات الزمنية بتوقيت UTC وفق ISO 8601.
  • يرد كل معامل مرة واحدة فقط، وسلسلة الاستعلام كلها محدودة بـ512 حرفاً. المعاملات التي لا تعرّفها نقطة الوصول تتجاهلها واجهة REST، إلا في /api/v1/status التي ترفضها.
  • كل رد يذكر مصدره في الحقل source، ويحمل عند الحاجة الحقول sourceUrl و dataYears و lastUpdated وقائمة notes بالتنبيهات.

الأخطاء

الخطأ رمز حالة HTTP من فئة 4xx أو 5xx مع شكل JSON واحد. قيمة code ثابتة وموجّهة للبرامج، وقيمة message بالإنجليزية وموجّهة للقارئ ولا تكرّر أبداً القيمة المرفوضة. تُرسَل ردود الأخطاء مع Cache-Control: no-store.

{
  "error": {
    "code": "invalid_timezone",
    "message": "Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."
  }
}
كل رموز الأخطاء
الرمزالحالةمتى يحدث
missing_parameter400معامل إلزامي غائب أو فارغ.
invalid_parameter400معامل من نوع أو شكل خاطئ، أو ليس من القيم المسموح بها، أو ورد أكثر من مرة.
unknown_parameter400أُرسل معامل لا تقبله نقطة الوصول (أو أداة MCP).
out_of_range400رقم أو تاريخ خارج النطاق الذي توثّقه نقطة الوصول.
invalid_request400سلسلة الاستعلام أطول من 512 حرفاً.
invalid_timezone400القيمة ليست منطقة زمنية من مناطق IANA يعرفها نظام التشغيل.
invalid_time400الوقت المحلي ليس بصيغة YYYY-MM-DDTHH:MM[:SS]، أو يقع خارج 1970–2100.
invalid_date400القيمة ليست تاريخاً حقيقياً بصيغة YYYY-MM-DD.
invalid_year400السنة ليست من أربعة أرقام.
invalid_country400الدولة ليست رمز ISO 3166-1 من حرفين.
invalid_calendar400نظام التقويم ليس من الأنظمة المدعومة.
invalid_range400تاريخ النهاية يسبق تاريخ البداية، أو النطاق أطول من 1500 يوم.
range_not_covered400الحساب يخرج عن السنوات التي تغطيها بيانات العطل؛ يُرفض بدل أن يُخمَّن.
country_not_found404لا توجد بيانات لتلك الدولة.
year_not_found404تتوفر بيانات عطل للدولة، لكن ليس لتلك السنة.
exchange_not_found404لا توجد بورصة بهذا المعرّف.
city_not_found404لا توجد في فهرس المدن مدينة تطابق الاسم.
method_not_allowed405استُخدمت طريقة غير GET (أو OPTIONS للطلب التمهيدي في CORS).
rate_limited429طلبات كثيرة من عنوان واحد لتوقعات طقس غير مخزّنة؛ انتظر مدة Retry-After.
internal_error500حدث خلل غير متوقع في الخادم. الرسالة لا تتضمن أي تفاصيل.
data_unavailable503تعذّرت قراءة ملف بيانات أو خدمة خارجية تحتاجها نقطة الوصول (للطقس: MET Norway). حاول لاحقاً.

طلب بطريقة خاطئة، مثلاً:

curl -X POST 'https://clockcrest.com/api/v1/time/now?tz=UTC'
{"error":{"code":"method_not_allowed","message":"Only GET is supported."}}

التخزين المؤقت

تحمل الردود الناجحة ترويسة Cache-Control تُختار لكل نقطة وصول، من ثانية واحدة للوقت الحالي إلى يوم كامل للبيانات التي لا تتغيّر إلا عند إعادة بناء الموقع. القيمة التي ترسلها كل نقطة وصول مذكورة في خانتها أدناه، كما هي معرَّفة في الكود وكما التُقطت من رد حقيقي. التزم بها من فضلك، فهي أهم ما يُبقي الخدمة مجانية.

CORS

يمكن استدعاء الواجهة من المتصفح في أي موقع. وهذه هي الترويسات المرسَلة:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, X-API-Key
Access-Control-Max-Age: 86400

الأولى ترد في كل رد، حتى ردود الأخطاء، والبقية تجيب طلب OPTIONS التمهيدي. لا بيانات اعتماد في الأمر، فلا شيء يحتاج إلى سماح.

الإصدارات والتوافق

  • إصدار الواجهة هو 1.1.0 (الحقل info.version في ملف OpenAPI). يرتفع عند إضافة عمليات أو معاملات أو حقول في الردود.
  • المسارات تحت /api/v1/ باقية: التغييرات بالإضافة فقط، فاكتب عملاء يتجاهلون الحقول التي لا يعرفونها.
  • عند نقل نقطة وصول بقي مسارها الأصلي ويعيد الرد نفسه: /api/v1/time → /api/v1/time/now, /api/v1/convert → /api/v1/time/convert.
  • أدوات MCP التي تغيّرت أسماؤها ما زالت تستجيب لأسمائها السابقة: convert_time → convert_timezone, get_public_holidays → get_country_holidays, count_business_days → calculate_business_days.

المناطق الزمنية والتوقيت الصيفي

فوارق التوقيت وقواعد التوقيت الصيفي مصدرها قاعدة بيانات IANA المضمَّنة في نظام التشغيل الذي يخدّم الواجهة. يُقبل اسم المنطقة بأي حالة أحرف، ويُعاد باسمه الحالي في IANA.

الوقت المحلي لا يحمل فارقاً عن UTC، ولذلك قد يكون حول موعد تغيير الساعة ملتبساً أو غير موجود أصلاً. نقطة التحويل لا تحسم ذلك بصمت أبداً: الحقل resolution يذكر ما جرى والحقل note يشرحه.

وقت غير موجود

عند الساعة 02:00 يوم 14 مارس 2027 تُقدَّم الساعة في نيويورك إلى 03:00، فلا وجود للوقت 02:30. يُطبَّق الفارق الساري قبل التقديم فتقع النتيجة بعده (gap_shifted_forward):

curl 'https://clockcrest.com/api/v1/convert?from=America/New_York&to=UTC&time=2027-03-14T02:30'
مثال على الرد
{
  "input": {
    "from": "America/New_York",
    "to": "UTC",
    "time": "2027-03-14T02:30:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2027-03-14T03:30:00",
    "iso": "2027-03-14T03:30:00-04:00",
    "utcOffset": "-04:00",
    "utcOffsetMinutes": -240,
    "abbreviation": "EDT",
    "isDst": true
  },
  "to": {
    "timeZone": "UTC",
    "local": "2027-03-14T07:30:00",
    "iso": "2027-03-14T07:30:00+00:00",
    "utcOffset": "+00:00",
    "utcOffsetMinutes": 0,
    "abbreviation": "UTC",
    "isDst": false
  },
  "utc": "2027-03-14T07:30:00Z",
  "resolution": "gap_shifted_forward",
  "note": "The source time does not exist: clocks in the source zone jumped forward over it. The offset in force before the jump was applied, so the time was read as the equivalent moment after the jump.",
  "source": "IANA tz database (runtime Intl)"
}

وقت يتكرّر مرتين

عند الساعة 02:00 يوم 1 نوفمبر 2026 تُؤخَّر الساعة في نيويورك إلى 01:00، فيتكرّر الوقت 01:30 مرتين. يُؤخذ الحدوث الأول ويُسرد الحدوثان في الحقل occurrences (القيمة overlap_earlier):

curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30'
مثال على الرد
{
  "input": {
    "from": "America/New_York",
    "to": "UTC",
    "time": "2026-11-01T01:30:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2026-11-01T01:30:00",
    "iso": "2026-11-01T01:30:00-04:00",
    "utcOffset": "-04:00",
    "utcOffsetMinutes": -240,
    "abbreviation": "EDT",
    "isDst": true
  },
  "to": {
    "timeZone": "UTC",
    "local": "2026-11-01T05:30:00",
    "iso": "2026-11-01T05:30:00+00:00",
    "utcOffset": "+00:00",
    "utcOffsetMinutes": 0,
    "abbreviation": "UTC",
    "isDst": false
  },
  "utc": "2026-11-01T05:30:00Z",
  "resolution": "overlap_earlier",
  "note": "The source time occurs twice because clocks in the source zone were set back. The earlier occurrence was used; pass overlap=later for the second one.",
  "occurrences": ["2026-11-01T01:30:00-04:00", "2026-11-01T01:30:00-05:00"],
  "source": "IANA tz database (runtime Intl)"
}

أرسل overlap=later للحدوث الثاني (overlap_later):

curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30&overlap=later'

تواريخ مجموعات البيانات

تاريخ آخر توليد أو مراجعة لكل مجموعة بيانات. التواريخ نفسها تعود في الحقل lastUpdated في الردود التي تعتمد عليها.

مجموعة البياناتآخر تحديث
العطل الرسمية (Nager.Date)2026-11-30
المدن والدول (GeoNames، بترخيص CC BY 4.0)2026-11-30
ساعات البورصات (صفحة كل بورصة)2026-11-30
قواعد المناطق الزمنية (قاعدة بيانات IANA)تتبع نظام التشغيل

مصدر كل مجموعة بيانات وما لا تغطيه مذكوران في نظرة المطوّرين العامة. المرجع نفسه بصيغة مقروءة آلياً: /openapi.json

نقاط الوصول

الخدمة

إصدار الواجهة نفسها وبيانات البناء وتواريخ مجموعات البيانات.

GET /api/v1/status

إصدار الواجهة وبيانات البناء وتواريخ البيانات. ما الذي يعمل الآن: إصدار الواجهة، وعدد العمليات، ورمز الإيداع ووقت بناء النسخة المنشورة، ومصدر كل مجموعة بيانات وتاريخها وحجمها. لا تأخذ معاملات. الرد دليل على أن الواجهة تجيب، وليس قياساً لنسبة التشغيل: لا يُحفظ أي سجل.

المعاملات

لا تأخذ نقطة الوصول هذه أي معاملات.

التخزين المؤقت

Cache-Control: no-store ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/status'
{
  "status": "ok",
  "at": "2026-12-01T13:46:26Z",
  "unixMs": 1796132786019,
  "api": {
    "version": "1.1.0",
    "operations": 26,
    "paths": 28,
    "mcpTools": 16,
    "openapi": "https://clockcrest.com/openapi.json",
    "documentation": "https://clockcrest.com/developers/docs/"
  },
  "build": {
    "commit": "759afb9",
    "builtAt": "2026-12-01T09:45:24Z"
  },
  "datasets": [
    {
      "id": "time-zones",
      "name": "Time-zone rules",
      "source": "IANA tz database (runtime Intl)",
      "sourceUrl": "https://www.iana.org/time-zones",
      "license": null,
      "lastUpdated": null,
      "records": 419,
      "unit": "time zones",
      "coverage": "Every zone the serving runtime knows. The tz release is the one built into the runtime; Intl does not expose its version."
    },
    // … 4 more
  ],
  "notes": [
    "This response means the API code answered this request; it is not an uptime measurement and no history is kept.",
    "\"build\" is null on both fields when the deployment was not produced by the normal build (for example a local development run)."
  ],
  "source": "ClockCrest (clockcrest.com)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (25)

المخطط: #/components/schemas/ServiceStatus

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/status?verbose=1'
400  {"error":{"code":"unknown_parameter","message":"This endpoint takes no parameters."}}

جرّبها في ساحة التجربة

الوقت

الوقت الحالي، والتحويل بين المناطق، والمناطق الزمنية، وفوارق التوقيت، ومواعيد تغيير التوقيت الصيفي (قاعدة بيانات IANA).

GET /api/v1/time/now

الوقت الحالي في منطقة زمنية. التاريخ والوقت الحاليان في منطقة زمنية من مناطق IANA، مع فارق التوقيت عن UTC، والاختصار، وهل التوقيت الصيفي سارٍ، وموعد التغيّر القادم في الفارق. المسار /api/v1/time هو المسار الأصلي وما زال متاحاً.

المسار الأصلي، وما زال يعمل: /api/v1/time · أداة MCP: get_current_time

المعاملات

المعاملالوصف
tz
إلزامي string
اسم المنطقة الزمنية وفق IANA، مثل Europe/Paris.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: Europe/Paris

التخزين المؤقت

Cache-Control: public, max-age=1 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/now?tz=Europe/Paris'
{
  "timeZone": "Europe/Paris",
  "local": "2026-12-01T14:46:26",
  "iso": "2026-12-01T14:46:26+01:00",
  "utcOffset": "+01:00",
  "utcOffsetMinutes": 60,
  "abbreviation": "CET",
  "isDst": false,
  "utc": "2026-12-01T13:46:26Z",
  "unixMs": 1796132786067,
  "nextTransition": {
    "at": "2027-03-28T01:00:00Z",
    "utcOffsetBefore": "+01:00",
    "utcOffsetAfter": "+02:00"
  },
  "source": "IANA tz database (runtime Intl)"
}
حقول الرد (14)

المخطط: #/components/schemas/CurrentTime

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/now?tz=Mars/Olympus'
400  {"error":{"code":"invalid_timezone","message":"Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."}}

جرّبها في ساحة التجربة

GET /api/v1/time/convert

تحويل وقت محلي بين منطقتين. يحوّل وقتاً محلياً من منطقة زمنية إلى أخرى. الوقت الذي تتخطّاه الساعة عند تقديمها، أو يتكرّر عند تأخيرها، يُحسم صراحةً في الحقول resolution و note و occurrences. المسار /api/v1/convert هو المسار الأصلي وما زال متاحاً.

المسار الأصلي، وما زال يعمل: /api/v1/convert · أداة MCP: convert_timezone

المعاملات

المعاملالوصف
from
إلزامي string
المنطقة الزمنية المصدر وفق IANA، مثل America/New_York.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: America/New_York
to
إلزامي string
المنطقة الزمنية الهدف وفق IANA، مثل Asia/Tokyo.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: Asia/Tokyo
time
إلزامي string
الوقت المحلي في المنطقة المصدر بصيغة YYYY-MM-DDTHH:MM أو YYYY-MM-DDTHH:MM:SS، من دون فارق UTC (السنوات 1970–2100).
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/ · مثال: 2026-12-25T09:00
overlap
اختياري string
أيّ الحدوثين يُستخدم إذا تكرّر الوقت مرتين: earlier (الافتراضي) أو later.
earlier | later · القيمة الافتراضية: earlier

التخزين المؤقت

Cache-Control: public, max-age=3600 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=2026-12-25T09:00'
{
  "input": {
    "from": "America/New_York",
    "to": "Asia/Tokyo",
    "time": "2026-12-25T09:00:00"
  },
  "from": {
    "timeZone": "America/New_York",
    "local": "2026-12-25T09:00:00",
    "iso": "2026-12-25T09:00:00-05:00",
    "utcOffset": "-05:00",
    "utcOffsetMinutes": -300,
    "abbreviation": "EST",
    "isDst": false
  },
  "to": {
    "timeZone": "Asia/Tokyo",
    "local": "2026-12-25T23:00:00",
    "iso": "2026-12-25T23:00:00+09:00",
    "utcOffset": "+09:00",
    "utcOffsetMinutes": 540,
    "abbreviation": "GMT+9",
    "isDst": false
  },
  "utc": "2026-12-25T14:00:00Z",
  "resolution": "exact",
  "note": "The source time exists exactly once in the source zone.",
  "source": "IANA tz database (runtime Intl)"
}
حقول الرد (25)

المخطط: #/components/schemas/Conversion

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=tomorrow'
400  {"error":{"code":"invalid_time","message":"Parameter \"time\" must look like 2026-12-25T09:00 (optionally with :SS), without a UTC offset."}}

جرّبها في ساحة التجربة

GET /api/v1/time/zones

مناطق IANA الزمنية مع فارقها الحالي. كل منطقة زمنية يعرفها نظام التشغيل الذي يخدّم الواجهة، مع فارقها الحالي عن UTC وهل التوقيت الصيفي سارٍ فيها. مع المعامل country تُعاد مناطق تلك الدولة فقط.

المعاملات

المعاملالوصف
country
اختياري string
مناطق هذه الدولة فقط (رمز ISO 3166-1 من حرفين)، مثل AU.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: AU

التخزين المؤقت

Cache-Control: public, max-age=300 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/zones?country=AU'
{
  "at": "2026-12-01T13:46:26Z",
  "country": "AU",
  "count": 8,
  "timeZones": [
    {
      "timeZone": "Australia/Adelaide",
      "utcOffset": "+10:30",
      "utcOffsetMinutes": 630,
      "isDst": true,
      "countries": ["AU"]
    },
    // … 7 more
  ],
  "notes": [
    "The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
    // … 1 more
  ],
  "source": "IANA tz database (runtime Intl)",
  "countrySource": "GeoNames",
  "countrySourceUrl": "https://www.geonames.org"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (13)

المخطط: #/components/schemas/ZoneList

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/time/zones?country=Australia'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"country\" is too long (max 2 characters)."}}
curl 'https://clockcrest.com/api/v1/time/zones?country=ZZ'
404  {"error":{"code":"country_not_found","message":"No time-zone data for country \"ZZ\"."}}

404: The country is not in the data set.

جرّبها في ساحة التجربة

GET /api/v1/time/offsets

المناطق الزمنية مجمّعة بحسب فارقها الحالي. فوارق التوقيت عن UTC المستخدمة في هذه اللحظة، ومع كل فارق المناطق التي تعمل به الآن. مع المعامل minutes يُعاد ذلك الفارق وحده.

المعاملات

المعاملالوصف
minutes
اختياري integer
هذا الفارق فقط، بالدقائق شرق UTC (مثل 345 للفارق +05:45).
≥ -720 · ≤ 840 · مثال: 345

التخزين المؤقت

Cache-Control: public, max-age=300 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=345'
{
  "at": "2026-12-01T13:46:26Z",
  "count": 1,
  "offsets": [
    {
      "utcOffset": "+05:45",
      "utcOffsetMinutes": 345,
      "count": 1,
      "timeZones": ["Asia/Kathmandu"]
    }
  ],
  "notes": [
    "The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
    // … 1 more
  ],
  "source": "IANA tz database (runtime Intl)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (9)

المخطط: #/components/schemas/OffsetList

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=9000'
400  {"error":{"code":"out_of_range","message":"Parameter \"minutes\" must be between -720 and 840."}}

جرّبها في ساحة التجربة

GET /api/v1/time/dst

تغيّرات فارق التوقيت في منطقة خلال سنة. كل تغيّر في فارق التوقيت عن UTC في منطقة خلال سنة (بدء التوقيت الصيفي وانتهاؤه، أو تغيير دائم)، يُستخرج بالبحث في بيانات tz لدى نظام التشغيل، وبدقة الثانية.

المعاملات

المعاملالوصف
tz
إلزامي string
اسم المنطقة الزمنية وفق IANA، مثل Europe/Paris.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: America/New_York
year
إلزامي integer
السنة بأربعة أرقام، من 1970 إلى 2100.
≥ 1970 · ≤ 2100 · مثال: 2027

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=2027'
{
  "timeZone": "America/New_York",
  "year": 2027,
  "observesDst": true,
  "count": 2,
  "transitions": [
    {
      "at": "2027-03-14T07:00:00Z",
      "localBefore": "2027-03-14T01:59:59",
      "localAfter": "2027-03-14T03:00:00",
      "utcOffsetBefore": "-05:00",
      "utcOffsetAfter": "-04:00",
      "changeMinutes": 60,
      "direction": "forward",
      "isDstAfter": true
    },
    // … 1 more
  ],
  "notes": [
    "Every change of UTC offset during the UTC calendar year is listed, whatever its cause (daylight saving time or a permanent change of standard time).",
    // … 2 more
  ],
  "source": "IANA tz database (runtime Intl)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (15)

المخطط: #/components/schemas/DstTransitions

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=1800'
400  {"error":{"code":"out_of_range","message":"Parameter \"year\" must be between 1970 and 2100."}}

جرّبها في ساحة التجربة

GET /api/v1/time/find

إيجاد المنطقة الزمنية لمدينة أو دولة بالاسم. يبحث عن الاسم بين الدول (بالاسم أو برمز ISO) وبين نحو 34,000 مدينة في فهرس GeoNames، ويعيد مناطق IANA المطابقة مع الوقت المحلي الحالي فيها.

أداة MCP: find_timezone

المعاملات

المعاملالوصف
q
إلزامي string
اسم مدينة أو دولة (بأي لغة يعرفها الفهرس، مثل Cairo أو القاهرة أو Le Caire) أو رمز دولة ISO.
length ≥ 1 · length ≤ 64 · مثال: Kathmandu
limit
اختياري integer
أقصى عدد للمدن المطابقة (1–10). الافتراضي 5.
≥ 1 · ≤ 10 · القيمة الافتراضية: 5 · مثال: 2

التخزين المؤقت

Cache-Control: public, max-age=60 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/find?q=Kathmandu&limit=2'
{
  "query": "Kathmandu",
  "at": "2026-12-01T13:46:26Z",
  "countries": [],
  "cities": [
    {
      "name": "Kathmandu",
      "nameAr": "كاتماندو",
      "alternateNames": ["كاتماندو", "काठमाडौं", "Katmandou", "Katmandú", "Катманду", "加德滿都"],
      "country": "NP",
      "countryName": "Nepal",
      "timeZone": "Asia/Kathmandu",
      "lat": 27.7,
      "lon": 85.32,
      "population": 1442271,
      "slug": "kathmandu",
      "url": "https://clockcrest.com/time/kathmandu/",
      "utcOffset": "+05:45",
      "local": "2026-12-01T19:31:26"
    }
  ],
  "notes": [
    "A country can span several time zones: each one is listed with its largest cities. City matches are ordered by relevance, then population.",
    "The index holds GeoNames populated places of 15,000+ people (about 34,000 cities). Smaller places are not in it.",
    // … 1 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30",
  "timeZoneSource": "IANA tz database (runtime Intl)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (37)

المخطط: #/components/schemas/TimezoneSearch

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/find'
400  {"error":{"code":"missing_parameter","message":"Missing required parameter \"q\"."}}

جرّبها في ساحة التجربة

الأماكن

المدن والدول (GeoNames، بترخيص CC BY 4.0).

GET /api/v1/cities

أكبر مدن دولة. مدن الدولة الموجودة في فهرس GeoNames، مرتّبة من الأكثر سكاناً.

المعاملات

المعاملالوصف
country
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل FR.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: NP
limit
اختياري integer
أقصى عدد للمدن (1–200). الافتراضي 50.
≥ 1 · ≤ 200 · القيمة الافتراضية: 50 · مثال: 3

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/cities?country=NP&limit=3'
{
  "country": "NP",
  "countryName": "Nepal",
  "total": 46,
  "count": 3,
  "cities": [
    {
      "name": "Kathmandu",
      "nameAr": "كاتماندو",
      "alternateNames": ["كاتماندو", "काठमाडौं", "Katmandou", "Katmandú", "Катманду", "加德滿都"],
      "country": "NP",
      "countryName": "Nepal",
      "timeZone": "Asia/Kathmandu",
      "lat": 27.7,
      "lon": 85.32,
      "population": 1442271,
      "slug": "kathmandu",
      "url": "https://clockcrest.com/time/kathmandu/"
    },
    // … 2 more
  ],
  "notes": [
    "Cities are ordered by population, largest first.",
    "The index holds GeoNames populated places of 15,000+ people (about 34,000 cities). Smaller places are not in it.",
    // … 1 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (22)

المخطط: #/components/schemas/CityList

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/cities?country=Nepal'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"country\" is too long (max 2 characters)."}}
curl 'https://clockcrest.com/api/v1/cities?country=ZZ'
404  {"error":{"code":"country_not_found","message":"No city data for country \"ZZ\"."}}

404: The country has no city in the index.

جرّبها في ساحة التجربة

GET /api/v1/countries

الدول مع مناطقها الزمنية. الدول التي يعرفها الموقع، مع العاصمة ومناطق IANA الزمنية والسنوات المتوفرة من بيانات العطل الرسمية.

المعاملات

المعاملالوصف
continent
اختياري string
هذه القارة فقط: af أو as أو eu أو na أو sa أو oc أو an (لا فرق بين الأحرف الكبيرة والصغيرة).
af | as | eu | na | sa | oc | an · مثال: an

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/countries?continent=an'
{
  "continent": "AN",
  "count": 2,
  "countries": [
    {
      "code": "TF",
      "name": "French Southern Territories",
      "continent": "AN",
      "capital": "Port-aux-Francais",
      "timeZones": ["Indian/Kerguelen"],
      "publicHolidayYears": []
    },
    // … 1 more
  ],
  "notes": [
    "Countries are those with at least one city page on clockcrest.com (GeoNames data); \"publicHolidayYears\" lists the years with Nager.Date holiday data and is empty when there is none.",
    // … 2 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (14)

المخطط: #/components/schemas/CountryList

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/countries?continent=atlantis'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"continent\" must be one of: af, as, eu, na, sa, oc, an."}}

جرّبها في ساحة التجربة

GET /api/v1/countries/{cc}

دولة واحدة بالتفصيل. العاصمة، وعدد السكان، والمساحة، ورمز الاتصال الدولي، والعملة، وأيام عطلة نهاية الأسبوع، وتغطية بيانات العطل الرسمية، وكل منطقة زمنية في الدولة مع فارقها الحالي وأكبر مدنها.

المعاملات

المعاملالوصف
cc
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل EG. (ضمن المسار)
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: EG

التخزين المؤقت

Cache-Control: public, max-age=300 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/countries/EG'
{
  "code": "EG",
  "name": "Egypt",
  "continent": "AF",
  "continentName": "Africa",
  "capital": {
    "name": "Cairo",
    "slug": "cairo",
    "url": "https://clockcrest.com/time/cairo/"
  },
  "population": 118365995,
  "areaKm2": 1001450,
  "callingCode": "+20",
  "currency": "EGP",
  "tld": ".eg",
  "cityCount": 242,
  "timeZones": [
    {
      "timeZone": "Africa/Cairo",
      "utcOffset": "+02:00",
      "utcOffsetMinutes": 120,
      "isDst": false,
      "cityCount": 242,
      "largestCities": [
        {
          "name": "Cairo",
          "slug": "cairo",
          "url": "https://clockcrest.com/time/cairo/"
        },
        // … 2 more
      ]
    }
  ],
  "weekend": ["Friday", "Saturday"],
  "weekendBasis": "listed",
  "publicHolidayYears": [2025, 2026, 2027, 2028],
  "at": "2026-12-01T13:46:26Z",
  "notes": [
    "Countries are those with at least one city page on clockcrest.com (GeoNames data); \"publicHolidayYears\" lists the years with Nager.Date holiday data and is empty when there is none.",
    // … 3 more
  ],
  "source": "GeoNames",
  "sourceUrl": "https://www.geonames.org",
  "license": "CC BY 4.0",
  "lastUpdated": "2026-11-30",
  "timeZoneSource": "IANA tz database (runtime Intl)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (34)

المخطط: #/components/schemas/Country

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/countries/E1'
400  {"error":{"code":"invalid_country","message":"Parameter \"cc\" must be a two-letter ISO 3166-1 code such as FR."}}
curl 'https://clockcrest.com/api/v1/countries/ZZ'
404  {"error":{"code":"country_not_found","message":"No data for country \"ZZ\"."}}

404: The country is not in the data set.

جرّبها في ساحة التجربة

العطل وأيام العمل

العطل الرسمية (Nager.Date، 2025–2028) وحسابات أيام العمل.

GET /api/v1/holidays

العطل الرسمية لدولة في سنة. العطل الرسمية من ملفات Nager.Date الثابتة في الموقع (2025–2028). العطل الإقليمية مشمولة ومعلَّمة برموز أقاليمها.

أداة MCP: get_country_holidays

المعاملات

المعاملالوصف
country
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل FR.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: FR
year
إلزامي integer
سنة بأربعة أرقام تتوفر لها بيانات (2025–2028).
≥ 2025 · ≤ 2028 · مثال: 2026

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2026'
{
  "country": "FR",
  "countryName": "France",
  "year": 2026,
  "count": 11,
  "holidays": [
    {
      "date": "2026-01-01",
      "name": "New Year's Day",
      "localName": "Jour de l'an",
      "nationwide": true,
      "types": ["Public"]
    },
    // … 10 more
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (15)

المخطط: #/components/schemas/Holidays

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/holidays?country=..&year=2026'
400  {"error":{"code":"invalid_country","message":"Parameter \"country\" must be a two-letter ISO 3166-1 code such as FR."}}
curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2031'
404  {"error":{"code":"year_not_found","message":"No data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}

404: No data for that country or year.

جرّبها في ساحة التجربة

GET /api/v1/business-days

عدّ أيام العمل بين تاريخين. أيام العمل بين تاريخين مع احتساب الطرفين، بعد استثناء أيام عطلة نهاية الأسبوع في الدولة والعطل الرسمية العامة على مستوى الدولة. يجب أن يقع النطاق كله ضمن السنوات التي تغطيها بيانات العطل.

أداة MCP: calculate_business_days

المعاملات

المعاملالوصف
country
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل FR.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: FR
start
إلزامي string
اليوم الأول بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01
end
إلزامي string
اليوم الأخير (محتسَب) بصيغة YYYY-MM-DD، وبحدّ أقصى 1500 يوم بعد البداية.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-31

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-01&end=2026-12-31'
{
  "country": "FR",
  "countryName": "France",
  "start": "2026-12-01",
  "end": "2026-12-31",
  "endInclusive": true,
  "calendarDays": 31,
  "businessDays": 22,
  "weekend": ["Sunday", "Saturday"],
  "holidaysExcluded": [
    {
      "date": "2026-12-25",
      "name": "Christmas Day",
      "localName": "Noël"
    }
  ],
  "holidaysOnWeekend": [],
  "rules": "Weekend days and nationwide public holidays are excluded; regional holidays are not.",
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}
حقول الرد (21)

المخطط: #/components/schemas/BusinessDays

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-31&end=2026-12-01'
400  {"error":{"code":"invalid_range","message":"Parameter \"end\" must not be before \"start\"."}}
curl 'https://clockcrest.com/api/v1/business-days?country=ZZ&start=2026-12-01&end=2026-12-31'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

جرّبها في ساحة التجربة

GET /api/v1/business-days/add

إضافة أيام عمل أو طرحها. التاريخ الذي تصل إليه بالتقدّم عدداً من أيام العمل (أو بالرجوع، إذا كان العدد سالباً) من تاريخ البداية، مع تخطّي أيام عطلة نهاية الأسبوع والعطل الرسمية العامة في الدولة. تاريخ البداية نفسه لا يُحتسب.

أداة MCP: add_business_days

المعاملات

المعاملالوصف
country
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل FR.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: EG
start
إلزامي string
تاريخ البداية بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-30
days
إلزامي integer
عدد أيام العمل المضافة؛ قيمة سالبة للرجوع (من −1000 إلى 1000).
≥ -1000 · ≤ 1000 · مثال: 5

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days/add?country=EG&start=2026-12-30&days=5'
{
  "country": "EG",
  "countryName": "Egypt",
  "start": "2026-12-30",
  "startWeekday": "Wednesday",
  "startIsBusinessDay": true,
  "days": 5,
  "result": "2027-01-06",
  "resultWeekday": "Wednesday",
  "calendarDays": 7,
  "weekend": ["Friday", "Saturday"],
  "holidaysSkipped": [],
  "rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. The start date itself is not counted: the result is the 5 business days after it.",
  "notes": ["The weekend used for EG is the one documented for that country."],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "lastUpdated": "2026-11-30",
  "dataYears": [2025, 2026, 2027, 2028]
}
حقول الرد (20)

المخطط: #/components/schemas/BusinessDaysAdd

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days/add?country=FR&start=2028-12-20&days=20'
400  {"error":{"code":"range_not_covered","message":"Holiday data for FR covers 2025, 2026, 2027, 2028 only; 2029 is outside it."}}
curl 'https://clockcrest.com/api/v1/business-days/add?country=ZZ&start=2026-12-01&days=5'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

جرّبها في ساحة التجربة

GET /api/v1/business-days/next

هل التاريخ يوم عمل، وما يوم العمل التالي. هل التاريخ يوم عمل في الدولة (وإن لم يكن، فما السبب) وما أول يوم عمل يأتي بعده.

المعاملات

المعاملالوصف
country
إلزامي string
رمز الدولة ISO 3166-1 من حرفين، مثل FR.
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: FR
date
إلزامي string
التاريخ المراد فحصه بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-24

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-12-24'
{
  "country": "FR",
  "countryName": "France",
  "date": "2026-12-24",
  "weekday": "Thursday",
  "isBusinessDay": true,
  "reason": null,
  "holiday": null,
  "nextBusinessDay": "2026-12-28",
  "nextBusinessDayWeekday": "Monday",
  "daysUntilNext": 4,
  "weekend": ["Sunday", "Saturday"],
  "rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. \"nextBusinessDay\" is strictly after \"date\".",
  "notes": [
    "No special weekend is documented for FR: Saturday–Sunday is assumed. Countries with a documented different weekend: BD, BH, DZ, EG, IL, IQ, IR, JO, KW, LY, MV, NP, OM, PS, QA, SA, SD, SY, YE."
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "lastUpdated": "2026-11-30",
  "dataYears": [2025, 2026, 2027, 2028]
}
حقول الرد (20)

المخطط: #/components/schemas/NextBusinessDay

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-02-30'
400  {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}
curl 'https://clockcrest.com/api/v1/business-days/next?country=ZZ&date=2026-12-24'
404  {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}

404: No holiday data for that country.

جرّبها في ساحة التجربة

التواريخ والتقاويم

حسابات التواريخ، وأسابيع ISO، وتقاويم الأشهر، والتحويل بين أنظمة التقويم.

GET /api/v1/calendar

تقويم شهر مع أسابيع ISO وعطلة نهاية الأسبوع والعطل. شهر موزَّع على أسابيع ISO (الإثنين أولاً) مع أرقامها. مع المعامل country تُعلَّم أيام عطلة نهاية الأسبوع والعطل الرسمية في تلك الدولة وتُعدّ أيام العمل فيها.

أداة MCP: get_calendar

المعاملات

المعاملالوصف
year
إلزامي integer
السنة بأربعة أرقام (1900–2100؛ ومع دولة، سنة تتوفر لها بيانات العطل).
≥ 1900 · ≤ 2100 · مثال: 2026
month
إلزامي integer
رقم الشهر، من 1 إلى 12.
≥ 1 · ≤ 12 · مثال: 12
country
اختياري string
علِّم عطلة نهاية الأسبوع والعطل الرسمية في هذه الدولة (رمز ISO 3166-1 من حرفين).
length ≥ 2 · length ≤ 2 · /^[A-Za-z]{2}$/ · مثال: FR

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2026&month=12'
{
  "year": 2026,
  "month": 12,
  "monthName": "December",
  "country": "FR",
  "countryName": "France",
  "weekStart": "Monday",
  "weekend": ["Sunday", "Saturday"],
  "daysInMonth": 31,
  "businessDays": 22,
  "weeks": [
    {
      "isoWeek": 49,
      "isoWeekYear": 2026,
      "days": [
        null,
        // … 6 more
      ]
    },
    // … 4 more
  ],
  "holidays": [
    {
      "date": "2026-12-25",
      "name": "Christmas Day",
      "localName": "Noël",
      "nationwide": true,
      "types": ["Public"]
    }
  ],
  "notes": [
    "Rows are ISO 8601 weeks (Monday to Sunday); null cells pad the first and last week. Week 1 is the week that contains the first Thursday of the year.",
    // … 2 more
  ],
  "source": "Nager.Date",
  "sourceUrl": "https://date.nager.at",
  "dataYears": [2025, 2026, 2027, 2028],
  "lastUpdated": "2026-11-30"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (33)

المخطط: #/components/schemas/MonthCalendar

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/calendar?year=2026&month=13'
400  {"error":{"code":"out_of_range","message":"Parameter \"month\" must be between 1 and 12."}}
curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2031&month=1'
404  {"error":{"code":"year_not_found","message":"No holiday data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}

404: No holiday data for that country or year.

جرّبها في ساحة التجربة

GET /api/v1/calendar/convert

تحويل تاريخ بين أنظمة التقويم. يحوّل تاريخاً بين التقويم الميلادي والهجري (أم القرى) والفارسي (الهجري الشمسي) والعبري. تذكر ملاحظات الرد نوع التقويم الهجري المستخدم والتنبيه الخاص برؤية الهلال.

أداة MCP: convert_calendar

المعاملات

المعاملالوصف
date
إلزامي string
التاريخ في التقويم المصدر بترتيب سنة-شهر-يوم وسنة من أربعة أرقام، مثل 2026-12-01 أو 1448-09-01.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01
from
إلزامي string
التقويم المصدر.
gregorian | islamic-umalqura | persian | hebrew · مثال: gregorian
to
إلزامي string
التقويم الهدف.
gregorian | islamic-umalqura | persian | hebrew · مثال: islamic-umalqura

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-umalqura'
{
  "input": {
    "calendar": "gregorian",
    "year": 2026,
    "month": 12,
    "day": 1,
    "monthName": "December",
    "date": "2026-12-01"
  },
  "result": {
    "calendar": "islamic-umalqura",
    "year": 1448,
    "month": 6,
    "day": 21,
    "monthName": "Jumada II",
    "date": "1448-06-21"
  },
  "gregorian": "2026-12-01",
  "weekday": "Tuesday",
  "notes": [
    "Months are numbered by their position in the year. A Hebrew leap year has 13 months (Adar I = 6, Adar II = 7); month names are the English names from the runtime's CLDR data.",
    // … 3 more
  ],
  "supportedCalendars": ["gregorian", "islamic-umalqura", "persian", "hebrew"],
  "source": "ICU / CLDR calendars (runtime Intl)"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (19)

المخطط: #/components/schemas/CalendarConversion

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-civil'
400  {"error":{"code":"invalid_calendar","message":"Parameter \"to\" must be one of: gregorian, islamic-umalqura, persian, hebrew. Other calendars (including islamic-civil) are not supported."}}

جرّبها في ساحة التجربة

GET /api/v1/date/difference

الفرق بين تاريخين. عدد الأيام بين تاريخين، معبَّراً عنه أيضاً بالأسابيع والأيام، وبالسنوات والأشهر والأيام.

أداة MCP: calculate_date_difference

المعاملات

المعاملالوصف
start
إلزامي string
التاريخ الأول بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2024-02-29
end
إلزامي string
التاريخ الثاني بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/difference?start=2024-02-29&end=2026-12-01'
{
  "start": "2024-02-29",
  "startWeekday": "Thursday",
  "end": "2026-12-01",
  "endWeekday": "Tuesday",
  "days": 1006,
  "negative": false,
  "weeks": {
    "weeks": 143,
    "days": 5
  },
  "calendar": {
    "years": 2,
    "months": 9,
    "days": 2
  },
  "notes": [
    "\"days\" is end minus start (the end date is not counted; negative when end is before start). \"weeks\" and \"calendar\" describe the absolute difference.",
    "\"calendar\" counts whole years and months first, then the remaining days; a month-end start is clamped (31 January + 1 month = 28 or 29 February)."
  ],
  "source": "Proleptic Gregorian calendar arithmetic"
}
حقول الرد (15)

المخطط: #/components/schemas/DateDifference

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/difference?start=2026-02-29&end=2026-03-01'
400  {"error":{"code":"invalid_date","message":"Parameter \"start\" must be a calendar date like 2026-12-01."}}

جرّبها في ساحة التجربة

GET /api/v1/date/add

إضافة سنوات وأشهر وأسابيع وأيام إلى تاريخ. يضيف سنوات وأشهراً وأسابيع وأياماً (أو يطرحها إذا كانت القيم سالبة). تُطبَّق السنوات والأشهر أولاً مع الوقوف عند آخر يوم في الشهر عند الحاجة، ثم الأسابيع والأيام.

أداة MCP: add_duration

المعاملات

المعاملالوصف
date
إلزامي string
تاريخ البداية بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2024-01-31
years
اختياري integer
عدد السنوات المضافة (قد يكون سالباً).
≥ -9999 · ≤ 9999
months
اختياري integer
عدد الأشهر المضافة (قد يكون سالباً).
≥ -120000 · ≤ 120000 · مثال: 1
weeks
اختياري integer
عدد الأسابيع المضافة (قد يكون سالباً).
≥ -520000 · ≤ 520000
days
اختياري integer
عدد الأيام المضافة (قد يكون سالباً).
≥ -3650000 · ≤ 3650000

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/add?date=2024-01-31&months=1'
{
  "date": "2024-01-31",
  "weekday": "Wednesday",
  "added": {
    "years": 0,
    "months": 1,
    "weeks": 0,
    "days": 0
  },
  "result": "2024-02-29",
  "resultWeekday": "Thursday",
  "resultIsoWeek": 9,
  "resultIsoWeekYear": 2024,
  "daysBetween": 29,
  "notes": [
    "Years and months are added first, clamping to the last day of the month when needed (31 January + 1 month = 28 or 29 February); weeks and days are added afterwards."
  ],
  "source": "Proleptic Gregorian calendar arithmetic"
}
حقول الرد (14)

المخطط: #/components/schemas/DateAdd

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/add?date=2026-01-31'
400  {"error":{"code":"missing_parameter","message":"Give at least one of \"years\", \"months\", \"weeks\" or \"days\"."}}

جرّبها في ساحة التجربة

GET /api/v1/date/week-number

رقم أسبوع ISO لتاريخ. رقم الأسبوع وسنة الأسبوع وفق ISO 8601 لتاريخ معيّن، مع يومَي الإثنين والأحد من ذلك الأسبوع، وترتيب اليوم في السنة، وهل السنة كبيسة.

المعاملات

المعاملالوصف
date
إلزامي string
التاريخ بصيغة YYYY-MM-DD.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2027-01-01

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/week-number?date=2027-01-01'
{
  "date": "2027-01-01",
  "weekday": "Friday",
  "isoWeekday": 5,
  "isoWeek": 53,
  "isoWeekYear": 2026,
  "isoWeekDate": "2026-W53-5",
  "weeksInIsoYear": 53,
  "weekStart": "2026-12-28",
  "weekEnd": "2027-01-03",
  "dayOfYear": 1,
  "daysInYear": 365,
  "isLeapYear": false,
  "notes": [
    "ISO 8601 week numbering: weeks start on Monday and week 1 is the week with the year's first Thursday, so the first and last days of a year can belong to a week of the neighbouring year (\"isoWeekYear\")."
  ],
  "source": "ISO 8601 week date (proleptic Gregorian calendar)"
}
حقول الرد (14)

المخطط: #/components/schemas/WeekNumber

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/week-number?date=01/01/2027'
400  {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}

جرّبها في ساحة التجربة

الفلك

الشروق والغروب، وأطوار القمر، ومواقيت الصلاة (قيم محسوبة).

GET /api/v1/astronomy/sun

الشروق والغروب والزوال والشفق. الشروق والغروب والزوال وطول النهار، والشفق المدني والملاحي والفلكي لمكان وتاريخ. حالتا النهار القطبي والليل القطبي تُذكران صراحةً.

أداة MCP: get_sunrise_sunset

المعاملات

المعاملالوصف
lat
إلزامي number
خط العرض بالدرجات العشرية، والشمال موجب (من −90 إلى 90).
≥ -90 · ≤ 90 · مثال: 30.06
lon
إلزامي number
خط الطول بالدرجات العشرية، والشرق موجب (من −180 إلى 180).
≥ -180 · ≤ 180 · مثال: 31.25
date
إلزامي string
التاريخ المحلي في المكان بصيغة YYYY-MM-DD (1900–2100).
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01
tz
إلزامي string
المنطقة الزمنية للمكان وفق IANA، مثل Africa/Cairo.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: Africa/Cairo

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/astronomy/sun?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo'
{
  "date": "2026-12-01",
  "lat": 30.06,
  "lon": 31.25,
  "timeZone": "Africa/Cairo",
  "sunrise": {
    "utc": "2026-12-01T04:33:21Z",
    "local": "2026-12-01T06:33:21+02:00"
  },
  "sunset": {
    "utc": "2026-12-01T14:54:38Z",
    "local": "2026-12-01T16:54:38+02:00"
  },
  "solarNoon": {
    "utc": "2026-12-01T09:43:59Z",
    "local": "2026-12-01T11:43:59+02:00"
  },
  "dayLengthSeconds": 37277,
  "dayLength": "10:21:17",
  "polar": null,
  "polarNote": null,
  "twilight": {
    "civil": {
      "dawn": {
        "utc": "2026-12-01T04:07:21Z",
        "local": "2026-12-01T06:07:21+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T15:20:38Z",
        "local": "2026-12-01T17:20:38+02:00"
      }
    },
    "nautical": {
      "dawn": {
        "utc": "2026-12-01T03:37:49Z",
        "local": "2026-12-01T05:37:49+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T15:50:10Z",
        "local": "2026-12-01T17:50:10+02:00"
      }
    },
    "astronomical": {
      "dawn": {
        "utc": "2026-12-01T03:08:50Z",
        "local": "2026-12-01T05:08:50+02:00"
      },
      "dusk": {
        "utc": "2026-12-01T16:19:09Z",
        "local": "2026-12-01T18:19:09+02:00"
      }
    }
  },
  "notes": [
    "Sunrise and sunset are the moments the Sun's upper limb is on a sea-level horizon with standard refraction (centre 0.833° below it). Typical accuracy is 1–2 minutes below 72° latitude; terrain, elevation and unusual refraction are not modelled.",
    // … 2 more
  ],
  "source": "NOAA solar position algorithm (Jean Meeus, Astronomical Algorithms)",
  "sourceUrl": "https://gml.noaa.gov/grad/solcalc/calcdetails.html"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (42)

المخطط: #/components/schemas/Sun

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/astronomy/sun?lat=95&lon=31.25&date=2026-12-01&tz=Africa/Cairo'
400  {"error":{"code":"out_of_range","message":"Parameter \"lat\" must be between -90 and 90."}}

جرّبها في ساحة التجربة

GET /api/v1/astronomy/moon

طور القمر ونسبة الإضاءة والأطوار القادمة. اسم الطور ونسبة الجزء المضيء وعمر القمر، ومواعيد المحاق والتربيع الأول والبدر والتربيع الأخير القادمة. من دون date يُحسب الطور للحظة الحالية.

أداة MCP: get_moon_phase

المعاملات

المعاملالوصف
date
اختياري string
التاريخ بصيغة YYYY-MM-DD، ويُحسب عند 12:00 UTC (1900–2100). الافتراضي: الآن.
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01

التخزين المؤقت

Cache-Control: public, max-age=86400 (إذا حدّد الطلب تاريخاً) · public, max-age=300 (في غير ذلك) · public, max-age=86400 (أُرسلت في الرد الملتقَط)

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/astronomy/moon?date=2026-12-01'
{
  "date": "2026-12-01",
  "at": "2026-12-01T12:00:00Z",
  "phase": "last-quarter",
  "phaseName": "Last Quarter",
  "illumination": 0.4747,
  "illuminationPercent": 47.5,
  "ageDays": 22.21,
  "cycleAngle": 272.8,
  "waxing": false,
  "nextNewMoon": "2026-12-09T00:51:46Z",
  "nextFirstQuarter": "2026-12-17T05:42:35Z",
  "nextFullMoon": "2026-12-24T01:28:08Z",
  "nextLastQuarter": "2026-12-30T18:59:29Z",
  "notes": [
    "A date without a time is evaluated at 12:00:00 UTC.",
    "The phase is geocentric: it is the same everywhere on Earth at a given instant. Principal phases (new, quarters, full) are reported for about half a day either side of their exact moment.",
    // … 1 more
  ],
  "source": "Jean Meeus, Astronomical Algorithms (2nd ed.), chapters 48–49"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (15)

المخطط: #/components/schemas/Moon

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/astronomy/moon?date=1600-01-01'
400  {"error":{"code":"out_of_range","message":"Parameter \"date\" must be between 1900-01-01 and 2100-12-31."}}

جرّبها في ساحة التجربة

GET /api/v1/prayer-times

مواقيت الصلاة. الفجر والشروق والظهر والعصر والمغرب والعشاء لمكان وتاريخ، مع معايير طريقة الحساب المستخدمة. قد تنشر الجهات المحلية مواقيت تختلف ببضع دقائق.

أداة MCP: get_prayer_times

المعاملات

المعاملالوصف
lat
إلزامي number
خط العرض بالدرجات العشرية، والشمال موجب (من −90 إلى 90).
≥ -90 · ≤ 90 · مثال: 30.06
lon
إلزامي number
خط الطول بالدرجات العشرية، والشرق موجب (من −180 إلى 180).
≥ -180 · ≤ 180 · مثال: 31.25
date
إلزامي string
التاريخ المحلي في المكان بصيغة YYYY-MM-DD (1900–2100).
/^\d{4}-\d{2}-\d{2}$/ · مثال: 2026-12-01
tz
إلزامي string
المنطقة الزمنية للمكان وفق IANA، مثل Africa/Cairo.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: Africa/Cairo
method
اختياري string
طريقة الحساب: mwl (رابطة العالم الإسلامي) أو umm-al-qura أو egyptian أو karachi أو isna. الافتراضي mwl.
mwl | umm-al-qura | egyptian | karachi | isna · القيمة الافتراضية: mwl · مثال: egyptian
asr
اختياري string
قاعدة العصر: standard (الشافعي والمالكي والحنبلي) أو hanafi. الافتراضي standard.
standard | hanafi · القيمة الافتراضية: standard

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/prayer-times?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo&method=egyptian'
{
  "date": "2026-12-01",
  "lat": 30.06,
  "lon": 31.25,
  "timeZone": "Africa/Cairo",
  "times": {
    "fajr": {
      "utc": "2026-12-01T03:01:40Z",
      "local": "2026-12-01T05:01:40+02:00"
    },
    "sunrise": {
      "utc": "2026-12-01T04:33:21Z",
      "local": "2026-12-01T06:33:21+02:00"
    },
    "dhuhr": {
      "utc": "2026-12-01T09:43:59Z",
      "local": "2026-12-01T11:43:59+02:00"
    },
    "asr": {
      "utc": "2026-12-01T12:35:32Z",
      "local": "2026-12-01T14:35:32+02:00"
    },
    "maghrib": {
      "utc": "2026-12-01T14:54:38Z",
      "local": "2026-12-01T16:54:38+02:00"
    },
    "isha": {
      "utc": "2026-12-01T16:16:45Z",
      "local": "2026-12-01T18:16:45+02:00"
    }
  },
  "method": {
    "id": "egyptian",
    "name": "Egyptian General Authority of Survey",
    "fajrAngle": 19.5,
    "ishaAngle": 17.5,
    "ishaMinutesAfterMaghrib": null,
    "ramadan": null
  },
  "asr": {
    "school": "standard",
    "shadowFactor": 1
  },
  "highLatitudeApproximation": false,
  "polar": false,
  "notes": [
    "Calculated times. Mosques and local religious authorities may publish times that differ by a few minutes (rounding, safety margins, a different method or local practice); follow the local timetable where one exists.",
    // … 3 more
  ],
  "methods": ["mwl", "umm-al-qura", "egyptian", "karachi", "isna"],
  "source": "Solar position: NOAA algorithm (Jean Meeus); angles: the published parameters of each method"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (38)

المخطط: #/components/schemas/PrayerTimes

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/prayer-times?lat=30.06&lon=31.25&date=2026-12-01&tz=Africa/Cairo&method=custom'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"method\" must be one of: mwl, umm-al-qura, egyptian, karachi, isna."}}

جرّبها في ساحة التجربة

الطقس

توقعات الطقس من MET Norway (بترخيص CC BY 4.0).

GET /api/v1/weather

توقعات الطقس لمكان (MET Norway). الطقس الآن و24 ساعة قادمة و7 أيام لإحداثيات أو لمدينة، من MET Norway (CC BY 4.0). تُقرَّب الإحداثيات إلى 0.1° (نحو 11 كم) وتُرسل إلى MET Norway، وتُخزَّن التوقعات حتى انتهاء صلاحيتها. الطلبات غير المخزّنة محدودة لكل عميل (429) وإجمالاً (503).

أداة MCP: get_weather

المعاملات

المعاملالوصف
lat
اختياري number
خط العرض بالدرجات العشرية، والشمال موجب (من −90 إلى 90).
≥ -90 · ≤ 90 · مثال: 59.91
lon
اختياري number
خط الطول بالدرجات العشرية، والشرق موجب (من −180 إلى 180).
≥ -180 · ≤ 180 · مثال: 10.75
city
اختياري string
مدينة بدلاً من الإحداثيات: معرّف أو اسم.
length ≥ 1 · length ≤ 64
tz
اختياري string
منطقة الأوقات المحلية؛ الافتراضي منطقة المدينة أو UTC.
length ≥ 1 · length ≤ 64 · /^[A-Za-z0-9_+\-/]+$/ · مثال: Europe/Oslo

التخزين المؤقت

Cache-Control: public, max-age=600 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/weather?lat=59.91&lon=10.75&tz=Europe/Oslo'
{
  "location": {
    "lat": 59.9,
    "lon": 10.8,
    "elevation": 138,
    "name": null,
    "country": null,
    "timeZone": "Europe/Oslo"
  },
  "updated": "2026-12-01T12:35:33Z",
  "expires": "2026-12-01T13:53:01Z",
  "current": {
    "time": "2026-12-01T13:00:00Z",
    "local": "2026-12-01T14:00:00+01:00",
    "temperature": 7.7,
    "symbol": "lightrain",
    "windSpeed": 5.8,
    "windDirection": 188,
    "humidity": 99.9,
    "cloudCover": 100,
    "pressure": 1014,
    "precipitationNextHour": 0.1
  },
  "hourly": [
    {
      "time": "2026-12-01T13:00:00Z",
      "local": "2026-12-01T14:00:00+01:00",
      "temperature": 7.7,
      "symbol": "lightrain",
      "windSpeed": 5.8,
      "windDirection": 188,
      "precipitation": 0.1,
      "humidity": 99.9
    },
    // … 23 more
  ],
  "daily": [
    {
      "date": "2026-12-01",
      "min": 6.7,
      "max": 7.7,
      "symbol": "lightrain",
      "precipitation": 1.1
    },
    // … 6 more
  ],
  "units": {
    "temperature": "celsius",
    "windSpeed": "m/s",
    "windDirection": "degrees",
    "precipitation": "mm",
    "humidity": "%",
    "cloudCover": "%",
    "pressure": "hPa"
  },
  "notes": [
    "Forecast for the coordinates snapped to a 0.1° grid (about 11 km); \"location\" gives the point used. \"current\" is the forecast step for the present hour, not a station observation.",
    // … 3 more
  ],
  "source": "MET Norway Locationforecast 2.0",
  "sourceUrl": "https://api.met.no/weatherapi/locationforecast/2.0/documentation",
  "attribution": "Weather data from MET Norway",
  "license": "CC BY 4.0",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (49)

المخطط: #/components/schemas/Weather

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/weather?lat=95&lon=10.75'
400  {"error":{"code":"out_of_range","message":"Parameter \"lat\" must be between -90 and 90."}}
curl 'https://clockcrest.com/api/v1/weather?city=xqzvw'
404  {"error":{"code":"city_not_found","message":"No city in the index matches the \"city\" parameter."}}

404: No city in the index matches "city".

جرّبها في ساحة التجربة

الأسواق

ساعات التداول الاعتيادية في كبرى البورصات.

GET /api/v1/markets/hours

ساعات التداول الاعتيادية في البورصات وحالتها. جلسات التداول الاعتيادية في كبرى البورصات مع صفحة المصدر الخاصة بكل بورصة، وهل هي مفتوحة الآن بحسب الجدول، وموعدا الافتتاح والإغلاق القادمان. عطل البورصات والإغلاق المبكر غير مشمولة في الحساب.

أداة MCP: get_market_hours

المعاملات

المعاملالوصف
exchange
اختياري string
هذه البورصة فقط، بمعرّفها (مثل nyse).
nyse | nasdaq | tsx | lse | euronext-paris | xetra | six | bist | tadawul | dfm | adx | egx | jse | nse | bse | sgx | hkex | sse | szse | tse | krx | asx | nzx · مثال: nyse

التخزين المؤقت

Cache-Control: public, max-age=30 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=nyse'
{
  "at": "2026-12-01T13:46:27Z",
  "exchange": "nyse",
  "count": 1,
  "exchanges": [
    {
      "id": "nyse",
      "name": "NYSE",
      "fullName": "New York Stock Exchange",
      "city": "New York",
      "country": "US",
      "region": "americas",
      "timeZone": "America/New_York",
      "tradingDays": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "open": "09:30",
      "close": "16:00",
      "lunchBreak": null,
      "closingAuction": null,
      "sourceUrl": "https://www.nyse.com/markets/hours-calendars",
      "status": {
        "state": "closed",
        "isOpen": false,
        "localTime": "2026-12-01T08:46:27-05:00",
        "nextEvent": {
          "kind": "open",
          "at": "2026-12-01T14:30:00Z",
          "local": "2026-12-01T09:30:00-05:00"
        },
        "nextOpen": "2026-12-01T14:30:00Z",
        "nextClose": "2026-12-01T21:00:00Z"
      }
    }
  ],
  "notes": [
    "Exchange holidays, early closes and unscheduled halts are NOT modelled: \"status\" is what the regular weekly timetable says. Check the exchange's own calendar (\"sourceUrl\") before relying on it.",
    // … 2 more
  ],
  "source": "Each exchange's published trading hours (see \"sourceUrl\" per exchange)",
  "lastUpdated": "2026-11-30"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (32)

المخطط: #/components/schemas/MarketHours

جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=NYSE!'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"exchange\" must be an exchange id such as nyse."}}
curl 'https://clockcrest.com/api/v1/markets/hours?exchange=lse2'
404  {"error":{"code":"exchange_not_found","message":"Unknown exchange. Available ids: nyse, nasdaq, tsx, lse, euronext-paris, xetra, six, bist, tadawul, dfm, adx, egx, jse, nse, bse, sgx, hkex, sse, szse, tse, krx, asx, nzx."}}

404: Unknown exchange id.

جرّبها في ساحة التجربة

Widgets

Embeddable clock templates and the parameters of the embed pages.

GET /api/v1/widgets/templates

Embeddable widget templates and their parameters. The thirty clock designs of the embeddable ClockCrest widgets — id, name in four languages, category, natural size and defaults — with an example embed URL each, the designs of the other widgets (calendar, countdown, stopwatch, timer, world clock table, prayer times, public holidays, converter, sunrise and sunset), and every query parameter the embed pages accept. Read-only reference data: the widgets themselves run in the visitor's browser and do not call this API.

المعاملات

المعاملالوصف
category
اختياري string
Only the templates of this category: analog, digital, advanced
analog | digital | advanced · مثال: digital

التخزين المؤقت

Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط

مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/widgets/templates?category=digital'
{
  "category": "digital",
  "count": 10,
  "templates": [
    {
      "id": "digital-classic",
      "names": {
        "en": "Classic digital",
        "ar": "رقمية كلاسيكية",
        "fr": "Numérique classique",
        "es": "Digital clásico"
      },
      "category": "digital",
      "engine": "text",
      "width": 320,
      "height": 160,
      "defaults": {
        "theme": "auto",
        "seconds": true,
        "date": true,
        "weekday": true,
        "abbr": false,
        "offset": true,
        "flag": false,
        "transparent": false,
        "font": "system",
        "radius": 0,
        "border": 1,
        "shadow": 0,
        "zones": []
      },
      "supports": {
        "seconds": true,
        "extraZones": 0,
        "coordinates": false
      },
      "embedUrl": "https://clockcrest.com/embed/clock/?template=digital-classic",
      "studioUrl": "https://clockcrest.com/widgets/studio/?template=digital-classic"
    },
    // … 9 more
  ],
  "widgets": [
    {
      "type": "countdown",
      "element": "clockcrest-countdown",
      "embedUrl": "https://clockcrest.com/embed/countdown/",
      "defaultTemplate": "cd-classic",
      "templates": [
        {
          "id": "cd-classic",
          "names": {
            "en": "Classic countdown",
            "ar": "عدّ تنازلي كلاسيكي",
            "fr": "Compte à rebours classique",
            "es": "Cuenta regresiva clásica"
          },
          "width": 320,
          "height": 160,
          "embedUrl": "https://clockcrest.com/embed/countdown/?to=2027-01-01T00%3A00",
          "studioUrl": "https://clockcrest.com/widgets/studio/?type=countdown&to=2027-01-01T00%3A00"
        },
        // … 2 more
      ]
    },
    // … 8 more
  ],
  "parameters": [
    {
      "name": "template",
      "type": "enum",
      "description": "Design: for a clock one of the ids listed in \"templates\" (omitted: digital-classic); for another widget one of the ids listed for it in \"widgets\" (omitted: its first design).",
      "values": [
        "analog-classic",
        "analog-minimal",
        "analog-luxury",
        "analog-roman",
        "analog-wood",
        "analog-scandi",
        "analog-transparent",
        "analog-industrial",
        "analog-swiss",
        "analog-kids",
        "digital-classic",
        "digital-led-red",
        // … 48 more
      ],
      "minimum": null,
      "maximum": null,
      "appliesTo": ["clock", "countdown", "calendar"]
    },
    // … 38 more
  ],
  "notes": [
    "A widget is the page at \"embedUrl\", meant to be placed in an <iframe>. It shows the time of the visitor's device clock converted with the IANA time zone database of their browser; the embed pages make no network request, so they do not use this API.",
    // … 5 more
  ],
  "source": "ClockCrest widget template registry",
  "lastUpdated": "2026-12-01"
}

مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».

حقول الرد (60)

المخطط: #/components/schemas/WidgetTemplates

جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/widgets/templates?category=round'
400  {"error":{"code":"invalid_parameter","message":"Parameter \"category\" must be one of: analog, digital, advanced."}}

جرّبها في ساحة التجربة