Digital Quran
  • Introduction
  • Standards & conventions
    • Quran
    • Naming convention
    • Translation files: description
    • Translation files: examples
    • Translation texts
    • Quranic Text Markup Language (QTML)
    • Code examples
  • Content & Releases
    • Quran text
    • Font (Kitab)
    • Meta data
    • Translations
    • Tafsirs
    • Word-by-word translations
  • FAQ
    • How can I contribute?
    • Why Quran Academy website has more data than Digital Quran?
    • What if I found a mistake or a typo in a translation?
    • Who is using this standard?
    • How can I use content?
  • API
    • Getting started
    • Authentication
    • Creating an application
    • Limits
    • Errors
    • Pagination
    • CORS
    • Public endpoints
      • Languages
      • Surahs
      • Ayahs
      • Words
      • Translations
  • Other
    • Contributors
Powered by GitBook
On this page

Was this helpful?

  1. API

Pagination

Some endpoints that return collections are paginated. For these endpoints, the meta.pagination object will tell you the current page, amount per page, total number of pages, and total count of the collection.

By default, the API will return the first page of results. Each page contains a maximum of 100 items unless otherwise noted below. To fetch a particular page, use the page query parameter.

You can specify per_page parameter to set the amount of images to return. It must be an integer from 1 to the maximum number of items for a given action.

An example meta.pagination payload:

{
    "data": [...],
    "meta": {
        "pagination": {
            "page": 1,
            "count": 100,
            "total_pages": 3,
            "total_count": 300
        }
    }
}

Note: meta.pagination.count is not equal to per_page parameter, it may be less on the last page.

PreviousErrorsNextCORS

Last updated 5 years ago

Was this helpful?