Parsers
A parser that reads a list returnscursor or page in data.json when there is more. Send the same request again with that value in the format’s options.
This asks for the second page of a Reddit search. The first response had "cursor": "MjQ=".
"cursor": "NDk=" for the page after. Keep the URL and the rest of the format the same between pages. The last page has no cursor.
A parser that takes page works the same way: send "options": {"page": 2}, then 3, until the results are empty. Each parser’s options are on its parser page and in the parser list. Each page is a new call and costs the parser’s price.
Crawl and batch scrape
Crawl and batch scrape answer at once with anid. Read the pages with crawl status or batch scrape status. Reading status is free, and it needs the same key.
A status answer holds up to 100 finished pages or 2 MB, whichever comes first. This is separate from the limit you sent to crawl, which is how many pages the crawl reads in all. A crawl with limit 30 is usually read in one status call once it is done, and one with limit 250 in three.
While the job runs, status is scraping. total is the number of pages found so far, and it grows. completed is how many are finished. data holds the finished pages. next appears only when more finished pages are waiting, so it never leads to an empty data.
- Poll the status URL every few seconds until
statusiscompleted,failedorcancelled. - Follow
nextuntil the answer has none. Eachnextis a full URL on api.stophy.dev. Call it with the same key.
https://api.stophy.dev/v1/batch/scrape/<id>. A crawl and its pages are kept for 24 hours.