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 needing a full page render return HTTP 202 and complete asynchronously.
Parameters
body (ScrapeRequest)
Call styles
sync_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]
sync(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]
await asyncio_detailed(client=client, body=body) -> Response[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]
await asyncio(client=client, body=body) -> Optional[Union[Error, ScrapeQueuedEnvelope, ScrapeSuccessEnvelope]]Get 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[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]
sync(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]
await asyncio_detailed(id=id, client=client) -> Response[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]
await asyncio(id=id, client=client) -> Optional[Union[Error, Union['ScrapeErrorEnvelope', 'ScrapeQueuedEnvelope', 'ScrapeSuccessEnvelope']]]