Playwright:1.58

scraperouter/playwright:1.58

This scraper is based on an open-source project. We do not profit from it; you pay only for computation and proxy costs.

https://playwright.dev/

Request Cost*
$0.000090
$0.0900/1k
JS Rendering
Yes
Speed
Stealth

*Datacenter proxy transfer is included in the request cost. Additional transfer: Residential +$1.80/GB , Mobile +$4.00/GB

Request Options

Common Fields

Field Type Required Default Description
url string required - Target URL to scrape
scraper string required - Scraper identifier
method string optional GET HTTP method (GET or POST)
headers object optional - HTTP headers dict
cookies array[object] optional - List of cookie dicts
data any optional - Request body data for POST requests
proxy string | object optional datacenter Proxy type (datacenter/residential/mobile) or URL or config object
scraper_options object optional - Scraper-specific options (see below)

Scraper-Specific Options (passed via scraper_options)

Field Type Required Default Description
timeout number optional -
wait_for_selector string optional -
wait_for_timeout number optional -
wait_for_load_state string optional -
screenshot boolean optional -
headless boolean optional True
proxy object optional -

Response Schema

API Response

The API returns a unified response envelope. The content field contains the raw page HTML.

Field Type Description
id string (uuid) Unique request identifier
status_code integer HTTP status code
url string Final response URL
headers object Response HTTP headers
content string Page content (HTML)
scraper string Scraper identifier used

Universal Response (internal)

Internally, all scrapers normalize their output to a universal format before the API response is built.

Field Type
id string
status_code integer
final_url string
headers object
content string
cookies array | object
errors array[any]
screenshot_url string
scraper_data object
scraperouter ScrapeRouterResponseData

Scraper-Specific Response Fields

The native response from this scraper includes additional fields beyond the universal format.

Field Type Default
status integer -
url string -
headers object -
request_headers object -
text string -
content string -
screenshot_paths array[any] -
elapsed number -
error string -

Examples

Simple Request (cURL)

curl -X POST https://www.scraperouter.com/api/v1/scrape/ \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "scraper": "scraperouter/playwright:1.58"}'

Simple Request (Python)

import requests

response = requests.post(
    "https://www.scraperouter.com/api/v1/scrape/",
    headers={"Authorization": "Api-Key YOUR_API_KEY"},
    json={
        "url": "https://example.com",
        "scraper": "scraperouter/playwright:1.58",
    },
)

data = response.json()
print(data["content"][:500])

Advanced Request (Python)

import requests

response = requests.post(
    "https://www.scraperouter.com/api/v1/scrape/",
    headers={"Authorization": "Api-Key YOUR_API_KEY"},
    json={
        "url": "https://example.com",
        "scraper": "scraperouter/playwright:1.58",
        "method": "GET",
        "proxy": "residential",
        "scraper_options": {
            "timeout": 30,
            "wait_for_selector": "#content",
            "headless": true
    },
    },
)

data = response.json()
print(f"Status: {data['status_code']}")
print(f"URL: {data['url']}")
print(data["content"][:500])

Example Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status_code": 200,
  "url": "https://example.com",
  "headers": {
    "content-type": "text/html; charset=utf-8"
  },
  "content": "<!DOCTYPE html><html>...</html>",
  "scraper": "scraperouter/playwright:1.58"
}