Fathom AnalyticsAPI

Command Palette

Search for a command to run...

API Reference · v1

Pagination

All top-level API resources allow you to fetch records in bulk via our "list" methods. These list methods share a common, cursor-based pagination structure. We've taken inspiration from the excellent Stripe API, so this will be familiar to a lot of you.

You can paginate using either starting_after or ending_before (but not both at once):

  • When you use starting_after, we sort records in chronological order, allowing you to page from the start of time up until the current day.
  • When you use ending_before, we sort records in reverse chronological order, effectively working backwards from the object ID you give us.

Every list response is wrapped in a list object. The has_more boolean tells you whether another page is available, and the value to pass as your next cursor is the id of the first or last item in data.

All list endpoints accept these query string parameters:

  • limit — the number of objects to return, between 1 and 100 (default 10).
  • starting_after — an object ID that defines your place in the list, paging forwards.
  • ending_before — an object ID that defines your place in the list, paging backwards.
List response shape
{
    "object": "list",
    "url": "/v1/sites",
    "has_more": true,
    "data": [
        { "...": "..." }
    ]
}