pub struct ScrapeRequestDto {Show 23 fields
pub async_: Option<bool>,
pub block_ads: Option<bool>,
pub body: Option<ScrapeRequestDtoBody>,
pub cache_only: Option<bool>,
pub dismiss_cookies: Option<bool>,
pub dismiss_popups: Option<bool>,
pub exclude_tags: Vec<String>,
pub formats: Vec<ScrapeRequestDtoFormatsItem>,
pub headers: HashMap<String, String>,
pub include_links: Option<bool>,
pub include_tags: Vec<String>,
pub json_options: Option<JsonOptionsDto>,
pub location: Option<LocationDto>,
pub max_age: Option<f64>,
pub method: ScrapeRequestDtoMethod,
pub only_main_content: Option<bool>,
pub prefer_structure: Option<bool>,
pub remove_base64_images: Option<bool>,
pub render: Option<bool>,
pub store_in_cache: Option<bool>,
pub timeout: Option<f64>,
pub url: String,
pub wait_for: Option<f64>,
}Expand description
ScrapeRequestDto
Fields§
§async_: Option<bool>Return a job id immediately instead of waiting for the result. Poll GET /v1/web/scrape/{id}. Opt in only: a synchronous call never degrades to a job id on its own, so you get a page or an error, not two response shapes.
block_ads: Option<bool>Remove ads and tracking elements. Default true.
body: Option<ScrapeRequestDtoBody>Request body, sent verbatim. Only used when method is POST. Set the content type yourself via headers; nothing is assumed about the format.
cache_only: Option<bool>Only serve from cache. If there is no fresh cached copy, return 404 instead of fetching.
Remove cookie and consent banners. Default true. Set false to keep them; a banner the site adds with scripts after load is kept only when the page is rendered.
dismiss_popups: Option<bool>Close newsletter and promotion popups when the page is rendered. Default true. Set false to keep them.
CSS selectors to strip before extraction.
formats: Vec<ScrapeRequestDtoFormatsItem>What to return. Omit for Markdown only. structured is the page’s own data (no LLM, cheapest); summary and json are LLM-backed and cost more.
headers: HashMap<String, String>Extra request headers to send when fetching the page.
include_links: Option<bool>Keep inline links in the markdown. By default links are kept wherever the page text carries them. Set true to keep them on every page, or false for the densest prose.
CSS selectors to keep. When set, only matching elements are considered.
json_options: Option<JsonOptionsDto>Schema and/or prompt for the json format. One is required when json is requested.
location: Option<LocationDto>§max_age: Option<f64>Serve from cache if a capture of this URL is younger than this many milliseconds. Omit for the default window, two days for a page and one hour for a feed; 0 always fetches fresh. Capped at 7 days.
method: ScrapeRequestDtoMethodHTTP method to fetch the URL with. Use POST for endpoints that only answer a POST, such as JSON and GraphQL APIs. Defaults to GET.
only_main_content: Option<bool>Return only the main content, dropping nav/boilerplate. Default true.
prefer_structure: Option<bool>Preserve document structure (headings, lists, tables) over prose density — good for marketing and service pages. Default off.
remove_base64_images: Option<bool>Strip inline base64 images from the output. Default true.
render: Option<bool>Always read the page in a browser, as a visitor sees it once its scripts have run. Default false: the page is read in a browser only when its HTML is not enough. Combine with dismissCookies and dismissPopups set to false to keep what scripts add after load.
store_in_cache: Option<bool>Persist the capture for later re-extraction. Default true.
timeout: Option<f64>Overall time budget for the request, in milliseconds.
url: StringThe URL to scrape. Must be http(s); a bare domain such as example.com is read over https.
wait_for: Option<f64>Extra milliseconds to let the page settle before capture.