Pagination

Pagination

Voyager uses two pagination styles depending on the endpoint: offset-based (most endpoints) and cursor-based (conversations).

Offset-Based Pagination

Most list endpoints accept start (offset) and count (page size) parameters.

$# First page
$curl "$BASE/api/search/people?keywords=CTO&start=0&count=10" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER"
$
$# Second page
$curl "$BASE/api/search/people?keywords=CTO&start=10&count=10" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER"
$
$# Third page
$curl "$BASE/api/search/people?keywords=CTO&start=20&count=10" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER"

Looping Pattern

$START=0
$COUNT=10
$while true; do
$ RESP=$(curl -s "$BASE/api/search/people?keywords=CTO&start=$START&count=$COUNT" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
$ RESULTS=$(echo "$RESP" | jq '.results | length')
$ [ "$RESULTS" -eq 0 ] && break
$ echo "$RESP" | jq '.results'
$ START=$((START + COUNT))
$ sleep 3 # Respect rate limits
$done

Endpoints Using Offset Pagination

EndpointDefault CountMax Count
GET /api/search/people1049
GET /api/search/companies1049
GET /api/search/content1049
GET /api/search/jobs1025
GET /api/search/groups1049
GET /api/feed1050
GET /api/salesnav/alerts1050
GET /api/salesnav/inbox1050
GET /api/salesnav/viewers1050

Cursor-Based Pagination

Conversations use cursor-based pagination. The response includes a nextCursor value that you pass in the next request.

$# First page
$RESP=$(curl -s "$BASE/api/conversations?limit=20" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
$
$# Extract cursor
$CURSOR=$(echo "$RESP" | jq -r '.nextCursor // empty')
$
$# Next page
$if [ -n "$CURSOR" ]; then
$ RESP=$(curl -s "$BASE/api/conversations?limit=20&nextCursor=$CURSOR" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
$fi

Cursor Looping Pattern

$CURSOR=""
$while true; do
$ URL="$BASE/api/conversations?limit=20"
$ [ -n "$CURSOR" ] && URL="$URL&nextCursor=$CURSOR"
$ RESP=$(curl -s "$URL" \
> -H "Authorization: Bearer $KEY" -H "X-User-Id: $USER")
$ echo "$RESP" | jq '.conversations'
$ CURSOR=$(echo "$RESP" | jq -r '.nextCursor // empty')
$ [ -z "$CURSOR" ] && break
$ sleep 1
$done

Endpoints Using Cursor Pagination

EndpointParameterDefault Limit
GET /api/conversationsnextCursor20

LinkedIn Search Limits

LinkedIn returns a maximum of approximately 1,000 results for any search query, regardless of the total number of matches. Use specific keywords and filters to narrow your results rather than trying to paginate through everything.

Endpoint TypeDelay Between Pages
Search (people, companies, content)3-5 seconds
Conversations1-2 seconds
Feed2-3 seconds
SalesNav3-5 seconds

Adding delays between pagination requests reduces the risk of LinkedIn rate limiting.