> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stockshift.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Lists that can grow return one page at a time with a cursor.

A list that can grow returns one page at a time:

```json theme={null}
{
  "data": {
    "items": [],
    "next_cursor": "eyJpZCI6IjAxSjhRWjRN..."
  }
}
```

Send `next_cursor` back as the `after` query parameter to get the next page, and stop when it is `null`:

```bash theme={null}
curl "https://app.stockshift.io/api/v1/catalog/items?after=eyJpZCI6IjAxSjhRWjRN..." \
  -H "Authorization: Bearer $STOCKSHIFT_TOKEN"
```

Treat the cursor as opaque. Don't parse it or build one yourself.

## With an SDK

Every SDK follows the cursors for you:

```ts TypeScript theme={null}
for await (const item of stockshift.paginate("/catalog/items", { query: { search: "bolt" } })) {
  console.log(item.sku);
}
```

```python Python theme={null}
for item in stockshift.catalog.iter_items(search="bolt"):
    print(item.sku)
```

```go Go theme={null}
for item, err := range client.Catalog.ListItemsAll(ctx, nil) {
	if err != nil {
		return err
	}
	fmt.Println(item.SKU)
}
```

Each SDK's page has the details.


## Related topics

- [.NET](https://docs.stockshift.io/sdks/dotnet.md)
- [Go](https://docs.stockshift.io/sdks/go.md)
- [PHP](https://docs.stockshift.io/sdks/php.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.