Açık Kuran API

repository·main·Indexed 41 days ago

https://github.com/acik-kuran/acikkuran-api

An open-source, non-profit API built with Fastify version 1.0.0 providing ad-free access to Qur'an data. It features endpoints for retrieving surahs, verses, authors, and Arabic root linguistic details, with support for PostgreSQL and Redis caching.

Tokens
2.1K
Snippets
16
Records
17
Agent score
49%

What's inside Açık Kuran API

  1. Install the Açık Kuran API

    main

    To set up the Açık Kuran API locally, clone the repository, configure your environment variables from the provided example, and install the dependencies using npm.

    # 1. Clone the repository
    git clone https://github.com/ziegfiroyt/acikkuran-api
    
    # 2. Configure environment variables
    cd acikkuran-api
    cp .env.example .env
    
    # 3. Install dependencies
    npm install
  2. Get surah details and verses

    main

    Retrieve the full details of a specific surah, including its metadata and a list of all its verses.

    Parameters:

    • surah_id (path): The unique identifier of the surah.
    • author (query, optional): The author_id to select a specific translation for the verses.

    If no author is provided, the API returns the default translation.

    GET `https://api.acikkuran.com/surah/[surah_id]?author=[author_id]`
  3. Get root details by Latin characters

    main

    Retrieve detailed information about a specific Arabic root using its Latin representation. The response includes the Arabic spelling, transcription, meanings (in Turkish and English), and a list of diffs (differentiation forms of the root found in the text).

    GET `https://api.acikkuran.com/root/latin/[latin_chars]`
  4. List all surahs

    main

    Retrieve a list of all surahs (chapters) in the Quran. The response includes metadata such as id, name (in Turkish and English), slug, verse_count, page_number, and name_original. It also provides links to audio files (mp3 and mp3_en) and their durations.

    GET `https://api.acikkuran.com/surahs`
  5. Get specific verse details

    main

    Retrieve detailed information for a single verse within a surah. The response includes the Arabic text, simplified Arabic, transcription (Latin and English), and the translation for the specified author.

    Parameters:

    • surah_id (path): The unique identifier of the surah.
    • verse_number (path): The number of the verse.
    • author (query, optional): The author_id to select a specific translation.

    Note: The response includes verse_without_vowel and juz_number.

    GET `https://api.acikkuran.com/surah/[surah_id]/verse/[verse_number]?author=[author_id]`
  6. Get verse parts with linguistic details

    main

    Retrieve the breakdown of a verse into its constituent parts (verseparts). This is the recommended endpoint for word-level analysis. Each part includes the Arabic text, transcription (TR/EN), translation (TR/EN), and root information.

    Note: The /words endpoint is deprecated; use this /verseparts endpoint instead.

    GET `https://api.acikkuran.com/surah/[surah_id]/verse/[verse_number]/verseparts`
  7. Get verses containing a specific root

    main

    Retrieve a paginated list of verses that contain a specific root, searchable by the root's Latin characters.

    Parameters:

    • latin_char (path): The Latin representation of the root.
    • page (query, optional): The page number for pagination.
    • author (query, optional): The author_id for the translation.

    Note: The /verses endpoint is deprecated; use the /verseparts endpoint instead for better structural data.

    GET `https://api.acikkuran.com/root/latin/[latin_char]/verseparts?page=[page_number]&author=[author_id]`
  8. Get verses by page number

    main

    Retrieve all verses located on a specific page of the Quran.

    Parameters:

    • page_number (path): The page number.
    • author_id (query, optional): The author_id to select a specific translation.

    Note: The query parameter name is author_id for this endpoint.

    GET `https://api.acikkuran.com/page/[page_number]?author_id=[author_id]`