Choose a page size
Employee search uses one-based page numbers. Start atpage: 1.
These limits apply to employee search. Check the corresponding reference for group listing and other paginated operations.
Continue while hasMore is true
Search responses includepagination.page, pagination.pageSize, and pagination.hasMore. Keep your filters and sort consistent and increment page until hasMore is false. Empty matches and pages beyond the end return an empty list.
This shell example uses curl and jq, with the environment variables from Making requests. It prints one employee object per line:
Retry-After handling. Coordinate pacing across concurrent workers that share credentials.
Include archived employees
The filter defaults toCURRENT. Change the loop’s filter to status: "FORMER" for archived employees or status: "ALL" for current and former employees. Set ALL on nested filters too if they should match archived employees.
Request totals only when needed
Addinclude: { "total": true } to a search body when you need the total number of matches:
pagination.total. Otherwise, total is omitted and the extra count is skipped. You don’t need a total to iterate: use hasMore.
For only a count, use Count matching employees. Send {} when you have no filters. Counts return { "total": number } and don’t take page fields.