Giter VIP home page Giter VIP logo

quran-api's Introduction

Quran - API

Quran API with media audio Syekh. Mishary Rashid Al-Afasy murrotal.

Deployment

This API has lived at: https://api.quran.gading.dev

Terms of using Live API that hosted in https://api.quran.gading.dev

FYI, this Live API already has a rate limiter of 10req/5min/address and 150req/5min for the whole server. So, you can't rely on this Live API for continuous use. But, you can cache the API result into local/client storage, and your app doesn't need to request the API frequently.

On the other side, it's highly recommended to deploy this API with yourself, just click the Deploy button below, or clone this repository and deploy it wherever cloud/server you want.

Deploy your own!

Deploy with Vercel Deploy

What is the reason behind I limit the incoming requests in this Live API?

Yeah, of course I'm glad that this API is known and used by many people. But unfortunately, Vercel Team noticed that my Personal Account has reached its limit. So, that the reason is.


Introduction

This API data source comes from the combination of several parameters from api.alquran.cloud and quran.kemenag.go.id by merging its data to one JSON file with new structure for the better use and performance. Futhermore, this api uses indexed querying techniques with 0(1) access time which is greatly affects performance.

Features

  • Arabic Transliteration
  • English and Indonesia translation
  • Verses meta (juz, sajda, manzil, etc)
  • Tafsir surahs and verses (for now, only Bahasa Indonesia)
  • Audio (Syekh. Mishary Rashid Al-Afasy murrotal edition)
  • Your requests ?

Data Source

  • api.alquran.cloud = Quran, Meta Verses, Audio.
  • quran.kemenag.go.id = Indonesia translations and tafsir verses (short/long).
  • Al-Quran-ID-API = Indonesia tafsir surah [note: ambiguous revelation type on surah 13 and 55 in this source. So, I changed it to medinan (according to sahih international data)]

Endpoint usage

  • /surah = Returns the list of surahs in Al-Quran.
  • /surah/{surah} = Returns spesific surah. Example: /surah/110
  • /surah/{surah}/{ayah} = Returns spesific ayah with requested surah. Example: /surah/2/255
  • /juz/{juz} = Returns spesific juz with all ayah.Example: /juz/2

Recommended fonts for Al-qur'an

Available Commands

  • npm start = run server.
  • npm run dev = run develop server.
  • npm run crawl = collect new data from the data source, then unifying it in one JSON file.

Performance Measurement & Comparison

Fetching on Surah 7 with audio, en translation & transliteration, id translation . Result: 1200++ ms

api.alquran.cloud

Fetching on Surah 7 with audio, en translation & transliteration, id translation & tafsir (a lot more data and hosted on free serverless). Result: 400++ ms

api.quran.gading.dev

LICENSE

MIT

Support Me

Global

ko-fi

Indonesia


Copyright © 2020 by Sutan Gading Fadhillah Nasution

quran-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quran-api's Issues

Error atribut sajda

atribut sajda tidak konsisten ada yang boolean ada yang object, sehingga saat mau mencoba menampilkan data nya jadi error memiliki 2 type data.
image
image

Req fitur audio surah

Mau request fitur audio surah bukan setiap ayah tetapi setiap surah ada satu audio yang mempunyai semua ayah

Audio Error

Kenapa pas pengen download semua audio surat, jadi error

Screenshot 2021-07-14 at 12 33 16 AM

request fitur API ayat harian

jadi seolah olah setiap user request menampilkan 1 ayat yang berbeda - beda (sebagai penguat hati yang bersifat harian)

Suggestion

Hai, jika kamu bisa. Saya ingin kamu untuk membuat waktu sholat indonesia dan malaysia karena saya tidak dapat menemukan api yang akurat atau jika kamu memiliki api untuk waktu sholat akan mudah dan saya sangat menghargai jika Anda mengirimkan saya tautan

Request 😊

halo mas, mau request ditambahkan transliterasi yang bahasa indo bisa? soalnya transliterasinya cuma ada yang en (english) dan kalau dibaca pakai bahasa indo jadi aneh.
image

sama request ini mas, kalau bisa ada satu API yang mencakup keseluruhan Qur'an 😁🙏.
oh iya izin menggunakan api nya untuk membuat aplikasi quran untuk porto pribadi ya mas, terimakasih, sehat selalu.

return requested parameter(s) only (optional)

Feature Request


Example 1

i need the name.short and translation.en from endpoint /surah
API response:

{
  "code": 200,
  "status": "OK.",
  "message": "Success fetching all surah.",
  "data": [
    {
      "name": {
        "short": "الفاتحة",
        "translation": {
          "en": "The Opening",
        }
      },
    }
   ]
}

Example 2

i need all data except tafsir from endpoint /surah
API response:

{
  "code": 200,
  "status": "OK.",
  "message": "Success fetching all surah.",
  "data": [
    {
      "number": 1,
      "sequence": 5,
      "numberOfVerses": 7,
      "name": {
        "short": "الفاتحة",
        "long": "سُورَةُ ٱلْفَاتِحَةِ",
        "transliteration": {
          "en": "Al-Faatiha",
          "id": "Al-Fatihah"
        },
        "translation": {
          "en": "The Opening",
          "id": "Pembukaan"
        }
      },
      "revelation": {
        "arab": "مكة",
        "en": "Meccan",
        "id": "Makkiyyah"
      },
    }
  ]
}

and other endpoints

Why

  • reduce bandwidth & data usage
  • reduce server processing time (also server response time) (maybe?)

Add option to disable rate limit

Everything was working fine before, but after some recent commits (feat/mongo-rate-limiter) an error occurred

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED

[GET] /
11:32:29:67
2022-06-11T04:32:31.186Z	undefined	ERROR	Error: collection or collectionName and uri should be set
    at new MongoStore (/var/task/node_modules/rate-limit-mongo/lib/mongoStore.js:28:9)
    at Object.<anonymous> (/var/task/api/server.js:29:12)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:192:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async getListener (/var/task/___vc/__launcher.js:37:11)
RequestId: c53c5a9b-29c3-4259-a563-f78fb6e***** Error: Runtime exited with error: exit status 1
Runtime.ExitError

The error turned out to be from the rate-limit feature, because I deploy it on my own instance I don't think I need this rate-limit feature. It would be great if there was an option for disable this rate limit. maybe from Environment Variables?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.