Quickstart: Make your first Scrapeless request
Make your first Scrapeless request by retrieving a page with Web Unlocker. This example uses cURL and returns the result in the same HTTP response, so you can start without installing an SDK or polling a task.
Before you begin
You need a Scrapeless account with access to Web Unlocker, sufficient available balance for the request, and cURL in a local terminal. The commands below use Bash or Zsh on macOS or Linux.
Looking for browser automation, AI answers, or search results? You can go directly to Choose the right product.
1. Get your API key
Sign in to the Scrapeless dashboard, open the API key settings, and copy your key. For storage and security guidance, see Get and protect your API key.
In your terminal, run the following commands. Paste the key at the hidden prompt, then press Enter:
printf 'Scrapeless API key: '
read -rs SCRAPELESS_API_KEY
printf '\n'
export SCRAPELESS_API_KEYThe variable is available to commands launched from this terminal. Repeat this step in a new terminal session.
2. Send the request
Copy and run:
curl --silent --show-error \
--request POST 'https://api.scrapeless.com/api/v2/unlocker/request' \
--header "x-api-token: ${SCRAPELESS_API_KEY:?Set SCRAPELESS_API_KEY first}" \
--header 'Content-Type: application/json' \
--data '{
"actor": "unlocker.webunlocker",
"input": {
"url": "https://example.com/",
"method": "GET",
"redirect": false
},
"proxy": {
"country": "ANY"
}
}' \
--output scrapeless-response.json \
--write-out 'HTTP status: %{http_code}\n'This saves the response body to scrapeless-response.json and prints the HTTP status. The command does not follow API redirects or automatically retry the request.
| Field | What it does |
|---|---|
x-api-token | Authenticates the request with your Scrapeless API key. |
actor | Selects Web Unlocker using its API identifier, unlocker.webunlocker. |
input.url | Sets the page to retrieve. |
input.method | Sets the method used for the target page. The request to Scrapeless itself uses POST. |
input.redirect | Controls whether to follow redirects from the target page. |
proxy.country | Uses ANY when you do not need a specific proxy country. |
See the Web Unlocker API reference for the endpoint contract.
3. Inspect the result
cat scrapeless-response.jsonA successful response uses a JSON envelope with code and data. The following is an abbreviated illustration, not a recorded response:
{
"code": 200,
"data": "<!doctype html><html>...Example Domain...</html>"
}For this example, check that the HTTP status is 200, the response code is 200, and data contains the requested page content. A saved file alone does not establish that the request succeeded.
Your first request is complete when you can identify the Example Domain page in the returned content.
4. Use your own URL
Replace input.url with the page you want to retrieve and send the request again. If the target redirects, set input.redirect to true as needed.
The example above does not enable JavaScript rendering. For content loaded by scripts, follow the JavaScript rendering guide. For a managed website crawl or an interactive browser session, use the relevant product guide instead.
If the request fails
| Symptom | What to check |
|---|---|
The shell asks you to set SCRAPELESS_API_KEY | Run step 1 in the same terminal. |
| Authentication error | Check that the key is current and complete. Send its raw value in x-api-token, without a Bearer prefix. |
| Access or balance error | Check Web Unlocker access and available balance in the dashboard. |
| Invalid request error | Compare the JSON and actor identifier with the example. Read the response body for the rejected field. |
| A successful response is missing the expected content | Check the target URL, redirects, and whether JavaScript rendering is required. |
| Network error or timeout | Check connectivity and the target URL before retrying. Avoid repeatedly resubmitting an unchanged failing request. |
When asking for help, share the endpoint, time, HTTP status, and a redacted error response. Remove your API key and sensitive target data.
Next steps
Choose the product and interface that fit your workflow:
- Choose the right product for your actual workflow.
- Protect your API key before connecting a deployed application.
- Continue with the Web Unlocker guide.
- For source-specific data, use Google Search API, Amazon Scraper, or TikTok Scraper.
- Prefer a terminal workflow? The Scrapeless CLI is coming soon. Its guide will cover installation, configuration, and commands.
- Prefer an SDK? Start with Node.js. Python and Go SDKs are coming soon.
When you finish experimenting, remove the key from this terminal environment:
unset SCRAPELESS_API_KEYThis clears the local variable; it does not revoke the key.