Pagination
OpenMetadata uses both cursor-based and offset-based pagination, depending on the endpoint. Most top-level entity list endpoints use cursor-based pagination for stable traversal, while many sub-resource and specialized endpoints uselimit plus offset.
Pagination Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | Varies by endpoint | Page size. Many top-level entity list endpoints default to 10 and allow up to 1,000,000, while offset-based sub-resource endpoints often use lower defaults and caps, such as 1,000 for table columns. |
before | string | - | Cursor for the previous page on cursor-paginated endpoints |
after | string | - | Cursor for the next page on cursor-paginated endpoints |
offset | integer | When supported | Row offset on offset-paginated endpoints. If omitted, the endpoint starts from the first page. |
Response Fields
Thepaging object varies by endpoint. Cursor-paginated responses usually include:
| Field | Type | Description |
|---|---|---|
total | integer | Total count of matching resources |
before | string | Cursor for the previous page (if available) |
after | string | Cursor for the next page (if available) |
total, and may include offset, limit, or cursor-style before/after fields depending on the resource. Check the endpoint schema for the exact response shape.
Examples
Basic Pagination
Basic Pagination
Offset-Based Pagination
Useoffset on endpoints that document it, such as /v1/tables/{id}/columns:
Iterating Through All Results
Iterating Results
Filtering with Pagination
Combine pagination with filters for efficient data retrieval:Filtering
Include Fields
Control which fields are returned in the response using thefields parameter:
owner- Include owner informationtags- Include tags and classificationscolumns- Include column definitionsfollowers- Include followerstableConstraints- Include constraintsusageSummary- Include usage statistics
Best Practices
Use reasonable page sizes
Start with
limit=50-100. Larger pages reduce API calls but increase memory usage.Follow cursor pages sequentially
On cursor-paginated endpoints, always use the returned
before and after cursors. Don’t try to construct cursor values manually.Keep offset paging stable
On offset-paginated endpoints, keep filters and sort order fixed while incrementing
offset predictably from one page to the next.Handle empty results
Use the endpoint’s pagination signal to detect the end of results, such as a missing
after cursor or an empty page.Request only needed fields
Use the
fields parameter to reduce response size and improve performance.Pagination vs Search
For finding specific resources, consider using the Search API instead of paginating through all results:Search API
Learn about searching and filtering metadata