# Sorting & pagination

By default, results are sorted by the primary key of the underlying table. You can change the sorting by using the `order` query parameter. To limit the number of results, use the `limit` and `offset` query parameters. The API will return at most 1000 results per request. The `Content-Range` header of the response holds the total number of matching rows. For more advanced sorting and pagination options refer to [the PostgREST documentation](https://docs.postgrest.org/en/v14/references/api/tables_views.html#ordering).

Sorting by creation date

```
curl "https://api.cv-transformer.com/v1/layouts?order=created_at.desc" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Limiting the number of results

```
curl "https://api.cv-transformer.com/v1/layouts?limit=10&offset=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```
