Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 62.5 KB

File metadata and controls

74 lines (45 loc) · 62.5 KB
id quran-verses-by-script
title Get Quran verses in a specific script
description Stream the complete Quran text in the requested script. Use the structural filters to limit results to a chapter, juz, hizb, rub el hizb, manzil, ruku, or page.
sidebar_label Get Quran verses in a specific script
hide_title true
hide_table_of_contents true
api
tags description operationId parameters responses method path servers security securitySchemes info postman
Quran
Stream the complete Quran text in the requested script. Use the structural filters to limit results to a chapter, juz, hizb, rub el hizb, manzil, ruku, or page.
quran-verses-by-script
name in description required schema
script
path
Script identifier for the response payload. Supported values: `uthmani`, `uthmani_simple`, `uthmani_tajweed`, `indopak`, `indopak_nastaleeq`, `imlaei`, `imlaei_simple`, `qpc_hafs`, `qpc_nastaleeq`, `code_v1`, `code_v2`, `v1_image`.
true
type enum
string
uthmani
uthmani_simple
uthmani_tajweed
indopak
indopak_nastaleeq
imlaei
imlaei_simple
qpc_hafs
qpc_nastaleeq
code_v1
code_v2
v1_image
name in description schema
chapter_number
query
Filter verses to a specific surah.
maximum minimum type
114
1
integer
name in description schema
juz_number
query
Filter verses to a specific juz.
maximum minimum type
30
1
integer
name in description schema
page_number
query
Filter verses to a Madani Mushaf page.
maximum minimum type
604
1
integer
name in description schema
hizb_number
query
Filter verses to a specific hizb.
maximum minimum type
60
1
integer
name in description schema
rub_el_hizb_number
query
Filter verses to a specific rub el hizb.
maximum minimum type
240
1
integer
name in description schema
manzil_number
query
Filter verses to a specific manzil.
maximum minimum type
7
1
integer
name in description schema
ruku_number
query
Filter verses to a specific ruku.
maximum minimum type
558
1
integer
name in description schema
verse_key
query
Fetch a single ayah by its `chapter:verse` key.
type
string
name in description schema
page
query
Result page number (pagination).
type default
integer
1
name in description schema
per_page
query
Records per page (maximum 50).
maximum minimum type default
50
1
integer
10
200 400 401 403 404 422 429 500 502 503 504
description content
Successful response
application/json
schema example
type properties
object
verses pagination
type items
array
title required type properties example
Verse
hizb_number
id
juz_number
page_number
rub_number
verse_key
verse_number
object
id chapter_id verse_number verse_key verse_index text_uthmani text_uthmani_simple text_imlaei text_imlaei_simple text_indopak text_uthmani_tajweed juz_number hizb_number rub_number page_number ruku_number manzil_number image_url image_width words audio translations code_v1 code_v2 v1_page v2_page
type
integer
type description
integer
Chapter number of this verse
type
integer
type description
string
key of the verse, key is generated using chapter number and ayah number. e.g 1:1 is first ayah of first surah.
type
integer
type description
string
Ayah text in Uthmani Script. Uthmani script is an old-fashion script used by the third Caliph, Uthman, to produce the first standard quran manuscript.
type description
string
Uthmani script diacritic marks
type description
string
Ayah text in Imla'ei script. Imla'ei script, is the modern Arabic writing style which is currently in use.
type
string
type
string
type
string
type
integer
type
integer
type
integer
maximum minimum type description
604
1
integer
page_number is deprecated, please use `v1_page` instead.
type
integer
type
integer
type
string
type
integer
type items
array
title required type properties example
Word
audio_url
char_type_name
position
translation
transliteration
object
id position text_uthmani text_indopak text_imlaei verse_key page_number line_number audio_url location char_type_name code_v1 code_v2 translation transliteration v1_page v2_page
type
integer
type description
integer
Word position within ayah
type description
string
Word text in Uthmanic script
type
string
type description
string
Word text in simple/Imlaei script
type
string
maximum minimum type description
604
1
integer
page_number is deprecated, please use `v1_page` instead.
type description
integer
Line number in the Mushaf for this word
type
string
type
string
type
string
type description
string
glyph code that you can use to render the word using QCF v1 font.
type description
string
glyph code that you can use to render the word using QCF v2 font.
type properties
object
text language_name
type
string
type
string
type properties
object
text language_name
type
string
type
string
maximum minimum type description
604
1
integer
Madani Mushaf Page number for v1 font. If `v1_page` value is 2, that means you'll use page 2 font file to render this word using v1 glyph codes.
maximum minimum type description
604
1
integer
Madani Mushaf Page number for v2 font. If `v2_page` value is 2, that means you'll use page 2 font file to render this ayah using v2 glyph codes.
id position text_uthmani text_indopak text_imlaei verse_key page_number line_number audio_url location char_type_name code_v1 translation transliteration
1
1
بِسْمِ
بِسۡمِ
بِسْمِ
1:1
1
2
wbw/001_001_001.mp3
1:1:1
word
ﭑ
text language_name
In (the) name
english
text language_name
bis'mi
english
title type properties example required
AudioFile
object
verse_key url
type
string
type
string
verse_key
url
type items
array
title required type properties example
Translation
resource_id
text
object
resource_id resource_name id text verse_id language_id language_name verse_key chapter_id verse_number juz_number hizb_number rub_number page_number
type
integer
type
string
type
integer
type description
string
Text of the translation, text could have HTML tags for formatting and footnotes.
type
integer
type
integer
type
string
type
string
type
integer
type
integer
type
integer
type
integer
type
integer
type
integer
resource_id resource_name id text verse_id language_id language_name verse_key chapter_id verse_number juz_number hizb_number rub_el_hizb_number page_number ruku_number manzil_number slug
131
Dr. Mustafa Khattab, the Clear Quran
903958
In the Name of Allah—the Most Compassionate, Most Merciful.
1
38
english
1:1
1
1
1
1
1
1
1
1
tafsir-ibn-kathir
type description
string
Glyphs codes for QCF v1 fonts
type description
string
Glyphs codes for QCF v2 fonts
maximum minimum type description
604
1
integer
Madani Mushaf Page number for v1 font. If `v1_page` value is 2, that means you'll use page 2 font file to render this ayah using v1 glyph codes.
maximum minimum type description
604
1
integer
Madani Mushaf Page number for v2 font. If `v2_page` value is 2, that means you'll use page 2 font file to render this ayah using v2 glyph codes.
id chapter_id verse_number verse_key verse_index text_uthmani text_uthmani_simple text_imlaei text_imlaei_simple text_indopak text_uthmani_tajweed juz_number hizb_number rub_el_hizb_number page_number image_url image_width words
1
1
1
1:1
1
بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ
بسم الله الرحمن الرحيم
بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ
بسم الله الرحمن الرحيم
بِسۡمِ اللهِ الرَّحۡمٰنِ الرَّحِيۡمِ
بِسْمِ <tajweed class=ham_wasl>ٱ</tajweed>للَّهِ <tajweed class=ham_wasl>ٱ</tajweed><tajweed class=laam_shamsiyah>ل</tajweed>رَّحْمَ<tajweed class=madda_normal>ـٰ</tajweed>نِ <tajweed class=ham_wasl>ٱ</tajweed><tajweed class=laam_shamsiyah>ل</tajweed>رَّح<tajweed class=madda_permissible>ِي</tajweed>مِ <span class=end>١</span>
1
1
1
1
//c22506.r6.cf1.rackcdn.com/1_1.png
675
id position audio_url char_type_name translation transliteration
1
1
wbw/001_001_001.mp3
word
text language_name
In (the) name
english
text language_name
bis'mi
english
title type properties example
Pagination
object
per_page current_page next_page total_pages= total_records=
type description
integer
Entries per api call
type description
integer
type description
integer
Next page in paginated result
type description
integer
Total number of pages
type
integer
per_page current_page next_page total_pages= total_records=
1
1
2
7
7
verses pagination
id verse_key chapter_id text_uthmani code_v1 code_v2 image_url juz_number hizb_number rub_el_hizb_number manzil_number ruku_number page_number
1
1:1
1
بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ
1
1
1
1
1
1
per_page current_page next_page total_pages total_records
10
1
2
62
6236
description content
Will be returned when the request is invalid e.g. request is missing required headers or with invalid query parameters.
application/json
schema example
title type properties
invalidRequestResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The request is missing required headers or is invalid
invalid_request
false
description content
Will be returned when the request is unauthorized.
application/json
schema example
title type properties
unauthorizedResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The request requires user authentication
unauthorized
false
description content
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
application/json
schema example
title type properties
forbiddenResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The server understood the request, but refuses to authorize it
forbidden
false
description content
Not Found. The resource being accessed does not exist.
application/json
schema example
title type properties
notFoundResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The requested resource could not be found
not_found
false
description content
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
application/json
schema example
title type properties
unprocessableEntityResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The request was well-formed but was unable to be followed due to semantic errors
unprocessable_entity
false
description content
Rate-limit exceeded
application/json
schema example
title type properties
rateLimitExceededResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
Too many requests, please try again later
rate_limit_exceeded
false
description content
Server Error. Something went wrong, try again later.
application/json
schema example
title type properties
internalServerErrorResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The server encountered an internal error and was unable to complete your request
internal_server_error
false
description content
Bad Gateway
application/json
schema example
title type properties
badGatewayResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The server was acting as a gateway or proxy and received an invalid response from the upstream server
bad_gateway
false
description content
Service Unavailable
application/json
schema example
title type properties
serviceUnavailableResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
service_unavailable
false
description content
Gateway Timeout
application/json
schema example
title type properties
gatewayTimeoutResponse
object
message type success
type
string
type enum
string
gateway_timeout
service_unavailable
bad_gateway
internal_server_error
unprocessable_entity
not_found
forbidden
unauthorized
invalid_request
invalid_token
insufficient_scope
service_error
invalid_path
rate_limit_exceeded
type
boolean
message type success
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server
gateway_timeout
false
get
/quran/verses/{script}
url description
Pre-production Server
url description
Production Server
x-auth-token x-client-id
x-auth-token x-client-id
type description name in
apiKey
The JWT access token required for accessing the endpoints.
x-auth-token
header
type description name in
apiKey
Your client Id
x-client-id
header
title description version
Content APIs
Quran.Foundation Content APIs offer programmatic access to the Quran's core content like chapters, verses, recitations, translations, and more, distinct from user-specific data like notes and bookmarks provided by [User-related APIs](/docs/category/user-related-apis). :::important Integrity of Translations Please **disable any automatic browser-translation features** (e.g. Google-Translate-in-Chrome) when displaying text returned by the *Translations* endpoints. Re-translating an already vetted Quranic translation can introduce serious semantic errors. ::: ## How to get access We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to [get an access token](/docs/tutorials/oidc/getting-started-with-oauth2#obtaining-oauth-20-client-credentials) to make requests to our APIs. Since the APIs are not user-related, you will need to use the `client_credentials` grant type and [`content` scope](/docs/user_related_apis_versioned/scopes#content) when sending a request to [The OAuth 2.0 Token Endpoint](/docs/oauth2_apis_versioned/oauth-2-token-exchange) to get the access token. The below diagram shows the flow of getting an access token using the `client_credentials` grant type in a very simplified way. ![Client Credentials Flow](/img/client-credentials-flow.png) After getting a valid access token, each request to get resources will have to include 2 headers mentioned below: `x-auth-token` and `x-client-id`.
v4
name description url header method
Get Quran verses in a specific script
content type
Stream the complete Quran text in the requested script. Use the structural filters to limit results to a chapter, juz, hizb, rub el hizb, manzil, ruku, or page.
text/plain
path host query variable
quran
verses
:script
{{baseUrl}}
disabled description key value
false
content type
Filter verses to a specific surah.
text/plain
chapter_number
disabled description key value
false
content type
Filter verses to a specific juz.
text/plain
juz_number
disabled description key value
false
content type
Filter verses to a Madani Mushaf page.
text/plain
page_number
disabled description key value
false
content type
Filter verses to a specific hizb.
text/plain
hizb_number
disabled description key value
false
content type
Filter verses to a specific rub el hizb.
text/plain
rub_el_hizb_number
disabled description key value
false
content type
Filter verses to a specific manzil.
text/plain
manzil_number
disabled description key value
false
content type
Filter verses to a specific ruku.
text/plain
ruku_number
disabled description key value
false
content type
Fetch a single ayah by its `chapter:verse` key.
text/plain
verse_key
disabled description key value
false
content type
Result page number (pagination).
text/plain
page
disabled description key value
false
content type
Records per page (maximum 50).
text/plain
per_page
disabled description type value key
false
content type
(Required) Script identifier for the response payload. Supported values: `uthmani`, `uthmani_simple`, `uthmani_tajweed`, `indopak`, `indopak_nastaleeq`, `imlaei`, `imlaei_simple`, `qpc_hafs`, `qpc_nastaleeq`, `code_v1`, `code_v2`, `v1_image`.
text/plain
any
script
key value
Accept
application/json
GET
sidebar_class_name get api-method
info_path docs/content_apis_versioned/content-apis
custom_edit_url

import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem";

Get Quran verses in a specific script

Stream the complete Quran text in the requested script. Use the structural filters to limit results to a chapter, juz, hizb, rub el hizb, manzil, ruku, or page.

Path Parameters
    Query Parameters

      Successful response

      Schema
        verses object[]
      • Array [
      • = 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"page_number is deprecated, please use `v1_page` instead."}}>
        words object[]
      • Array [
      • = 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"page_number is deprecated, please use `v1_page` instead."}}>
        translation object required
        transliteration object required
        = 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"Madani Mushaf Page number for v1 font. If `v1_page` value is 2, that means you'll use page 2 font file to render this word using v1 glyph codes."}}>= 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"Madani Mushaf Page number for v2 font. If `v2_page` value is 2, that means you'll use page 2 font file to render this ayah using v2 glyph codes."}}>
      • ]
      • audio object
        translations object[]
      • Array [
      • ]
      • = 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"Madani Mushaf Page number for v1 font. If `v1_page` value is 2, that means you'll use page 2 font file to render this ayah using v1 glyph codes."}}>= 1` and `<= 604`"} schema={{"maximum":604,"minimum":1,"type":"integer","description":"Madani Mushaf Page number for v2 font. If `v2_page` value is 2, that means you'll use page 2 font file to render this ayah using v2 glyph codes."}}>
      • ]
      • pagination object
      ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ ١\",\n \"juz_number\": 1,\n \"hizb_number\": 1,\n \"rub_el_hizb_number\": 1,\n \"page_number\": 1,\n \"image_url\": \"//c22506.r6.cf1.rackcdn.com/1_1.png\",\n \"image_width\": 675,\n \"words\": [\n {\n \"id\": 1,\n \"position\": 1,\n \"audio_url\": \"wbw/001_001_001.mp3\",\n \"char_type_name\": \"word\",\n \"translation\": {\n \"text\": \"In (the) name\",\n \"language_name\": \"english\"\n },\n \"transliteration\": {\n \"text\": \"bis'mi\",\n \"language_name\": \"english\"\n }\n }\n ]\n }\n ],\n \"pagination\": {\n \"per_page\": 1,\n \"current_page\": 1,\n \"next_page\": 2,\n \"total_pages=\": 7,\n \"total_records=\": 7\n }\n}"} language={"json"}>

      Will be returned when the request is invalid e.g. request is missing required headers or with invalid query parameters.

      Schema

        Will be returned when the request is unauthorized.

        Schema

          Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.

          Schema

            Not Found. The resource being accessed does not exist.

            Schema

              Validation Error. The request includes one or more invalid params. Please check the request params and try again.

              Schema

                Rate-limit exceeded

                Schema

                  Server Error. Something went wrong, try again later.

                  Schema

                    Bad Gateway

                    Schema

                      Service Unavailable

                      Schema

                        Gateway Timeout

                        Schema