Catalog108 / challenges / api/rest/paginated-cursor
Paginated REST API (cursor-based)
What this challenge teaches
Teaches: Follow opaque next_cursor tokens until null.
Expected output: All products by following next_cursor chain.
Submit your scraper's JSON output to /challenges/api/rest/paginated-cursor/grade
(grader endpoint is part of a later phase; URL is reserved now).
# Walk via next_cursor until null
import requests
cursor = None
while True:
params = {"json": 1}
if cursor: params["cursor"] = cursor
r = requests.get("https://practice.scrapingcentral.com/challenges/api/rest/paginated-cursor", params=params).json()
for it in r["items"]: print(it["sku"])
cursor = r["next_cursor"]
if not cursor: break