Skip to content

Web scrape

Fetch and render a single web page and get its content back as LLM-ready markdown (and/or raw HTML and links). The orchestrator exposes this via the webScrape step, backed by a self-hosted headless-browser scraper, so JavaScript-rendered pages work too.

WARNING

Swap https://example.com for the page you actually want to scrape.

The request shape

Every request is a single webScrape step on SubmitWorkflow:

json
{
  "$type": "webScrape",
  "input": {
    "url": "https://example.com",
    "formats": ["markdown"]
  }
}

Operations

Scrape

http
POST https://orchestration.civitai.com/v2/consumer/workflows?wait=30
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "steps": [{
    "$type": "webScrape",
    "input": {
      "url": "https://example.com",
      "formats": ["markdown", "links"]
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Parameters

FieldDefaultAllowedNotes
url— ✅absolute http(s) URLThe page to scrape.
formats["markdown"]markdown, html, linksWhich content representations to return.

Reading the result

json
{
  "status": "succeeded",
  "steps": [{
    "name": "0",
    "$type": "webScrape",
    "status": "succeeded",
    "output": {
      "markdown": "Example Domain\n==============\n\nThis domain is for use in...",
      "html": null,
      "links": ["https://iana.org/domains/example"],
      "title": "Example Domain",
      "description": null,
      "statusCode": 200
    }
  }]
}

Only the requested formats are populated. Very large pages are truncated to keep outputs bounded. Identical scrapes are cached for a while.

To scrape many URLs from a search, combine with webSearch and a repeat step:

json
{
  "steps": [
    {
      "$type": "webSearch",
      "name": "search",
      "input": { "query": "civitai lora training guide", "limit": 3 }
    },
    {
      "$type": "repeat",
      "input": {
        "for": { "$ref": "search", "path": "output.results", "as": "result" },
        "template": {
          "$type": "webScrape",
          "name": "page",
          "input": { "url": { "$ref": "result", "path": "url" } }
        }
      }
    }
  ]
}

Runtime

VariantPer-call wall timewait recommendation
Static page1–5 swait=30
JavaScript-heavy page5–20 swait=30

For anything past the 100 s request timeout, use webhooks — see Results & webhooks.

Cost

Billed in Buzz on the workflow's transactions. Use whatif=true for an exact preview; see Payments (Buzz).

OperationBuzz
Scrape1

Troubleshooting

SymptomLikely causeFix
Step failed with an upstream errorThe site blocked the request or timed outHeavily bot-protected sites can't be scraped by the self-hosted stack — there is no stealth/anti-bot layer.
markdown empty but statusCode: 200Page renders entirely client-side after load eventsRetry; some pages need a moment — or request html and parse yourself.
400 on submiturl not an absolute http(s) URLInclude the scheme, e.g. https://.

Civitai Developer Documentation