Using an API
Say you have an arxiv.org API with three endpoints:
You call each one at
https://api.parse.bot/scraper/{scraper_id}/{endpoint_name}. GET endpoints take query-string params; the response is the endpoint’s own JSON. Grab your scraper_id from the API’s page in the dashboard (or the “Now plug it in” snippet).
Some endpoints are
POST instead of GET — send those params in a JSON body (-d '{"page": 1}' / json={...} / body: JSON.stringify(...)) instead of the query string. The endpoint’s page in the dashboard tells you which method it uses.Creating an API from code
This is the automated build flow: submit a URL, poll until it’s ready, then call it. Use it when you want to spin up APIs programmatically rather than in the dashboard.POST /dispatch, poll GET /dispatch/tasks/{id}, then call /scraper/{id}/{endpoint}.
Notes
- Reuse one HTTP client so connections are pooled across calls.
- Back off on
429. HonorRetry-Afterand theX-RateLimit-*headers. - Check the HTTP status, not just the body. A
502means the target site failed, a500means the scraper bugged out — they call for different handling. See Errors. - The standard library’s
urllibandrequestswork just as well ashttpx.