`POST /webhook/scrape-wp`

Use this when you need more than one representation of the same page: structured data and

its markdown or HTML form.

Authentication: `x-api-key`.

Simple usage

curl -X POST https://api.jetscrape.com/webhook/scrape-wp \
  -H "Content-Type: application/json" \
  -H "x-api-key: js_YOUR_API_KEY" \
  -d '{
    "urls": ["https://example.com"],
    "selectors": [
      { "property_name": "title", "selector": "h1", "attribute_type": "TEXT" }
    ]
  }'

Formats

The `formats` array declares which outputs you want:

- `markdown` — the page converted to readable markdown.

- `html` — the raw HTML.

- `unblocker` — structured data extracted with your selectors.

{
  "urls": ["https://shop.example.com/listing"],
  "formats": [
    "markdown",
    "html",
    {
      "type": "unblocker",
      "selectors": [
        { "property_name": "page_title", "selector": "title", "attribute_type": "TEXT" },
        {
          "property_name": "products[]",
          "selector": ".product-card",
          "attribute_type": "OBJECT",
          "children": [
            { "property_name": "name", "selector": ".name", "attribute_type": "TEXT" },
            { "property_name": "price", "selector": ".price", "attribute_type": "TEXT" }
          ]
        }
      ],
      "options": { "wait_until": "networkidle", "wait_seconds": 3 }
    }
  ]
}

Fields of the `unblocker` format object:

- `type` (`"unblocker"`, required) — fixed value.

- `selectors` (array, required) — extraction rules.

- `options` (object, optional) — rendering, proxy and timing settings.

Response shape

Each format is returned under its own key.

{
  "markdown": "# Page Title\n\n...",
  "html": "<html>...</html>",
  "unblocker": {
    "page_title": "All Products",
    "products": [
      { "name": "Product A", "price": "$199" }
    ]
  }
}

Credit cost

- Automatic, on every request — +1

- `markdown` — +1

- `html` — +1

- `unblocker` — +4

For example `["markdown", { "type": "unblocker", ... }]` costs 1 + 1 + 4 = 6 credits.

If you only need structured data, leave `markdown` and `html` out. Each one adds a credit per

request for output you are not using.

Streaming with SSE

Long-running `scrape-wp` requests may stream their result:

- Expect `Content-Type: text/event-stream`.

- Keep the connection open until an event of type `result` arrives.

- Each line has the form `data: <JSON>` followed by a blank line.

- If the connection drops, fall back to `check-job` with the `dispatch_id`.

Last updated: September 22, 2026