Skip to main content
Every list endpoint paginates the same way: page and per_page on the request, counts on the response.

Request

per_page=500 returns 100 records and a 200, not an error. The response echoes the per_page that was actually applied, so read it back rather than assuming you got what you asked for.

Response

The collection sits under a name matching the resource — links, qrcodes, campaigns, tags, utm_templates, dynamic_link_templates — alongside four counts:

Walking every page

Stop on total_pages, not on an empty array. A page can come back short of per_page without being the last one, and looping until you see zero records costs an extra request every time.

Sorting

Two parameters control order:
There is no most_clicked. Click counts are stored in the analytics system rather than alongside the links, so there is nothing to sort on. To rank by clicks, read get_org_metrics_aggregation and order the result yourself.

Pagination inside analytics

Analytics breakdowns paginate too, but the page parameter is called current_page rather than page:

A caveat on long walks

Pagination is offset-based, so it reflects the data as it is at the moment each page is read, not a snapshot from when you started. If links are being created while you page through, a record can move between pages and be seen twice or missed. For a consistent view of a changing list, filter to a closed window with date_from and date_to so new records fall outside it: