{
  "openapi": "3.0.3",
  "info": {
    "title": "UmmahAPI",
    "description": "Free Islamic REST API. Quran, Hadith, Tafsir, Prayer Times, Qibla, Hijri calendar, Duas, 99 Names, and more. No API key required.",
    "version": "2.0.0",
    "contact": {
      "name": "UmmahAPI",
      "url": "https://ummahapi.com"
    },
    "license": {
      "name": "Free to use (sadaqah jariah)",
      "url": "https://ummahapi.com"
    }
  },
  "externalDocs": {
    "description": "Full documentation",
    "url": "https://ummahapi.com/api/docs"
  },
  "servers": [
    {
      "url": "https://ummahapi.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Quran",
      "description": "Complete Quran with Uthmani and IndoPak scripts, tajweed markings, transliteration, 12 translations, audio from 13 reciters, mushaf pages, and search."
    },
    {
      "name": "Word-by-Word",
      "description": "Per-word Arabic text, transliteration, and English meaning for every word in the Quran."
    },
    {
      "name": "Mutashabihat",
      "description": "Similar/resembling verses in the Quran. 1,200+ verses with 2,300+ pairs across 81 surahs. Helps huffaz identify commonly confused verses."
    },
    {
      "name": "Tafsir",
      "description": "Scholarly Quranic commentary. Ibn Kathir and Ma'arif al-Qur'an in English, Muyassar and Ibn Kathir in Arabic."
    },
    {
      "name": "Hadith",
      "description": "36,000+ hadiths from 10 collections: Bukhari, Muslim, Abu Dawud, Tirmidhi, Ibn Majah, Nasai, Malik, Nawawi's 40, 40 Hadith Qudsi, and Shah Waliullah's 40."
    },
    {
      "name": "Prayer Times",
      "description": "Accurate prayer times for any location. 23 calculation methods (with short aliases), madhab support, high-latitude rules, monthly timetable, and Ramadan schedule."
    },
    {
      "name": "Qibla Direction",
      "description": "Precise compass bearing to the Kaaba using spherical trigonometry. Distance in km included."
    },
    {
      "name": "Islamic Calendar",
      "description": "Gregorian/Hijri conversion, today's Islamic date, month names, and major events."
    },
    {
      "name": "Duas",
      "description": "127 duas from Quran and Sunnah across 27 categories."
    },
    {
      "name": "99 Names of Allah",
      "description": "Asma ul Husna with Arabic, transliteration, meanings, search, and daily recitation groups."
    },
    {
      "name": "Islamic Names",
      "description": "210 curated Islamic names with Arabic script, transliteration, meanings, origins, and root letters. Filter by gender, search by meaning."
    },
    {
      "name": "Zakat Calculator",
      "description": "Calculate obligatory Zakat (2.5%) on zakatable wealth. Live gold and silver prices are filled in automatically, so you do not have to supply them. Supports cash, gold, silver, stocks, business goods, investments, and liabilities. Agricultural Zakat (Ushr) also supported."
    },
    {
      "name": "Moon Sighting",
      "description": "Current Hijri date, moon phase, crescent visibility, upcoming new moons, and Gregorian ↔ Hijri date conversion using the Umm al-Qura calendar."
    },
    {
      "name": "API Key & Usage",
      "description": "Optional API key for 5x higher rate limits. All endpoints work without a key."
    }
  ],
  "paths": {
    "/api/quran": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Quran API overview",
        "description": "Get information about available translations, reciters, and statistics.",
        "operationId": "getApiQuran",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/surahs": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "List all 114 surahs",
        "description": "Get metadata for all surahs including name, verse count, revelation place, and audio.",
        "operationId": "getApiQuranSurahs",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/surah/{number}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Get full surah",
        "description": "Get a complete surah with Arabic text, transliteration, translations, and audio for every verse.",
        "operationId": "getApiQuranSurahNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "36"
            }
          },
          {
            "name": "script",
            "in": "query",
            "required": false,
            "description": "Arabic script: uthmani (default), indopak, tajweed (Uthmani text with <tajweed class=...> rule tags for coloring), or all (returns an object with all three). Unknown values are ignored and reported in a warnings array",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "translation",
            "in": "query",
            "required": false,
            "description": "Specific translation: sahih_international, pickthall, yusuf_ali, urdu, turkish, indonesian, french, german, bengali, spanish, malay, bosnian. Unknown values are ignored and reported in a warnings array",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reciter",
            "in": "query",
            "required": false,
            "description": "Reciter ID (use /api/quran/reciters for list). Unknown IDs are ignored and reported in a warnings array",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/surah/{surah}/ayah/{ayah}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Get specific ayah",
        "description": "Get a single verse with Arabic, transliteration, all translations, and audio from all reciters.",
        "operationId": "getApiQuranSurahSurahAyahAyah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "2"
            }
          },
          {
            "name": "ayah",
            "in": "path",
            "required": true,
            "description": "Ayah number",
            "schema": {
              "type": "integer",
              "example": "255"
            }
          },
          {
            "name": "script",
            "in": "query",
            "required": false,
            "description": "Arabic script: uthmani (default), indopak, tajweed (with <tajweed class=...> rule tags), or all. Unknown values are ignored and reported in a warnings array",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/random": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Random ayah",
        "description": "Get a random verse from the Quran. Great for daily verse widgets.",
        "operationId": "getApiQuranRandom",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/search": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Search the Quran",
        "description": "Search across translations and transliterations for matching verses.",
        "operationId": "getApiQuranSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search term",
            "schema": {
              "type": "string",
              "example": "mercy"
            }
          },
          {
            "name": "translation",
            "in": "query",
            "required": false,
            "description": "Translation to search: any key listed on /api/quran, or all (default: sahih_international). Unknown values are ignored and reported in a warnings array",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results 1–50 (default: 25). Values outside the range are clamped",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/juz/{number}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Get a juz",
        "description": "Get all verses in a juz (1–30). Used for daily reading plans.",
        "operationId": "getApiQuranJuzNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Juz number (1–30)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/page/{number}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Mushaf page (word-level)",
        "description": "Word-by-word data for a Madina Mushaf page (1–604). Includes Uthmani text, tajweed markup (text_uthmani_tajweed with <rule class=...> tags), line numbers (1–15), and verse references. Ideal for Quran reader apps.",
        "operationId": "getApiQuranPageNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Page number (1–604)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/reciters": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "List reciters",
        "description": "Get available Quran reciters with their IDs for audio endpoints.",
        "operationId": "getApiQuranReciters",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/audio/{surah}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Surah audio",
        "description": "Get audio recitation URLs for a full surah. Optionally specify a reciter for ayah-by-ayah breakdown.",
        "operationId": "getApiQuranAudioSurah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "36"
            }
          },
          {
            "name": "reciter",
            "in": "query",
            "required": false,
            "description": "Reciter ID for per-ayah audio",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/audio/{surah}/{ayah}": {
      "get": {
        "tags": [
          "Quran"
        ],
        "summary": "Ayah audio",
        "description": "Get audio recitation URLs for a specific ayah from all reciters.",
        "operationId": "getApiQuranAudioSurahAyah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number",
            "schema": {
              "type": "integer",
              "example": "2"
            }
          },
          {
            "name": "ayah",
            "in": "path",
            "required": true,
            "description": "Ayah number",
            "schema": {
              "type": "integer",
              "example": "255"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/words/{surah}/{ayah}": {
      "get": {
        "tags": [
          "Word-by-Word"
        ],
        "summary": "Words for a verse",
        "description": "Get every word of a specific verse with Arabic, transliteration, and English meaning.",
        "operationId": "getApiQuranWordsSurahAyah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          },
          {
            "name": "ayah",
            "in": "path",
            "required": true,
            "description": "Ayah number",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/words/{surah}": {
      "get": {
        "tags": [
          "Word-by-Word"
        ],
        "summary": "Words for a surah",
        "description": "Get word-by-word breakdown for all verses of a surah.",
        "operationId": "getApiQuranWordsSurah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/mutashabihat": {
      "get": {
        "tags": [
          "Mutashabihat"
        ],
        "summary": "Mutashabihat overview",
        "description": "Get info about the mutashabihat (similar verses) dataset. 1,200+ verses with 2,300+ similar-verse pairs across 81 surahs. Useful for huffaz to identify commonly confused verses.",
        "operationId": "getApiQuranMutashabihat",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/mutashabihat/random": {
      "get": {
        "tags": [
          "Mutashabihat"
        ],
        "summary": "Random similar pair",
        "description": "Get a random verse that has similar verses, along with all its similar verses. Great for study/quiz apps.",
        "operationId": "getApiQuranMutashabihatRandom",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/mutashabihat/{surah}": {
      "get": {
        "tags": [
          "Mutashabihat"
        ],
        "summary": "Similar verses in surah",
        "description": "Get all verses in a surah that have known similar verses elsewhere in the Quran. Paginated.",
        "operationId": "getApiQuranMutashabihatSurah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "2"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (default: 1)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default: 20, max: 50)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/quran/mutashabihat/{surah}/{ayah}": {
      "get": {
        "tags": [
          "Mutashabihat"
        ],
        "summary": "Similar verses for ayah",
        "description": "Get all verses similar to a specific ayah. Returns Arabic text and English translation for both the source and similar verses. Returns 404 if no similar verses are known.",
        "operationId": "getApiQuranMutashabihatSurahAyah",
        "parameters": [
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "2"
            }
          },
          {
            "name": "ayah",
            "in": "path",
            "required": true,
            "description": "Ayah number",
            "schema": {
              "type": "integer",
              "example": "2"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/tafsir": {
      "get": {
        "tags": [
          "Tafsir"
        ],
        "summary": "Available tafasir",
        "description": "List all available tafsir sources with keys, names, languages, and authors.",
        "operationId": "getApiTafsir",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/tafsir/{tafsir}/surah/{surah}/ayah/{ayah}": {
      "get": {
        "tags": [
          "Tafsir"
        ],
        "summary": "Tafsir for an ayah",
        "description": "Get tafsir commentary for a specific verse. Use \"all\" as tafsir key to get all tafasir at once.",
        "operationId": "getApiTafsirTafsirSurahSurahAyahAyah",
        "parameters": [
          {
            "name": "tafsir",
            "in": "path",
            "required": true,
            "description": "Tafsir key: ibn_kathir, maarif, muyassar, ibn_kathir_ar, or \"all\"",
            "schema": {
              "type": "string",
              "example": "ibn_kathir"
            }
          },
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          },
          {
            "name": "ayah",
            "in": "path",
            "required": true,
            "description": "Ayah number",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/tafsir/{tafsir}/surah/{surah}": {
      "get": {
        "tags": [
          "Tafsir"
        ],
        "summary": "Tafsir for a surah",
        "description": "Get tafsir commentary for all ayahs in a surah.",
        "operationId": "getApiTafsirTafsirSurahSurah",
        "parameters": [
          {
            "name": "tafsir",
            "in": "path",
            "required": true,
            "description": "Tafsir key: ibn_kathir, maarif, muyassar, ibn_kathir_ar, or \"all\"",
            "schema": {
              "type": "string",
              "example": "ibn_kathir"
            }
          },
          {
            "name": "surah",
            "in": "path",
            "required": true,
            "description": "Surah number (1–114)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hadith/collections": {
      "get": {
        "tags": [
          "Hadith"
        ],
        "summary": "List collections",
        "description": "Get all available hadith collections with names and hadith counts.",
        "operationId": "getApiHadithCollections",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hadith/random": {
      "get": {
        "tags": [
          "Hadith"
        ],
        "summary": "Random hadith",
        "description": "Get a random hadith. Optionally filter by collection.",
        "operationId": "getApiHadithRandom",
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "description": "Collection key: bukhari, muslim, abudawud, tirmidhi, ibnmajah, nasai, malik, nawawi, qudsi, dehlawi. Unknown keys return 404",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hadith/search": {
      "get": {
        "tags": [
          "Hadith"
        ],
        "summary": "Search hadiths",
        "description": "Search English hadith text across all or a specific collection.",
        "operationId": "getApiHadithSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search term",
            "schema": {
              "type": "string",
              "example": "intention"
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "description": "Limit search to a collection: bukhari, muslim, abudawud, tirmidhi, ibnmajah, nasai, malik, nawawi, qudsi, dehlawi. Unknown keys return 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results 1–100 (default: 25)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hadith/{collection}": {
      "get": {
        "tags": [
          "Hadith"
        ],
        "summary": "Browse collection",
        "description": "Paginated browse of a hadith collection.",
        "operationId": "getApiHadithCollection",
        "parameters": [
          {
            "name": "collection",
            "in": "path",
            "required": true,
            "description": "Collection: bukhari, muslim, abudawud, tirmidhi, ibnmajah, nasai, malik, nawawi, qudsi, dehlawi",
            "schema": {
              "type": "string",
              "example": "bukhari"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (default: 1)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Hadiths per page (default: 50)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hadith/{collection}/{number}": {
      "get": {
        "tags": [
          "Hadith"
        ],
        "summary": "Specific hadith",
        "description": "Get a specific hadith by its number within a collection.",
        "operationId": "getApiHadithCollectionNumber",
        "parameters": [
          {
            "name": "collection",
            "in": "path",
            "required": true,
            "description": "Collection key",
            "schema": {
              "type": "string",
              "example": "bukhari"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Hadith number. Some collections use decimal numbers (e.g. tirmidhi 2787.2). Arabic or english is null when the source has no text in that language",
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/prayer-times": {
      "get": {
        "tags": [
          "Prayer Times"
        ],
        "summary": "Get prayer times",
        "description": "Calculate Fajr, Dhuhr, Asr, Maghrib, and Isha for any location with timezone support. Returns both HH:MM format (prayer_times) and full ISO 8601 timestamps (prayer_datetimes).",
        "operationId": "getApiPrayerTimes",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude (-90 to 90)",
            "schema": {
              "type": "number",
              "example": "40.7128"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "description": "Longitude (-180 to 180)",
            "schema": {
              "type": "number",
              "example": "-74.006"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date as YYYY-MM-DD (default: today)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "description": "Calculation method or alias (e.g. MWL, Egypt, Makkah). Default: MuslimWorldLeague. Full list: /api/prayer-times/methods",
            "schema": {
              "type": "string",
              "enum": [
                "MuslimWorldLeague",
                "Egyptian",
                "Karachi",
                "UmmAlQura",
                "Dubai",
                "MoonsightingCommittee",
                "NorthAmerica",
                "ISNA",
                "Kuwait",
                "Qatar",
                "Singapore",
                "Turkey",
                "Diyanet",
                "Tehran",
                "JAKIM",
                "UOIF",
                "Gulf",
                "Algeria",
                "Tunisia",
                "Morocco",
                "Jordan",
                "Palestine",
                "Jafari"
              ]
            }
          },
          {
            "name": "madhab",
            "in": "query",
            "required": false,
            "description": "Hanafi (later Asr) or Shafi (earlier Asr)",
            "schema": {
              "type": "string",
              "enum": [
                "Hanafi",
                "Shafi"
              ]
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone (e.g. America/New_York)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "highLatitudeRule",
            "in": "query",
            "required": false,
            "description": "Twilight rule for far-north/south locations (above ~48°). Pass recommended for usable summer Fajr/Isha. Default keeps standard calculation.",
            "schema": {
              "type": "string",
              "enum": [
                "recommended",
                "MiddleOfNight",
                "SeventhOfNight",
                "TwilightAngle"
              ]
            }
          },
          {
            "name": "nearest_city",
            "in": "query",
            "required": false,
            "description": "Pass true to add location.city: the town the coordinates are in (name, country_code, distance_km), or null if none is within 25 km. Town data from GeoNames (CC BY 4.0).",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/prayer-methods": {
      "get": {
        "tags": [
          "Prayer Times"
        ],
        "summary": "Calculation methods",
        "description": "List all available prayer time calculation methods with descriptions.",
        "operationId": "getApiPrayerMethods",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/prayer-times/methods": {
      "get": {
        "tags": [
          "Prayer Times"
        ],
        "summary": "Methods & aliases",
        "description": "Discover every calculation method, its accepted short aliases (MWL, Egypt, Makkah, Shia...), the madhabs, and the high-latitude rule options. Use this to avoid guessing method names.",
        "operationId": "getApiPrayerTimesMethods",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/prayer-times/month": {
      "get": {
        "tags": [
          "Prayer Times"
        ],
        "summary": "Monthly timetable",
        "description": "Get prayer times for every day of a month. Great for caching in mobile apps.",
        "operationId": "getApiPrayerTimesMonth",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude",
            "schema": {
              "type": "number",
              "example": "40.7128"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "description": "Longitude",
            "schema": {
              "type": "number",
              "example": "-74.006"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "description": "Month 1–12 (default: current)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Year (default: current)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "description": "Calculation method",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "madhab",
            "in": "query",
            "required": false,
            "description": "Hanafi or Shafi",
            "schema": {
              "type": "string",
              "enum": [
                "Hanafi",
                "Shafi"
              ]
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "highLatitudeRule",
            "in": "query",
            "required": false,
            "description": "Twilight rule for high latitudes (recommended for usable summer times)",
            "schema": {
              "type": "string",
              "enum": [
                "recommended",
                "MiddleOfNight",
                "SeventhOfNight",
                "TwilightAngle"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/ramadan/{year}": {
      "get": {
        "tags": [
          "Prayer Times"
        ],
        "summary": "Ramadan timetable",
        "description": "Full Ramadan timetable with Suhoor (Fajr) and Iftar (Maghrib) for every day (29 or 30), plus thirds of Ramadan. Uses the Umm al-Qura calendar. Some years (e.g. 2030) contain two Ramadans; ramadans_in_year lists them and hijri_year picks one.",
        "operationId": "getApiRamadanYear",
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "description": "Gregorian year, 1938 to 2077 (the range the Umm al-Qura calendar covers)",
            "schema": {
              "type": "integer",
              "example": "2026"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude",
            "schema": {
              "type": "number",
              "example": "24.86"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "description": "Longitude",
            "schema": {
              "type": "number",
              "example": "67.00"
            }
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "description": "Calculation method",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "madhab",
            "in": "query",
            "required": false,
            "description": "Hanafi or Shafi",
            "schema": {
              "type": "string",
              "enum": [
                "Hanafi",
                "Shafi"
              ]
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "highLatitudeRule",
            "in": "query",
            "required": false,
            "description": "Twilight rule for high latitudes (recommended for usable summer times)",
            "schema": {
              "type": "string",
              "enum": [
                "recommended",
                "MiddleOfNight",
                "SeventhOfNight",
                "TwilightAngle"
              ]
            }
          },
          {
            "name": "hijri_year",
            "in": "query",
            "required": false,
            "description": "Pick a specific Ramadan when the year has two (e.g. 1452 for the December 2030 one). Default: the first",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/qibla": {
      "get": {
        "tags": [
          "Qibla Direction"
        ],
        "summary": "Calculate Qibla direction",
        "description": "Get the compass bearing and distance to the Kaaba from any coordinates.",
        "operationId": "getApiQibla",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude (-90 to 90)",
            "schema": {
              "type": "number",
              "example": "40.7128"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "description": "Longitude (-180 to 180)",
            "schema": {
              "type": "number",
              "example": "-74.006"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/hijri-date": {
      "get": {
        "tags": [
          "Islamic Calendar"
        ],
        "summary": "Gregorian to Hijri",
        "description": "Convert a Gregorian date to Hijri calendar date (Umm al-Qura). Supported range: 1937-03-14 to 2077-11-16. The response includes days_in_month for the Hijri month.",
        "operationId": "getApiHijriDate",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date as YYYY-MM-DD (default: today in UTC, or in timezone if given)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone (e.g. America/New_York) used to decide today's date when date is omitted. Default: UTC",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/gregorian-date": {
      "get": {
        "tags": [
          "Islamic Calendar"
        ],
        "summary": "Hijri to Gregorian",
        "description": "Convert a Hijri date to Gregorian calendar date (Umm al-Qura). Day 30 of a 29-day month returns 400.",
        "operationId": "getApiGregorianDate",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "Hijri year (1356–1500)",
            "schema": {
              "type": "integer",
              "example": "1447"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "description": "Hijri month (1–12)",
            "schema": {
              "type": "integer",
              "example": "3"
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": true,
            "description": "Hijri day (1–29 or 1–30, depending on the month)",
            "schema": {
              "type": "integer",
              "example": "15"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/today-hijri": {
      "get": {
        "tags": [
          "Islamic Calendar"
        ],
        "summary": "Today's Islamic date",
        "description": "Get the current date in the Islamic calendar. \"Today\" is the UTC date unless you pass timezone.",
        "operationId": "getApiTodayHijri",
        "parameters": [
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone (e.g. Asia/Karachi) for the local date. Default: UTC",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/islamic-months": {
      "get": {
        "tags": [
          "Islamic Calendar"
        ],
        "summary": "Islamic months",
        "description": "Get all 12 Islamic month names with significance.",
        "operationId": "getApiIslamicMonths",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/islamic-events": {
      "get": {
        "tags": [
          "Islamic Calendar"
        ],
        "summary": "Islamic events",
        "description": "Get major Islamic events and observances, with the next event after today.",
        "operationId": "getApiIslamicEvents",
        "parameters": [
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone used to decide today's date. Default: UTC",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "All duas",
        "description": "Get the complete collection of duas with Arabic, transliteration, translation, and sources.",
        "operationId": "getApiDuas",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas/categories": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "Dua categories",
        "description": "List all categories (morning, evening, travel, prayer, etc.) with counts.",
        "operationId": "getApiDuasCategories",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas/random": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "Random dua",
        "description": "Get a random supplication. Great for daily widgets.",
        "operationId": "getApiDuasRandom",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas/search": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "Search duas",
        "description": "Search duas by title, translation, transliteration, or category.",
        "operationId": "getApiDuasSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search term",
            "schema": {
              "type": "string",
              "example": "morning"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas/category/{category}": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "Duas by category",
        "description": "Get all duas in a specific category.",
        "operationId": "getApiDuasCategoryCategory",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "description": "Category ID (use /api/duas/categories for list)",
            "schema": {
              "type": "string",
              "example": "morning"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/duas/{id}": {
      "get": {
        "tags": [
          "Duas"
        ],
        "summary": "Specific dua",
        "description": "Get a specific dua by its ID number.",
        "operationId": "getApiDuasId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dua ID",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/asma-ul-husna": {
      "get": {
        "tags": [
          "99 Names of Allah"
        ],
        "summary": "All 99 names",
        "description": "Get all 99 beautiful names of Allah with Arabic, transliteration, and meanings.",
        "operationId": "getApiAsmaUlHusna",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/asma-ul-husna/{number}": {
      "get": {
        "tags": [
          "99 Names of Allah"
        ],
        "summary": "Specific name",
        "description": "Get a specific name by its number (1–99).",
        "operationId": "getApiAsmaUlHusnaNumber",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "Name number (1–99)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/asma-ul-husna/random": {
      "get": {
        "tags": [
          "99 Names of Allah"
        ],
        "summary": "Random name",
        "description": "Get a random name for daily reflection.",
        "operationId": "getApiAsmaUlHusnaRandom",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/asma-ul-husna/search": {
      "get": {
        "tags": [
          "99 Names of Allah"
        ],
        "summary": "Search names",
        "description": "Search names by meaning or transliteration.",
        "operationId": "getApiAsmaUlHusnaSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search term",
            "schema": {
              "type": "string",
              "example": "merciful"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/asma-ul-husna/daily/{day}": {
      "get": {
        "tags": [
          "99 Names of Allah"
        ],
        "summary": "Daily recitation",
        "description": "Get names recommended for a specific day of the week.",
        "operationId": "getApiAsmaUlHusnaDailyDay",
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "description": "Day of week (1=Monday … 7=Sunday)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/names": {
      "get": {
        "tags": [
          "Islamic Names"
        ],
        "summary": "List Islamic names",
        "description": "Get a paginated list of Islamic names. Filter by gender (male/female) or origin.",
        "operationId": "getApiNames",
        "parameters": [
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "description": "Filter by gender: male or female",
            "schema": {
              "type": "string",
              "enum": [
                "male",
                "female"
              ]
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Filter by origin (e.g. Arabic, Persian)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (default: 1)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (default: 100, max: 210)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/names/search": {
      "get": {
        "tags": [
          "Islamic Names"
        ],
        "summary": "Search names",
        "description": "Search Islamic names by name, Arabic text, meaning, or notes.",
        "operationId": "getApiNamesSearch",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search term (e.g. \"light\", \"mercy\", \"نور\")",
            "schema": {
              "type": "string",
              "example": "light"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results (default: 25, max: 50)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/names/random": {
      "get": {
        "tags": [
          "Islamic Names"
        ],
        "summary": "Random name",
        "description": "Get a random Islamic name. Optionally filter by gender.",
        "operationId": "getApiNamesRandom",
        "parameters": [
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "description": "Filter by gender: male or female",
            "schema": {
              "type": "string",
              "enum": [
                "male",
                "female"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/names/{id}": {
      "get": {
        "tags": [
          "Islamic Names"
        ],
        "summary": "Name by ID",
        "description": "Get a specific Islamic name by its ID (1–210).",
        "operationId": "getApiNamesId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Name ID (1–210)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/zakat/info": {
      "get": {
        "tags": [
          "Zakat Calculator"
        ],
        "summary": "Zakat educational guide",
        "description": "Get comprehensive educational information about Zakat: definition, conditions, eligible recipients, zakatable assets, hawl, and the four schools of thought.",
        "operationId": "getApiZakatInfo",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/zakat/prices": {
      "get": {
        "tags": [
          "Zakat Calculator"
        ],
        "summary": "Live gold & silver prices",
        "description": "Get the current gold and silver spot price per gram, plus the gold and silver nisab values. Prices refresh from live market data every hour and are shared from a central cache. Add a currency for local values.",
        "operationId": "getApiZakatPrices",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "ISO currency code for the prices (USD, GBP, EUR, PKR, SAR, INR, ...)",
            "schema": {
              "type": "string",
              "example": "USD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/zakat/nisab": {
      "get": {
        "tags": [
          "Zakat Calculator"
        ],
        "summary": "Current nisab thresholds",
        "description": "Get the gold and silver nisab thresholds and their monetary value. Live prices are filled in automatically. Pass your own prices to override, or a currency for local values. prices_used shows which price came from you and which was live. Negative or non-numeric prices return 400.",
        "operationId": "getApiZakatNisab",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "ISO currency code for auto-filled prices (USD, GBP, PKR, ...)",
            "schema": {
              "type": "string",
              "example": "USD"
            }
          },
          {
            "name": "gold_price_per_gram",
            "in": "query",
            "required": false,
            "description": "Optional. Overrides the auto-filled gold price per gram",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "silver_price_per_gram",
            "in": "query",
            "required": false,
            "description": "Optional. Overrides the auto-filled silver price per gram",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/zakat/calculate": {
      "post": {
        "tags": [
          "Zakat Calculator"
        ],
        "summary": "Calculate Zakat on wealth",
        "description": "Calculate Zakat due on total zakatable wealth. Live gold and silver prices are filled in automatically when you do not provide them. Deducts liabilities before computing. All amounts must be non-negative numbers (plain digits, no commas); anything else returns 400. If you supply only one price and the calculation also needs the other one, pass currency so the live price matches yours; without it the live price is in USD and the response includes a warnings array. prices_used shows the prices actually used.",
        "operationId": "postApiZakatCalculate",
        "parameters": [
          {
            "name": "cash",
            "in": "body",
            "required": false,
            "description": "Cash and bank savings (monetary value)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "currency",
            "in": "body",
            "required": false,
            "description": "ISO currency code of your amounts and prices; auto-filled prices use it (USD, GBP, PKR, ...)",
            "schema": {
              "type": "string",
              "example": "USD"
            }
          },
          {
            "name": "gold_grams",
            "in": "body",
            "required": false,
            "description": "Gold owned in grams",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "silver_grams",
            "in": "body",
            "required": false,
            "description": "Silver owned in grams",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "gold_price_per_gram",
            "in": "body",
            "required": false,
            "description": "Optional. Overrides the auto-filled live gold price per gram",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "silver_price_per_gram",
            "in": "body",
            "required": false,
            "description": "Optional. Overrides the auto-filled live silver price per gram",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "nisab_standard",
            "in": "body",
            "required": false,
            "description": "Nisab standard: gold (default) or silver",
            "schema": {
              "type": "string",
              "enum": [
                "gold",
                "silver"
              ],
              "example": "gold"
            }
          },
          {
            "name": "stocks",
            "in": "body",
            "required": false,
            "description": "Monetary value of stocks/shares",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "business_goods",
            "in": "body",
            "required": false,
            "description": "Monetary value of business/trade inventory",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "other_investments",
            "in": "body",
            "required": false,
            "description": "Monetary value of other investments",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "liabilities",
            "in": "body",
            "required": false,
            "description": "Debts/liabilities to deduct from zakatable wealth",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/zakat/agriculture": {
      "post": {
        "tags": [
          "Zakat Calculator"
        ],
        "summary": "Agricultural Zakat (Ushr)",
        "description": "Calculate Ushr on agricultural produce. 10% for rain-fed crops, 5% for irrigated crops. No hawl required.",
        "operationId": "postApiZakatAgriculture",
        "parameters": [
          {
            "name": "value",
            "in": "body",
            "required": true,
            "description": "Monetary value of the agricultural produce (non-negative number)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "water_source",
            "in": "body",
            "required": false,
            "description": "Water source: rain (10%) or irrigation (5%)",
            "schema": {
              "type": "string",
              "enum": [
                "rain",
                "irrigation"
              ],
              "example": "rain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/moon": {
      "get": {
        "tags": [
          "Moon Sighting"
        ],
        "summary": "Current moon & Hijri date",
        "description": "Get the Hijri date with month name, month length and sacred month flag, plus moon age, phase (8 standard phases), illumination, crescent visibility, and the last and next new moon (UTC). Supported range: 1937-03-14 to 2077-11-16.",
        "operationId": "getApiMoon",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date as YYYY-MM-DD (moon computed at 12:00 UTC), or an ISO date-time such as 2026-10-08T20:30:00-05:00 (date as written, moon at that instant). Default: today in UTC, or in timezone if given",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone (e.g. Europe/London) used to decide today's date when date is omitted. Default: UTC",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/moon/phases": {
      "get": {
        "tags": [
          "Moon Sighting"
        ],
        "summary": "Upcoming new moons",
        "description": "Get upcoming astronomical new moon (conjunction) dates with expected crescent sighting dates and Hijri month context.",
        "operationId": "getApiMoonPhases",
        "parameters": [
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Number of new moons to return (default: 12, max: 24)",
            "schema": {
              "type": "integer",
              "example": "12"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/moon/months": {
      "get": {
        "tags": [
          "Moon Sighting"
        ],
        "summary": "Hijri months",
        "description": "Get all 12 Islamic months with Arabic names, sacred month flags, significance notes, and the real length (days) of each month in a Hijri year from the Umm al-Qura calendar.",
        "operationId": "getApiMoonMonths",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Hijri year (1356–1500). Default: the current Hijri year",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/moon/hijri": {
      "get": {
        "tags": [
          "Moon Sighting"
        ],
        "summary": "Gregorian to Hijri",
        "description": "Convert a Gregorian date to its Hijri equivalent using the Umm al-Qura calendar. Supported range: 1937-03-14 to 2077-11-16.",
        "operationId": "getApiMoonHijri",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "Gregorian year (1937–2077)",
            "schema": {
              "type": "integer",
              "example": "2026"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "description": "Month (1–12)",
            "schema": {
              "type": "integer",
              "example": "6"
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": true,
            "description": "Day (must exist in that month)",
            "schema": {
              "type": "integer",
              "example": "20"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/moon/gregorian": {
      "get": {
        "tags": [
          "Moon Sighting"
        ],
        "summary": "Hijri to Gregorian",
        "description": "Convert a Hijri date to its Gregorian equivalent. Day 30 of a 29-day month returns 400.",
        "operationId": "getApiMoonGregorian",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "Hijri year (1356–1500)",
            "schema": {
              "type": "integer",
              "example": "1447"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "description": "Hijri month (1–12)",
            "schema": {
              "type": "integer",
              "example": "9"
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": true,
            "description": "Hijri day (1–29 or 1–30, depending on the month)",
            "schema": {
              "type": "integer",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/usage": {
      "get": {
        "tags": [
          "API Key & Usage"
        ],
        "summary": "Usage dashboard",
        "description": "View your request counts by endpoint, daily breakdown, and account info.",
        "operationId": "getApiUsage",
        "parameters": [
          {
            "name": "apikey",
            "in": "query",
            "required": true,
            "description": "Your API key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "tags": [
          "API Key & Usage"
        ],
        "summary": "Health check",
        "description": "Check the health status of the API and all services.",
        "operationId": "getApiHealth",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/limits": {
      "get": {
        "tags": [
          "API Key & Usage"
        ],
        "summary": "Rate limit info",
        "description": "Get current rate limit tiers and policies.",
        "operationId": "getApiLimits",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing parameters"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    }
  }
}