---
title: "Scrape URL"
method: POST
path: "/v1/scrape"
---

# Scrape URL

`POST /v1/scrape`

Render a URL in a browser and return the page content as HTML or Markdown.

## Request body

- object
  - `url` string, uri, required — URL to scrape.
  - `output` 'html' | 'md' — Response format. Defaults to html.
  - `smartdoor` object — Browser rendering, waiting, retry, and node options for the scrape.
    - `nodes` object[] — Preferred hosted node configurations. Multiple entries mean any match is acceptable.
      - `type` 'hosted' — Use hosted Driver infrastructure.
      - `country` string — Preferred 2-letter country code.
    - `timeout` integer — Overall scrape timeout in milliseconds.
    - `delay` integer — Additional delay in milliseconds after the page settles before capture.
    - `retryFresh` boolean — Retry with a fresh browser context when a scrape attempt should be retried.
    - `retryCount` integer — Maximum number of retry attempts.
    - `refreshWhile` object — Refresh the page while an in-page JavaScript expression evaluates truthy.
      - `expression` string — Synchronous JavaScript expression evaluated in the page. Refreshing continues while it returns truthy.
      - `maxRefreshes` integer — Maximum number of page refreshes.
      - `minDelayMs` integer — Minimum delay before each refresh in milliseconds.
      - `maxDelayMs` integer — Maximum delay before each refresh in milliseconds.
    - `waitForSelector` string — CSS selector to wait for before capture.
    - `waitForSelectorValue` string — Text content the selector element must contain before capture.
    - `waitForFunction` string — Synchronous JavaScript expression that must evaluate truthy before capture.
    - `challengeBudget` integer — How long to wait for an anti-bot challenge to resolve, in milliseconds.

## Response `200`

Successfully scraped the URL. The response body is the scraped content.

## Other responses

- `401` — Missing or invalid token.
- `500` — Scrape failed.

## Changes

- **2026-06-10** `fe4827822116` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/browsercash/apis/driver-api/changes/v1/scrape/post.md)

---

[API](https://skmtc.dev/browsercash/apis/driver-api.md) · [All operations](https://skmtc.dev/browsercash/apis/driver-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/browsercash/driver-api/revisions/fe4827822116/schema)
