SDK ReferencePython SDK

Scrape

API functions for the Scrape resource.

Scrape

Functions for interacting with the scrape API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.

Create Scrape

Scrape a URL

Fetches and processes a URL, returning content in one or more formats wrapped in a ScrapeEnvelope. Simple requests use the HTTP fast-path (~500ms); complex requests (cookies, wait conditions) use headless Chromium (3-15s).

Parameters

  • body (ScrapeRequest)

Call styles

sync_detailed(client, body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
sync(client, body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None
await asyncio_detailed(client, body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
await asyncio(client, body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None

Get Scrape

Get scrape result

Always returns 200. Check the status discriminator for the scrape state.

Parameters

  • id (str)

Call styles

sync_detailed(id, client) -> Response[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
sync(id, client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None
await asyncio_detailed(id, client) -> Response[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
await asyncio(id, client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None