Lists and filters
Pages, sorting and filters on every list.
Every list answers in the same shape:
{ "data": [], "pageCount": 1, "totalRows": 0 }Pages
| Parameter | Meaning |
|---|---|
page | Page number, from 1. Default 1. |
perPage | Rows per page, 1 to 100. Default 10. |
To read everything, go up from page=1 until you reach pageCount.
Filters that take several values
Repeat the parameter or separate the values with commas. These two calls are the same:
/campaigns?statuses=live&statuses=ended
/campaigns?statuses=live,endedSorting
Lists that can be sorted take sortCol. Campaigns also take sortDir, either asc or desc:
/campaigns?sortCol=name&sortDir=ascEach list's filters and sort options are in the API reference.
Top videos and accounts
/top/videos and /top/accounts aren't paged. They take days (7, 30 or 90), sort (views, likes or comments) and limit (1 to 10), and answer { window, data }.
They cover the accounts you track in Analytics, and leave competitors' accounts out.
Need help? Email support@loopearn.com