Interview practice question
Adding pagination to a list endpoint
Backend Engineering · API Design · Beginner
Your GET /orders endpoint returns all orders and is getting slow. How would you add pagination?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Add limit with max cap.
- Cursor based on created_at + id.
- Return next_cursor.
- Index matching sort order.
- Keep default page size small.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.