DocumentationGet StartedQuickstart

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_KEY

The 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.

FieldWhat it does
x-api-tokenAuthenticates the request with your Scrapeless API key.
actorSelects Web Unlocker using its API identifier, unlocker.webunlocker.
input.urlSets the page to retrieve.
input.methodSets the method used for the target page. The request to Scrapeless itself uses POST.
input.redirectControls whether to follow redirects from the target page.
proxy.countryUses 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.json

A 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

SymptomWhat to check
The shell asks you to set SCRAPELESS_API_KEYRun step 1 in the same terminal.
Authentication errorCheck that the key is current and complete. Send its raw value in x-api-token, without a Bearer prefix.
Access or balance errorCheck Web Unlocker access and available balance in the dashboard.
Invalid request errorCompare the JSON and actor identifier with the example. Read the response body for the rejected field.
A successful response is missing the expected contentCheck the target URL, redirects, and whether JavaScript rendering is required.
Network error or timeoutCheck 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:

When you finish experimenting, remove the key from this terminal environment:

unset SCRAPELESS_API_KEY

This clears the local variable; it does not revoke the key.