alquran/api-client REST API Client

v1.3 2022-06-06 09:07 UTC

This package is auto-updated.

Last update: 2024-06-22 10:59:12 UTC


بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ


AlQuran Cloud API Client (PHP)

This is a PHP API client that uses the rest API at to fetch Quran Ayahs, Surahs Juzs or the entire Quran..


The API Client is a composer package. To use it, you need to run the following:

composer require alquran/api-client


Instantiate the Client

$t = new \AlQuranCloud\ApiClient\Client();

Getting an Ayah

To get a single ayah, use:

$t->ayah(765); // This will return Ayah 765
$t->ayah(765, 'en.pickthall'); // This will return Ayah 765 with Marmaduke Pickthall's English translation
$t->ayah('2:255'); // This will return Surah 2, Ayah 255 (which is Ayat Al Kursi)

Getting a Surah

To get a surah, use:

$t->surah(36); // This will return Surah Yaseen
$t->surah(36, 'en.asad'); // This will return Surah Yaseen with Muhammad Asad's English translation

Getting a Juz

To get a juz, use:

$t->juz(30); // This will return Juz 30 (there are only 30!)

Getting Editions, Searching and more...

Please see the complete documentation in docs/index.html (Clone the repo and open the file in a browser).

Authors and Contributors

Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram (@meezaan).

Support or Contact

For support, please visit or