Skip to content

Making requests

Endpoint: http://api.scraping.rayobyte.com/

Everything in the query string. Good for a quick fetch.

Terminal window
curl -G "http://api.scraping.rayobyte.com/" \
--data-urlencode "token=YOUR_TOKEN" \
--data-urlencode "url=https://example.com"

Use -G with --data-urlencode rather than building the string by hand. The url parameter is a URL inside a URL, and an unencoded & in your target ends the parameter early.

A JSON body instead. This is the form to use once you are sending options, because nothing needs encoding twice.

Terminal window
curl -X POST "http://api.scraping.rayobyte.com/?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","module":"HtmlRequestScraper"}'
import requests
r = requests.post(
"http://api.scraping.rayobyte.com/",
params={"token": "YOUR_TOKEN"},
json={"url": "https://example.com", "module": "HtmlRequestScraper"},
timeout=120,
)
print(r.text)
Field Required Description
token Yes Your API token. Always in the query string.
url Yes The page to fetch.
module No How the page is fetched and parsed. Defaults to a plain HTML fetch.

The full list is on Parameters.

module decides whether the page is fetched with a plain HTTP request, rendered in a real browser, or handled by an extractor written for that specific site.

HtmlRequestScraper is the general-purpose HTML fetch and the right default. See Modules.

We may render in a browser and retry several times before answering, so a single request can take tens of seconds. Set your client timeout to at least 120 seconds. Anything shorter will cut off requests that were going to succeed and you will still be billed for the work.

Send requests in parallel rather than raising your timeout and waiting. Each request is independent and there is no session to keep alive between them.

Was this page helpful?