1---2name: quran-foundation-api-docs3description: Use when choosing Quran Foundation API families, authentication flows, endpoints, SDK runtime boundaries, Developer Console onboarding, font rendering, or official integration references.4---56# Quran Foundation API Docs78## Use When910- The task involves Quran Foundation APIs, api-docs.quran.foundation, Quran.com integrations, or quranreflect.com integrations.11- The user needs official endpoint selection, request or response details, auth guidance, scopes, quickstarts, or migration help.12- The user needs font rendering or Mushaf page-layout guidance.13- The user needs OAuth2 or OIDC setup guidance across web or mobile platforms.14- The user needs Developer Console onboarding details such as app creation, credentials, app type, redirect URIs, permissions, or existing-client import.15- The user wants to scaffold a Quran Foundation app, choose the official JavaScript or Python SDK path, or use a copyable implementation prompt.16- The task involves Quran Reflect or quranreflect.com features backed by Quran Foundation APIs.17- The user wants links to official documentation or OpenAPI specifications.1819## Do Not Use When2021- The task is unrelated to Quran Foundation APIs.22- The user needs live production data, account-specific secrets, or environment access that is not present in the docs.2324## Route The Request First25261. Identify the correct API family.27 - Content APIs v4: Quran text, translations, tafsir, audio, recitations, verses, chapters, pages, juz, hizb, ruku, manzil, and related content.28 - Search APIs v1: Quran search queries and search-related integration.29 - OAuth2 APIs v1 and OIDC docs: authentication, authorization, tokens, discovery, and login flows.30 - User-related APIs v1: bookmarks, collections, notes, profiles, reading sessions, rooms, posts, and related user features.31 - Font and page-layout tutorials: script rendering, Mushaf layouts, and page-based display guidance.32 - Quran Reflect integrations: posts, comments, feeds, likes, saves, room/page/community features, and related scopes.332. Prefer stable production docs by default.343. Only use pre-live user-related docs when the user explicitly asks for upcoming or unreleased behavior.3536## Canonical Sources3738- Docs home: `https://api-docs.quran.foundation/`39- Content OpenAPI: `https://api-docs.quran.foundation/openAPI/content/v4.json`40- Search OpenAPI: `https://api-docs.quran.foundation/openAPI/search/v1.json`41- OAuth2 OpenAPI: `https://api-docs.quran.foundation/openAPI/oauth2-apis/v1.json`42- User-related OpenAPI (production): `https://api-docs.quran.foundation/openAPI/user-related-apis/v1.json`43- User-related OpenAPI (pre-live): `https://api-docs.quran.foundation/openAPI/user-related-apis/pre-live/v1.json`44- Agent prompt registry: `https://api-docs.quran.foundation/.well-known/agent-prompts/index.json`45- Next.js starter prompt: `https://api-docs.quran.foundation/agent-prompts/qf-next-starter.md`46- SvelteKit starter prompt: `https://api-docs.quran.foundation/agent-prompts/qf-sveltekit-starter.md`47- JS SDK integration prompt: `https://api-docs.quran.foundation/agent-prompts/qf-js-sdk-integration.md`48- Python SDK integration prompt: `https://api-docs.quran.foundation/agent-prompts/qf-python-sdk-integration.md`49- OAuth/User APIs prompt: `https://api-docs.quran.foundation/agent-prompts/qf-oauth-user-apis.md`50- Review existing integration prompt: `https://api-docs.quran.foundation/agent-prompts/qf-review-existing-integration.md`51- AI Agent Prompts: `https://api-docs.quran.foundation/docs/ai-agents/`52- Developer Journey: `https://api-docs.quran.foundation/docs/developer-journey/`53- API Reference: `https://api-docs.quran.foundation/docs/api-reference/`54- JavaScript SDK: `https://api-docs.quran.foundation/docs/sdk/javascript/`55- Python SDK: `https://api-docs.quran.foundation/docs/sdk/python/`56- Starter With NPX: `https://api-docs.quran.foundation/docs/tutorials/oidc/starter-with-npx/`57- User APIs OIDC quickstart: `https://api-docs.quran.foundation/docs/tutorials/oidc/user-apis-quickstart/`58- OAuth2 getting started: `https://api-docs.quran.foundation/docs/tutorials/oidc/getting-started-with-oauth2/`59- OpenID Connect tutorial: `https://api-docs.quran.foundation/docs/tutorials/oidc/openid-connect/`60- OIDC client setup: `https://api-docs.quran.foundation/docs/tutorials/oidc/client-setup/`61- OAuth2 web integration example: `https://api-docs.quran.foundation/docs/tutorials/oidc/example-integration/`62- Mobile apps overview: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/`63- Android mobile OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/android/`64- iOS mobile OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/iOS/`65- React Native OIDC guide: `https://api-docs.quran.foundation/docs/tutorials/oidc/mobile-apps/react-native/`66- Content API quickstart: `https://api-docs.quran.foundation/docs/quickstart/`67- Font rendering tutorial: `https://api-docs.quran.foundation/docs/tutorials/fonts/font-rendering/`68- Page layout tutorial: `https://api-docs.quran.foundation/docs/tutorials/fonts/page-layout/`69- Developer Console: `https://dev-console.quran.foundation/`70- Developer Console onboarding bridge: `https://api-docs.quran.foundation/request-access/`71- FAQ: `https://api-docs.quran.foundation/docs/tutorials/faq/`72- API catalog: `https://api-docs.quran.foundation/.well-known/api-catalog`7374## Working Rules7576- Cite official Quran Foundation docs or OpenAPI specs when giving implementation guidance.77- Prefer the most specific doc page for the endpoint in question, not just the docs home page.78- Do not invent endpoints, scopes, parameters, headers, or response fields. Confirm them from the docs or OpenAPI.79- Distinguish documentation URLs from API base URLs.80- For auth questions, call out whether the answer belongs to OAuth2/OIDC or to an application API.81- For setup questions, send developers to Developer Console to create or open an app, select the exact **Frontend or mobile app** or **Backend/server app** type, manage credentials and redirect URIs, and request permissions. Treat `/request-access` as a bridge to Console, not as a provisioning form.82- For Quran font questions, choose between Unicode text rendering and page-based glyph rendering based on the user's display requirements.83- For Quran Reflect-related questions, check post, comment, feed, room, and scope docs before answering.84- If multiple endpoints could fit, explain the best match and mention the alternative only if it materially changes implementation.85- If the user asks for sample code, keep it aligned with documented auth and base URL expectations.86- For JavaScript or TypeScript apps, identify the app type selected in Developer Console before choosing the OAuth and SDK boundary.87 - A **Frontend or mobile app** is a public client with no client secret. Use `@quranjs/api/public` for PKCE authorization, code exchange, and refresh in the app; store user tokens with secure platform-appropriate storage and never log them.88 - A **Backend/server app** is a confidential client. Use `@quranjs/api/public` for browser/mobile-safe authorization initiation and `@quranjs/api/server` for secret-backed code exchange, refresh, server sessions, Content, Search, and proxied User API calls.89- For Python apps, scripts, jobs, notebooks, or AI workflows, prefer the official `quran-foundation-api` package and `QuranClient` from trusted server-side environments, keep credentials out of rendered output and logs, and choose app access tokens for Content/Search APIs versus user access tokens for signed-in User APIs explicitly.90- For new Next.js apps, route the user to the official scaffold and prompt before hand-writing OAuth2 plumbing.91- For SvelteKit apps, route the user to the official `--template sveltekit` scaffold and prompt before hand-writing OAuth2 plumbing.92- For response-shape questions, prefer exact endpoint schemas and documented status-code behavior to explain common success and error variations.9394## Fast Routing Hints9596- "Get verses, translations, tafsir, chapters, audio, or recitations" -> Content APIs v497- "Search the Quran" -> Search APIs v198- "Login, tokens, discovery, issuer metadata, OAuth2, OIDC" -> OAuth2 APIs v1 plus OIDC docs99- "Bookmarks, collections, notes, reading sessions, profile, rooms, posts" -> User-related APIs v1100- "Create a Quran app, starter app, scaffold, copy prompt, AI prompt, build with agents" -> Starter With NPX plus QF_NPX_STARTER_PROMPT_V1101- "SvelteKit starter, SvelteKit scaffold" -> Starter With NPX plus QF_SVELTEKIT_STARTER_PROMPT_V1102- "Existing JS SDK integration, add @quranjs/api" -> JavaScript SDK docs plus QF_JS_SDK_INTEGRATION_PROMPT_V1103- "Python SDK, Python client, quran_foundation, quran-foundation-api, AI workflow in Python" -> Python SDK docs plus QF_PYTHON_SDK_INTEGRATION_PROMPT_V1104- "Review an integration, check mistakes, secret exposure, SDK boundary" -> QF_REVIEW_EXISTING_INTEGRATION_PROMPT_V1 plus exact endpoint schemas105- "Where should I start, what path should I follow, developer journey" -> Developer Journey106- "API reference, endpoint lookup, endpoint docs, all APIs" -> API Reference first, then the exact API family page107- "JavaScript SDK, TypeScript SDK, server/public imports, runtime split" -> JavaScript SDK docs108- "Python SDK, Python client, quran-foundation-api, scripts, notebooks, AI workflows" -> Python SDK docs109- "Web login flow, PKCE, callback, mobile auth, redirect URIs" -> OIDC tutorial pages plus OAuth2 APIs110- "Fonts, glyph codes, Mushaf pages, script rendering, Tajweed display" -> Font rendering and page-layout tutorials plus relevant content endpoints111- "Quran Reflect feed, post, comment, like, save, room, or community behavior" -> User-related posts and rooms docs, and content feed/read docs where applicable112- "Upcoming user API behavior" -> Pre-live user-related docs, and clearly label them as pre-live113114## Expected Output115116- Name the API family first.117- Link the exact doc page or OpenAPI spec used.118- State any auth requirement or prerequisite clearly.119- If relevant, mention whether the guidance is production or pre-live.