TheShia
بازگشت به همهٔ APIها

رؤیت‌پذیری ماه

دادهٔ رؤیت هلال پشت نقشه‌های رؤیت — شبکهٔ مناطق جهانی برای هر شب از پنجرهٔ رؤیت ماه قمری، یا رؤیت‌پذیری برای یک مکان مشخص با تاریخ نخستین رؤیت بر اساس هر معیار (یالوپ/شوکت، تنظیم‌شده با moonsighting.com).

GET https://theshia.org/api/v1/moon-visibility

پارامترها

  • hy default: current Hijri year, 1317 to 1523 — the lunation the maps are anchored to.
  • hm default: current Hijri month, 1 (Muharram) to 12 (Dhul Hijjah).
  • evening default: 0 -2 to 2 — which evening of the sighting window (0 = the sighting evening, the day before the month begins).
  • res default: 5 grid cell size in degrees — values: "5" (72×26 cells, AL-Qamar's native grid) · "2" (180×65 cells).
  • lat point mode latitude -90 to 90 — switches to a per-location response (with lng).
  • lng point mode longitude -180 to 180.
  • city point mode city id from /cities — alternative to lat & lng.
بازکردن مثال زنده ↗

نمونه کد

curl

curl "https://theshia.org/api/v1/moon-visibility?hy=1448&hm=2"

JavaScript

const res = await fetch("https://theshia.org/api/v1/moon-visibility?hy=1448&hm=2");
const data = await res.json();

Python

import requests

data = requests.get("https://theshia.org/api/v1/moon-visibility?hy=1448&hm=2").json()

محدودیت‌ها و استفادهٔ منصفانه

پاسخ‌ها به‌شدت در لبه کش می‌شوند — لطفاً شما هم کش کنید. درخواست‌های بدون کش به ۱۰۰ در دقیقه به‌ازای هر IP محدودند؛ درخواست‌های بیش از ۴۹۶ محاسبهٔ روز×روش رد می‌شوند. برای استفادهٔ اجتماعی رایگان است، بدون تضمین دسترس‌پذیری.