Guides

Pagination and rate limits

Traverse large result sets and recover gracefully from HTTP 429.

Follow the cursor

List endpoints return data, has_more, and next_cursor. Pass next_cursor as the cursor parameter on your next request. Treat cursors as opaque values; do not construct or edit them.

curl "https://api.lumen.dev/v1/connections?limit=50&cursor=cur_example" -H "Authorization: Bearer $LUMEN_API_KEY"
curl "https://api.lumen.dev/v1/connections?limit=50&cursor=cur_example" -H "Authorization: Bearer $LUMEN_API_KEY"
curl "https://api.lumen.dev/v1/connections?limit=50&cursor=cur_example" -H "Authorization: Bearer $LUMEN_API_KEY"

Respect backoff

When you receive HTTP 429, wait for the Retry-After interval before retrying. Add jitter to parallel workers and monitor remaining capacity in the response headers. A smaller page size can reduce processing latency.

Create a free website with Framer, the website builder loved by startups, designers and agencies.