Pagination

Navigate large result sets with offset-based pagination

The PartsSource APIs use offset-based pagination for list and search endpoints. This provides predictable result ordering and consistent navigation through large datasets.


Request Format

Include pagination parameters in the request body for POST search endpoints:

{
  "filters": {
    "email": "[email protected]"
  },
  "pagination": {
    "limit": 50,
    "offset": 0
  }
}

GET Search Endpoints

GET search endpoints (e.g., /manufacturers/search, /users/search) use query parameter pagination instead of a request body. Pagination parameters are passed as URL query parameters alongside the q search query:

GET /orders/search?q=status:"Pending"&limit=25&offset=0
Parameter
Default
Constraints

limit

50

1–100

offset

0

>= 0

circle-info

GET search endpoints have a lower maximum limit of 100 compared to POST search endpoints (up to 10,000). Use filters in the q parameter to narrow results.

The response shape is the same — results in data.items with a data.pagination object:

For the full query syntax, operators, and field references, see Search Query Language.


Pagination Parameters

Parameter
Type
Default
Range
Description

limit

integer

50

1-10,000

Maximum records to return

offset

integer

0

0+

Number of records to skip

circle-info

The maximum limit per page is 500 records.


Response Format

Paginated responses include metadata alongside the results:

Response Metadata

Field
Type
Description

total

integer

Total records matching the query

limit

integer

Page size used

offset

integer

Records skipped

hasMore

boolean

true if more pages exist


Example: Fetching All Pages

Code Example


Validation & Normalization

Invalid pagination values are automatically corrected:

Input
Normalized To
Reason

limit: 50000

limit: 10000

Exceeds maximum

limit: -5

limit: 50

Below minimum (uses default)

offset: -10

offset: 0

Cannot be negative

circle-exclamation

Performance Considerations

Large Offsets

For very large result sets, performance may degrade with high offset values:

Offset Range
Performance

0 - 10,000

Excellent

10,000 - 100,000

Good

100,000+

May be slower

Recommendations for large datasets:

  1. Use filters to reduce the result set size

  2. Use keyset pagination for sequential processing (if supported)

  3. Cache results when possible

  4. Process incrementally rather than loading all data at once

Efficient Pagination Patterns


Complete Request Example

cURL

Response


TypeScript Helper

Last updated