Cloudflare Pages Function — returns scraped data as JSON.
GET /api/scrape — scrape all 104 pages
GET /api/scrape
GET /api/scrape?from=1&to=10 — scrape a page range
GET /api/scrape?from=1&to=10
GET /api/scrape?page=1 — single page (for testing)
GET /api/scrape?page=1
{
"total": 5200,
"pages_scraped": 104,
"data": [
{
"rank": 1,
"physics": 94.0,
"chemistry": 120.0,
"mathematics": 112.0,
"s1Total": 165.0,
"s2Total": 161.0,
"total": 326.0
},
...
]
}
concurrency — parallel page fetches, default 10, max 20from / to — page range (1–104)page — single page test mode