Pagination & Filtering
Navigate large datasets efficiently with offset-based pagination and powerful query filters.
Pagination
All list endpoints support limit and offset query parameters:
# First page (50 results)
GET /api/v1/candidates?limit=50&offset=0
# Second page
GET /api/v1/candidates?limit=50&offset=50
# Third page
GET /api/v1/candidates?limit=50&offset=100
Response Meta
Every paginated response includes a meta object:
{
"success": true,
"data": [...],
"meta": {
"total": 342,
"limit": 50,
"offset": 0,
"has_more": true,
"cursor": null
},
"errors": null
}
| Field | Type | Description |
|---|
total | number | Total number of records matching your query |
limit | number | Page size used |
offset | number | Current offset |
has_more | boolean | Whether more pages exist |
Limits
- Default page size: 50
- Maximum page size: 100
- Minimum page size: 1
Common Filters
Candidates
| Parameter | Description |
|---|
search | Search by name or email |
tag | Filter by tag |
source | Filter by source (api, referral, linkedin, etc.) |
created_after | ISO 8601 date - only candidates created after this |
created_before | ISO 8601 date - only candidates created before this |
Jobs
| Parameter | Description |
|---|
status | open, closed, draft, archived, all |
department_id | Filter by department UUID |
location_type | onsite, remote, hybrid |
Applications
| Parameter | Description |
|---|
job_id | Filter by job UUID |
status | applied, screening, interview, offer, hired, rejected |
candidate_id | Filter by candidate UUID |
Interviews
| Parameter | Description |
|---|
application_id | Filter by application UUID |
status | scheduled, completed, cancelled |
scheduled_after | ISO 8601 date |
scheduled_before | ISO 8601 date |
Example: Paginate Through All Candidates
async function getAllCandidates(apiKey) {
const all = [];
let offset = 0;
const limit = 100;
while (true) {
const res = await fetch(
`https://prepzo.ai/api/v1/candidates?limit=${limit}&offset=${offset}`,
{ headers: { Authorization: `Bearer ${apiKey}` } }
);
const json = await res.json();
all.push(...json.data);
if (!json.meta.has_more) break;
offset += limit;
}
return all;
}