DocsAPI ReferenceScrape a page
POST/v1/scrape

Scrape a page

Scrapes a single URL using a headless Playwright browser. Handles JavaScript-rendered content, cookie consent overlays, and lazy-loaded images. Returns the page content in one or more formats.

Request body

NameTypeRequiredDescription
urlstringrequiredThe URL to scrape
formatsstring[]optionaldefault: ["markdown"]Content formats to return. Options: "markdown", "html", "text", "links"
waitForSelectorstringoptionalCSS selector to wait for before extracting content
timeoutnumberoptionaldefault: 30000Navigation timeout in milliseconds (1000-60000)

Example

bash
curl -X POST http://localhost:3000/v1/scrape \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","formats":["markdown"]}'

Response

bash
{
  "success": true,
  "data": {
    "url": "https://example.com",
    "title": "Example Domain",
    "markdown": "# Example Domain\n\nThis domain is for use in examples...",
    "html": "<html>...</html>",
    "metadata": { "statusCode": 200, "loadedAt": "2026-06-13T10:00:00Z" }
  }
}

Try it

Live preview only works when the API is running on your machine.

Run docker compose up and the Try-It panel will become interactive. Until then, copy the curl example below.