Getting started
Quickstart
From an API key to a scraped page.
1. Get a key
Sign in to the console and create an API key under Settings.
Registration is closed in production, so accounts are created by hand. If you do not have one, ask us.
2. Make a request
curl -X POST 'https://api.helicitylabs.com/scrape' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{
"url": "https://example.com",
"render_js": false,
"proxy_type": "datacenter"
}'
url and proxy_type are the only required fields. This example sets
render_js: false because example.com needs no JavaScript — that is also the
cheapest combination, at 1 credit.
3. Read the response
{
"ok": true,
"url": "https://example.com",
"final_url": "https://example.com",
"status": 200,
"body": "<!doctype html>...",
"body_length": 1256,
"body_encoding": "utf-8",
"content_type": "text/html; charset=utf-8",
"elapsed_ms": 340,
"blocked": false,
"block_reason": null,
"redirects": []
}
Check ok first, then status. They are different questions: ok is whether
we reached the site, status is what the site said. A 404 from the target is
ok: true with status: 404 — we did our job, the page is not there.
blocked: true means the response looks like an anti-bot challenge rather
than the page you wanted. It still counts as a delivered run; see
Credits.
4. Decide what you need
The defaults are deliberately plain. Reach for more only when a site needs it:
- The page renders client-side → keep
render_js: true(the default). - The site blocks datacenter IPs →
"proxy_type": "premium". - You need a specific country → add
country_code. See Proxies. - The data is behind a login → see Sessions and logins.