Pagination
All list endpoints in the Parsify API return paginated responses. The API uses page-based pagination with a standard envelope format.
Response Format
{
"count": 142,
"next": "https://api.parsifyhq.com/api/v1/documents/?page=2",
"previous": null,
"results": [...]
}| Field | Type | Description |
|---|---|---|
count | integer | Total number of results across all pages. |
next | string | null | URL for the next page, or null if this is the last page. |
previous | string | null | URL for the previous page, or null if this is the first page. |
results | array | The items for the current page. |
Iterating Through Pages
Follow the next URL until it returns null to retrieve all results.
URL="https://api.parsifyhq.com/api/v1/documents/"
while [ "$URL" != "null" ]; do
RESPONSE=$(curl -s "$URL" \
-H "X-API-Key: YOUR_API_KEY")
echo "$RESPONSE" | jq '.results'
URL=$(echo "$RESPONSE" | jq -r '.next')
doneQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | The page number to retrieve. |
page_size | integer | 20 | Number of results per page (max 100). |
Example:
curl "https://api.parsifyhq.com/api/v1/documents/?page=3&page_size=50" \
-H "X-API-Key: YOUR_API_KEY"