Pagination
Several pagination styles coexist in the Emelia API. Which route uses which, where pages start at 0 or at 1, and a loop for each.
There is no single convention: check the route page. This table covers every paginated route.
| Routes | First page | Page size | Response |
|---|---|---|---|
Lists: GET /lists/list | page=1 | limit, 25 by default, 100 at most | items, total, page, pageSize, totalLeads |
Contacts of a list: GET /lists/list/{listId}/rows | page=1 | pageSize, 50 by default, 100 at most | items, total, page, pageSize |
Contacts of a campaign: GET /advanced/campaign/contacts | page=0 | perPage, 20 by default, 10,000 at most | list, count |
Campaign activities: GET /advanced/campaigns/{campaignId}/activities | page=0 | 30, fixed | activities |
Contacts of a step: GET /advanced/campaigns/{campaignId}/progress/contacts | page=1 | 20, fixed | contacts, total, totalPages |
Enrichment history: GET /tools/find/email, /tools/find/phone, /tools/verify/email | page=1 | limit, 15 by default, 100 at most | data, total |
Credit history: GET /credits/usage | page=1 | limit, 50 by default, 200 at most | items, total |
LinkedIn scrapers: GET /linkedin-scrappers | page=0 | 20, fixed | scraps |
Not paginated: the campaigns (GET /advanced/campaigns), the email providers and the warmups. They return everything in one response.
Lists and contacts
Read every contact of a list, 100 at a time:
GET/lists/list/{listId}/rows
curl "https://api.emelia.io/lists/list/66f1c0ffee5a7d3b2c4e8a10/rows?page=1&pageSize=100" \
-H "Authorization: $EMELIA_API_KEY"Two traps of the list routes
GET /lists/list without page and limit returns a plain array of all your lists instead of the envelope: send both parameters to get a stable shape. And deep pages of a large list get slower, because each page sorts every row before it: page through with pageSize=100 without restarting from page 1, or use the CSV export.
Campaign activities
GET /advanced/campaigns/{campaignId}/activities returns 30 activities per page, newest first, and page starts at 0. An empty activities array means you reached the end.
/advanced/campaigns/{campaignId}/activities
curl "https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/activities?types=MAIL_REPLIED,LINKEDIN_REPLIED&page=0" \
-H "Authorization: $EMELIA_API_KEY"Activities are cached for up to 10 minutes. For a large campaign, the CSV export is faster than paging: GET /advanced/campaigns/{campaignId}/export?type=replies returns every reply in one file. See Replies.