# Page through API lists
How list endpoints return records a page at a time, and how to follow the Link header to read every page.
List endpoints, such as products, orders and customers, return records a page at a time. Each page links to the next one with a cursor, so the pages stay in order even while new records arrive.
## Parameters
| Parameter | What it does |
| --- | --- |
| `limit` | How many records to return. The default is 50 and the most is 250. A larger number is cut to 250. A missing or zero value gives 50. |
| `page_info` | The cursor for the page you want. Take it from a `Link` header. Leave it out for the first page. |
Records come back in the order they were created, oldest first.
## Follow the Link header
A list response carries a `Link` header with the addresses of the pages next to it:
```
Link: <https://<crate-address>/api/v1/products?limit=50&page_info=eyJ...>; rel="next",
      <https://<crate-address>/api/v1/products?limit=50&page_info=eyJ...>; rel="previous"
```
- `rel="next"` appears only when more records follow.
- `rel="previous"` appears on every page after the first.
- A response with no `Link` header is the only page.
Use each address as it is. It keeps your other filters, so the next page uses the same filter.
> [!WARNING]
> `page_info` is a signed value. Don't build one by hand or change it. Crate ignores a value it can't verify and returns the first page again, which can make a loop run forever.
## Read every record
This loop reads every order and stops when there is no `rel="next"` link:
```bash
url="https://<crate-address>/api/v1/orders?limit=250"
while [ -n "$url" ]; do
  curl -s -D headers.txt "$url" -H "Authorization: Bearer $CRATE_API_KEY" >> orders.jsonl
  url=$(grep -i '^link:' headers.txt | grep -o '<[^>]*>; rel="next"' | sed 's/^<\(.*\)>;.*/\1/')
done
```
Do the same in your own code: follow the `next` link until it is gone. Don't count pages in advance.
## Tips
- Use `limit=250` for exports. It needs a fifth of the requests, which helps you stay under the [rate limit](/docs/developers/rate-limits).
- If you copy records into your own database, store each `id`. Update the record when it appears again, because records can change between pages.
- To react to changes as they happen, use [webhooks](/docs/developers/webhooks-overview) instead of reading the whole list on a timer.
