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. Most requests return synchronously in under a second; requests that need a full page render (cookies, wait conditions) return asynchronously, typically within a few seconds.
Parameters
body (ScrapeRequest)
Call styles
sync_detailed(client=client, body=body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
sync(client=client, body=body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None
await asyncio_detailed(client=client, body=body) -> Response[ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
await asyncio(client=client, body=body) -> ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | NoneGet Scrape
Get scrape result
Always returns 200. Check the status discriminator for the scrape state.
Parameters
id (str)
Call styles
sync_detailed(id=id, client=client) -> Response[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
sync(id=id, client=client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None
await asyncio_detailed(id=id, client=client) -> Response[Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope]
await asyncio(id=id, client=client) -> Error | ScrapeErrorEnvelope | ScrapeQueuedEnvelope | ScrapeSuccessEnvelope | None