Pagination

In this guide, we will look at how to work with paginated responses when querying the Verifiable API.

By default, all responses are limited to 100 returned items. This limit is not configurable. If there are more than 100 returned items, you can use the page parameter to navigate through the pages.

When an API response returns a list of objects, no matter the amount, pagination is supported. In paginated responses, objects are nested in a field matching the resource name (i.e., emails for emails, emailLists for email lists, etc.).

Every response will have a field named page that indicates the current page number and a field named totalPages that indicates the total number of pages.

Making a request without the page parameter will return the first page of results. Requesting a page greater than totalPages, or less than 1, will return an error message.

Example paginated request

In this example, we request the second page of a response that contains four pages of emails.

  • Name
    page
    Type
    integer
    Description

    The page number you want to fetch.

cURL

curl --location 'https://verifiable.co/api/v1/emails' \
--header 'Authorization: Bearer {token}' \
--header 'Accept: application/json' \
--data-urlencode 'page=2'

Paginated response

{
  "page": 2,
  "totalPages": 4,
  "emails": [
    {
        "email": "help@verifiable.co",
        "id": 34,
        "is_valid": true,
        "mx_record_count": 1,
        "connectable_mx_record_count": 1,
        "can_connect": true,
        "is_username_generic": true,
        "is_alias": false,
        "canonical_email": "help@verifiable.co",
        "is_free": false,
        "is_subdomain": false,
        "status": "completed"
    },
    {
      "email": "support@verifiable.co",
      "id": 41,
      "is_valid": true,
      "mx_record_count": 1,
      "connectable_mx_record_count": 1,
      "can_connect": true,
      "is_username_generic": true,
      "is_alias": false,
    } 
  ],
}

Was this page helpful?