Bird
0
0

If an API request uses limit=5 and offset=10, which items will it return?

easy📝 Conceptual Q2 of 15
Rest API - Query Parameters and Filtering

If an API request uses limit=5 and offset=10, which items will it return?

AItems 5 to 10
BItems 11 to 15
CItems 1 to 5
DItems 10 to 14
Step-by-Step Solution
Solution:
  1. Step 1: Understand offset indexing

    Offset 10 means start from the 11th item (counting from zero).
  2. Step 2: Apply limit to count items

    Limit 5 means return 5 items starting from item 11, so items 11 to 15.
  3. Final Answer:

    Items 11 to 15 -> Option B
  4. Quick Check:

    Offset 10 + Limit 5 = Items 11-15 [OK]
Quick Trick: Offset starts at zero, so offset 10 means item 11 [OK]
Common Mistakes:
  • Counting offset as item number instead of zero-based index
  • Mixing up limit and offset roles
  • Assuming offset is inclusive of the limit count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes