Browse documentation

Browser interactions

Click, type, select and reuse browser state before capture.

Run safe actions

Scrape and Extract execute up to 12 actions in order in a real Chromium page. An action failure stops the sequence and returns ACTION_FAILED. Crawl and Watch do not accept actions.

POST /scrape
{
  "url": "https://example.com/catalog",
  "formats": ["markdown", "screenshot"],
  "actions": [
    { "type": "click", "selector": "#filters" },
    { "type": "select", "selector": "#category", "value": "books" },
    { "type": "wait", "milliseconds": 500 }
  ]
}

Action fields and limits

Click uses selector and optional download. Type uses selector and text. Press uses selector and an allowlisted key. Select uses selector and option value. Scroll uses up/down and 1–2,000 pixels. Wait accepts 50–5,000 ms. Total explicit wait is 10 seconds, selectors are 500 characters, each typed value is 2,000 characters and total typed text is 8,000.

Arbitrary JavaScript, evaluate, filesystem paths, browser launch options and raw Playwright options are rejected.

Create and reuse a session

Sessions preserve cookies and local storage for one account and one origin. Transient sessions live 60–900 seconds. Set persist=true for encrypted restart persistence and a TTL up to 86,400 seconds.

Create, then reuse
{ "session": { "id": "account_session_01", "mode": "create", "ttlSeconds": 900 } }
{ "session": { "id": "account_session_01", "mode": "reuse" } }

Close the session

Delete the session after the workflow. Deletion closes the browser context and removes encrypted persistent state.

DELETE session
curl -X DELETE https://api.crawlkit.sh/browser-sessions/account_session_01 \
+  -H 'Authorization: ck_your_api_key'