Skip to content

Test

Status: NEEDS-ACCOUNT

Classification: NEEDS-ACCOUNT (cloud API) Install method: npm (npm install @scrapeless-ai/sdk) for the Node.js SDK client. No standalone pip package found. Cost tier: Free trial available. Paid plans for higher credit usage. See scrapeless.com for current pricing. What is required: An account at scrapeless.com and a valid API key (x-api-token header). All scraping runs in Scrapeless cloud.


Smoke Test: Account Endpoint (no browser required)

The fastest way to confirm your API key is valid and the service is reachable is to hit the /api/v1/me endpoint. This does not consume scraping credits.

bash
curl -s -X GET https://api.scrapeless.com/api/v1/me \
  -H "x-api-token: YOUR_API_KEY"

Success output

A valid API key returns a JSON object with account details. The exact shape varies by plan, but a successful response looks like:

json
{
  "code": 200,
  "message": "ok",
  "data": {
    "balance": 1234.56,
    "plan": "Regular",
    "email": "you@example.com"
  }
}

An invalid or missing API key returns HTTP 401 with a message such as {"code":401,"message":"Unauthorized"}.


Smoke Test: Universal Scraping API (consumes 1 CU)

This test confirms end-to-end scraping works. It sends one request through the Web Unlocker to httpbin.io/get, which echoes back the request headers Scrapeless sent. A successful response proves the unlocker pipeline (fingerprinting, proxy, JS render) is functioning.

bash
curl -s -X POST https://api.scrapeless.com/api/v2/unlocker/request \
  -H "Content-Type: application/json" \
  -H "x-api-token: YOUR_API_KEY" \
  -d '{
    "actor": "unlocker.webunlocker",
    "input": {
      "url": "https://httpbin.io/get",
      "redirect": false,
      "method": "GET"
    },
    "proxy": { "country": "ANY" }
  }'

Success output

The response body contains the rendered page content. For httpbin.io/get this will be a JSON object echoing the request, wrapped in a Scrapeless result envelope, for example:

json
{
  "code": 200,
  "message": "ok",
  "data": {
    "url": "https://httpbin.io/get",
    "content": "{\"args\": {}, \"headers\": {\"Host\": \"httpbin.io\", ...}, \"url\": \"https://httpbin.io/get\"}",
    "statusCode": 200
  }
}

Key signals that the test passed:

  • HTTP 200 from the Scrapeless API
  • "statusCode": 200 inside the data envelope (the target URL was reached)
  • "url": "https://httpbin.io/get" present in the content body

SDK Version Check

The SDK does not expose a --version CLI flag. To confirm the installed version:

bash
node -e "const p = require('./node_modules/@scrapeless-ai/sdk/package.json'); console.log(p.version)"

Or with npm:

bash
npm list @scrapeless-ai/sdk

Expected output:

scrapeless-sop@ /your/project
+-- @scrapeless-ai/sdk@x.y.z

Tested Status

The smoke tests above were not run locally during SOP authoring because they require a live Scrapeless API key and consume CUs. Document the tests as passing once you have verified them against your own account.