Appearance
Pagination
Organization-scoped list endpoints return results in pages. This page covers the envelope, how to walk through pages, and the common filtering parameters.
The envelope
A paginated list returns an object with count, next, previous, and results:
json
{
"count": 128,
"next": "https://api.cryptocomply.xyz/api/orgs/42/profiles/?page=2",
"previous": null,
"results": [
{ "id": 5001, "name": "Northwind Exchange Ltd." }
]
}| Field | Meaning |
|---|---|
count | Total number of records across all pages. |
next | Full URL of the next page, or null on the last page. |
previous | Full URL of the previous page, or null on the first page. |
results | The records for this page. |
Walking through pages
Pages are numbered. Request a specific page with the page query parameter:
bash
curl "https://api.cryptocomply.xyz/api/orgs/42/profiles/?page=2" \
-H "Authorization: Api-Key $CRYPTOCOMPLY_API_KEY"The simplest way to consume an entire list is to follow next until it is null — it already carries the correct page and any filters you applied:
python
import os, requests
headers = {"Authorization": f"Api-Key {os.environ['CRYPTOCOMPLY_API_KEY']}"}
url = "https://api.cryptocomply.xyz/api/orgs/42/profiles/"
profiles = []
while url:
page = requests.get(url, headers=headers, timeout=30).json()
profiles.extend(page["results"])
url = page["next"]Ordering and search
Most list endpoints accept these query parameters:
| Parameter | Effect |
|---|---|
ordering | Sort by a field, e.g. ?ordering=created_at. Prefix with - to reverse: ?ordering=-created_at. |
search | Free-text search across an endpoint's searchable fields. |
The exact searchable and orderable fields vary by endpoint — check the REST reference for each one.
Not everything is paginated
A few account-level endpoints return a plain JSON array instead of the envelope — most notably GET /api/orgs/, which lists the organizations your key can reach. Check the response: if it is an array, there are no pages; if it is an object with results, page through it as above.
What's next
- Errors — handling failures while paging.
- Full REST reference — per-endpoint parameters.