Many Quran apps need a "topics" screen: pick a theme like Patience or Prayer and see the verses about it. In this post we build that as a small Python command-line tool using only the standard library ( urllib + json ).
The data comes from the free sample of the Quran Topics API on QuraniAPI:
https://quranicapi.online/api/serve.php?slug=quran-topics
Enter fullscreen mode
Exit fullscreen mode
What the JSON looks like
Each item has a slug , an icon and a translations object keyed by language code ( en , ur , fr , de , tr , ms , ru , zh-CN , ja ). Each language has a title, a short description and a list of verse references in surah:ayah form:
{ "id" : 1 , "slug" : "patience" , "icon" : "â³" , "translations" : { "en" : { "title" : "Patience (Sabr)" , "description" : "Allah loves the patient.…