Skip to main content

Runtime Matrix

Purpose: Decide which SDK runtime to use.
Use this when: You are not sure whether you need server or public.
Do not use this when: You already know your runtime and only need endpoint examples.
Backend required: See table below.
Allowed runtimes: Node.js, serverless functions, workers, browser apps, mobile apps.
Required credentials: Depends on runtime.
Minimal import: @quranjs/api/server or @quranjs/api/public.

Consumer typeImportBackend requiredCan use Content?Can use Search?Can use User APIs?Can use OAuth2?Needs client_secret?
Backend integrator@quranjs/api/serverYesYesYesYesYesYes
Full-stack app frontend@quranjs/api/publicYesNoNoYesYesNo
Full-stack app backend@quranjs/api/serverYesYesYesYesYesYes
Frontend-only public client@quranjs/api/publicNoNoNoLimitedLimitedNo

Short Answer

  • If you have a backend, use server.
  • If you are in browser or mobile, use public.
  • If you need Content or Search, you need server.