MrScraper icon

MrScraper

Interact with the MrScraper API

Extraction → Fetch Rendered HTML

AI-generated

Summary

Fetches the fully rendered HTML of a target URL using a stealth browser and optionally returns screenshots, Markdown, and extracted structured data.

Inputs

  • url (required) — Target URL to fetch using the stealth browser.
  • maxRetries — Maximum number of retry attempts when the request fails.
  • timeout — Maximum number of seconds to wait for the page to load.
  • geoCode — Country code used for geolocation.
  • proxyCountry — Country code for the proxy location.
  • screenshot — Whether to capture and return a screenshot.
  • html — Whether to include the rendered HTML in the response.
  • markdown — Whether to include Markdown converted from the rendered page in the response.
  • blockResources — Whether to block images, fonts, and stylesheets from loading.
  • homePage — Whether to navigate via the site home page first before the target URL.
  • returnCookie — Whether to include browser cookies in the response.
  • super — Whether to use a real device for websites that require stronger scraping capabilities.
  • tokenCap — Maximum token allowance for processing the scraped content.
  • waitForSelector — Optional CSS selector to wait for before returning the page.
  • waitUntil — Browser lifecycle event to wait for before returning the page.
  • batching — Configuration for batching items per batch and batch interval.
  • allowUnauthorizedCerts — Whether to accept the response even if SSL certificate validation is not possible.
  • proxy — HTTP proxy to use.

Output shape

A list of items (one per input URL). Each item contains the rendered HTML (binary or string), optional Markdown, optional screenshot (binary), and extracted structured data (JSON).

Structured data extraction is schema-agnostic and requires a separate operation to define the target data type (e.g., Article, Product).

Examples

Example 1: Basic HTML fetch

Set URL, enable HTML return, enable Markdown return, disable screenshot.

Example 2: Fetch with specific geolocation

Set URL, specify geoCode 'gb' and proxyCountry 'gb', enable HTML and Markdown returns.

Example 3: Fetch with screenshot

Set URL, enable screenshot, set screenshotMode to 'full', enable HTML return.

Links

Discussion