Guides

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
}
FieldTypeDescription
totalnumberTotal number of records matching your query
limitnumberPage size used
offsetnumberCurrent offset
has_morebooleanWhether more pages exist

Limits

  • Default page size: 50
  • Maximum page size: 100
  • Minimum page size: 1

Common Filters

Candidates

ParameterDescription
searchSearch by name or email
tagFilter by tag
sourceFilter by source (api, referral, linkedin, etc.)
created_afterISO 8601 date - only candidates created after this
created_beforeISO 8601 date - only candidates created before this

Jobs

ParameterDescription
statusopen, closed, draft, archived, all
department_idFilter by department UUID
location_typeonsite, remote, hybrid

Applications

ParameterDescription
job_idFilter by job UUID
statusapplied, screening, interview, offer, hired, rejected
candidate_idFilter by candidate UUID

Interviews

ParameterDescription
application_idFilter by application UUID
statusscheduled, completed, cancelled
scheduled_afterISO 8601 date
scheduled_beforeISO 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;
}