🛠️ Migrating from QuranJS API
If you previously used the @quranjs/api
SDK against the Quran.com endpoints, switching to the new Quran Foundation API requires a few changes.
- Base URLs – The new SDK defaults to
https://apis.quran.foundation
andhttps://oauth2.quran.foundation
. Remove any overrides pointing to quran.com. - Authentication – OAuth2 is now mandatory. Calls without a valid token will fail. Make sure to call
configure
with bothclientId
andclientSecret
. - API Differences – Several endpoint paths have changed and some fields were renamed. Consult the Endpoint Reference and the official API docs for the exact routes.
- Utility Functions – Validation helpers now live under
quran.utils
and return boolean values.
Most method names remain the same, so in many cases updating the configuration and endpoint URLs is all that is needed.