Dashboard

Scrape API

Extract content from web pages in multiple formats.

Scrape a URL

POST /api/v1/scrape
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "url": "https://example.com",
  "formats": ["markdown", "html", "links"],
  "onlyMainContent": true,
  "timeout": 30000
}

Parameters

FieldTypeRequiredDescription
urlstringYesURL to scrape
formatsstring[]NoOutput formats: markdown, html, rawHtml, links, screenshot, json
onlyMainContentbooleanNoExtract main content only (strips nav, footer, etc.)
includeTagsstring[]NoOnly include these HTML tags
excludeTagsstring[]NoExclude these HTML tags
headersobjectNoCustom request headers
waitFornumberNoWait ms after page load
timeoutnumberNoRequest timeout in ms

Response

{
  "success": true,
  "data": {
    "markdown": "# Page Title\n\nContent...",
    "html": "<h1>Page Title</h1>...",
    "links": ["https://example.com/page1", "https://example.com/page2"],
    "metadata": {
      "title": "Example Page",
      "description": "A description",
      "language": "en",
      "statusCode": 200
    }
  }
}

Batch Scrape

POST /api/v1/scrape/batch
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "urls": [
    "https://example.com/page1",
    "https://example.com/page2",
    "https://example.com/page3"
  ],
  "formats": ["markdown"]
}

Credits: 1 per URL in the batch.


Async Scrape

POST /api/v1/scrape/async
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "url": "https://example.com",
  "formats": ["markdown"]
}

Response:

{
  "success": true,
  "data": {
    "id": "scrape_abc123"
  }
}

Check Status

GET /api/v1/scrape/async/:id

AI Extraction

Use AI to extract structured data from pages:

POST /api/v1/scrape
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "url": "https://example.com/products",
  "formats": ["json"],
  "extract": {
    "prompt": "Extract all product names and prices",
    "schema": {
      "type": "object",
      "properties": {
        "products": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": { "type": "string" },
              "price": { "type": "number" }
            }
          }
        }
      }
    }
  }
}