Bird
0
0

If an API returns 10 items per page and you request /products?page=1&limit=10, which items will you receive?

medium📝 Predict Output Q5 of 15
Rest API - Pagination Patterns
If an API returns 10 items per page and you request /products?page=1&limit=10, which items will you receive?
AItems 10 to 19
BItems 1 to 10
CItems 0 to 9
DItems 11 to 20
Step-by-Step Solution
Solution:
  1. Step 1: Understand page and limit meaning

    Page 1 means the first page, limit 10 means 10 items per page.
  2. Step 2: Identify item range for page 1

    Items start at 1, so page 1 includes items 1 through 10.
  3. Final Answer:

    Items 1 to 10 -> Option B
  4. Quick Check:

    Page 1 items = 1 to 10 [OK]
Quick Trick: Page 1 starts at item 1, not 0 [OK]
Common Mistakes:
  • Assuming zero-based indexing for pages
  • Confusing item ranges for pages
  • Mixing offset with page number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes