docs array, and return top-level meta data related to pagination such as totalDocs, limit, totalPages, page, and more.
Options
All FrogBot APIs support the pagination controls below. With them, you can create paginated lists of documents within your application:Local API
To specify pagination controls in the Local API, you can use thelimit, page, and pagination options in your query:
REST API
With the REST API, you can use the pagination controls below as query strings:Response
All paginated responses include documents nested within adocs array, and return top-level meta data related to pagination.
The find operation includes the following properties in its response:
Example response:
Limit
You can specify alimit to restrict the number of documents returned per page.
Performance benefits
If you are querying for a specific document and can reliably expect only one document to match, you can set a limit of1 (or another low number) to reduce the number of database lookups and improve performance.
For example, when querying a document by a unique field such as slug, you can set the limit to 1 since you know there will only be one document with that slug.
To do this, set the limit option in your query:
Disabling pagination
Disabling pagination can improve performance by reducing the overhead of pagination calculations and improve query speed. Forfind operations within the Local API, you can disable pagination to retrieve all documents from a collection by passing pagination: false to the find local operation.
To do this, set pagination: false in your query: