DocumentationAPI DetailsScrape URLHTML or Markdown Response

HTML or Markdown Response

By default, ScrAPI returns results wrapped in a JSON envelope that includes metadata (duration, credits used, cookies, headers, etc.). If you only need the raw content, you can set the responseFormat parameter to HTML or Markdown to receive just the page content directly.

  • HTML - Returns the full HTML source with Content-Type: text/html.
  • Markdown - Returns a clean Markdown conversion of the page content with Content-Type: text/markdown.

When To Use This

  • RAG and LLM pipelines - Markdown is ideal for feeding web content into AI models. It’s clean, token-efficient, and preserves document structure without HTML noise.
  • Browser proxying - Use HTML format to proxy ScrAPI responses directly into a browser or iframe.
  • Content archival - Save raw HTML or Markdown without having to parse JSON first.
  • Simplified integrations - Skip JSON parsing when all you need is the page content.
  • AI agent workflows - The MCP Server uses these formats to return content to LLMs.

Response Headers

When using HTML or Markdown format, the metadata normally returned in the JSON body is provided via response headers instead:

HeaderDescription
X-ScrAPI-DurationTime taken to perform the scrape operation.
X-ScrAPI-AttemptsNumber of retry attempts made.
X-ScrAPI-CreditsUsedCredits consumed by this request.
X-ScrAPI-CookiesSemi-colon separated cookie key/value pairs from the response.
X-ScrAPI-HeadersSemi-colon separated header key/value pairs from the response.
X-ScrAPI-ScreenshotUrlURL to download the screenshot (if requested).
X-ScrAPI-PdfUrlURL to download the PDF (if requested).
X-ScrAPI-VideoUrlURL to download the video recording (if requested).
X-ScrAPI-CaptchasSolvedCaptcha types and count of solves.
X-ScrAPI-ErrorMessagesErrors encountered during scraping or browser command execution.

Example Request

GET https://api.scrapi.tech/v1/scrape?url=https://deventerprise.com&responseFormat=HTML

POST https://api.scrapi.tech/v1/scrape

HTML Format

{
  "url": "https://deventerprise.com",
  "responseFormat": "HTML"
}

Markdown Format

{
  "url": "https://deventerprise.com",
  "responseFormat": "Markdown"
}
  • Response Selector - Combine with a CSS or XPath selector to extract only specific content from the HTML or Markdown response.
  • MCP Server - The MCP tools return content in HTML or Markdown format for AI consumption.
  • Real Browser - Works with all response formats; use a browser when the page requires JavaScript rendering.

Testing

Test this request in the Playground or view the OpenAPI specification.