Quickstart
-
Get your token.
Sign in to app.rayobyte.com and open Scraping API → Get Started. Your token is under API Token. One is created for you the first time you open that page.
-
Scrape a page.
Terminal window curl "http://api.scraping.rayobyte.com/?token=YOUR_TOKEN&url=https://example.com"import requestsr = requests.get("http://api.scraping.rayobyte.com/",params={"token": "YOUR_TOKEN", "url": "https://example.com"},timeout=120,)print(r.text)const url = new URL('http://api.scraping.rayobyte.com/');url.searchParams.set('token', process.env.RAYOBYTE_TOKEN);url.searchParams.set('url', 'https://example.com');const res = await fetch(url);console.log(await res.text()); -
Check your balance.
Terminal window curl "http://api.scraping.rayobyte.com/balance?token=YOUR_TOKEN"
URL-encode the target
Section titled “URL-encode the target”The url parameter is a URL inside a URL. If your target has its own query
string, encode it or everything after the first & is read as a parameter of
our request, not yours.
# Wrong. "page=2" is parsed as an argument to the Scraping API.curl "http://api.scraping.rayobyte.com/?token=T&url=https://example.com/s?q=x&page=2"
# Right.curl -G "http://api.scraping.rayobyte.com/" \ --data-urlencode "token=T" \ --data-urlencode "url=https://example.com/s?q=x&page=2"Set a generous timeout
Section titled “Set a generous timeout”We may render the page in a real browser and retry it several times before answering. A request can legitimately take tens of seconds. A 10-second client timeout will fail requests that were about to succeed.
What next
Section titled “What next”- Making requests: POST, modules and options
- Modules: choosing how the page is fetched
- Web Unblocker: the same engine as a proxy
Was this page helpful?
Thanks — that helps us fix it.