How to Add Quran, Hadith & Prayer Times to Your App with a Free Islamic API
How to Add Quran, Hadith & Prayer Times to Your App with a Free Islamic API If you've ever built a Muslim app, whether a Quran reader, a prayer-time app or a simple "Hadith of the Day" widget, you know the hard part isn't the UI. It's the data . You need the authentic Arabic text, reliable translations, consistent formatting, and you need it in the languages your users actually speak. In this…
Adding Quran, Hadith, and Prayer Times to Your App with a Free Islamic API
Building Muslim apps, whether for readers, prayer time tracking, or Hadith of the Day widgets, can be challenging due to the required data. Authentic Arabic text, reliable translations, consistent formatting, and support for users' languages are essential. SunnahSource, an Islamic API platform, offers clean JSON data in 9 languages (English, Urdu, Russian, Malay, Indonesian, French, German, Turkish, and Chinese) for Quran, Hadith, Duas, Azkar, Tafseer, Prayer Times, and more.
Using an Islamic API over scraping offers authenticity, consistency, and multilingual support. API data comes from verified sources, has the same structure (Arabic, transliteration, and translations object keyed by language code), and eliminates the need for PDF parsing, OCR, and handling Arabic diacritics. With 19 APIs available, including free Quran Translations and Hadith APIs, integrating SunnahSource into your app is a straightforward process.
To get started, prototype using the public sample data available for each API. The Hadith sample, for instance, includes collections like Sahih Bukhari and individual entries with Arabic text, narrator, and translations. Using Node.js, fetch the Quran translations JSON file, parse it, and log the surah name, ayahs, and translations in English or Urdu.
Python developers can similarly fetch the Hadith JSON data, randomly select an entry, and print the collection, hadith number, narrator, Arabic text, and English translation. For a Flutter app, create a PrayerTimes class to store city and prayer time data. Fetch prayer times JSON data, decode it, and use the retrieved data to render fajr, dhuhr, asr, maghrib, and isha prayer times in a list within your app. Remember to use a font with good Arabic support and adjust text direction for Arabic widgets.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.