DocumentationAPI DetailsScrape URLHTML or Markdown Response

HTML or Markdown Response

This example shows how to change the response format from the API to HTML or Markdown content instead of the default JSON format.

This use HTML or Markdown responses, simply set the responseFormat parameter to HTML or Markdown. This will also change the Content-Type response header to text/html or text/markdown respectively.

This is useful if you want to proxy through ScrAPI using your own browser, automation implementation, RAG training, or simply don’t want to parse JSON to get the content. When using this option the other response values usually returned in JSON will be added as headers.

HeaderDescription
X-ScrAPI-DurationThe amount of time taken to perform the scrape operation.
X-ScrAPI-AttemptsThe number of attempts (retries) to perform the scrape operation.
X-ScrAPI-CreditsUsedThe number of credits used for the scrape operation.
X-ScrAPI-CookiesA semi-colon separated list of cookie key/value pairs that were part of the scrape response.
X-ScrAPI-HeadersA semi-colon separated list of header key/value pairs that were part of the scrape response.
X-ScrAPI-CaptchasSolvedThe name of captchas detected and how many times they were solved.
X-ScrAPI-ErrorMessagesA list of error messages that occurred during the scrape operation or while executing browser commands.

Example Request

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

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

Example For HTML

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

Example For Markdown

{
  "url": "https://deventerprise.com",
  "useBrowser": false,
  "responseFormat": "Markdown"
}

Testing

If you want to test this request or a variation of it, head to the Playground or the OpenAPI page.