SDK ReferencePython SDK
Fetch
API functions for the Fetch resource.
Fetch
Functions for interacting with the fetch API resource. Each operation ships in four forms — sync / sync_detailed and their async counterparts.
Get Fetch
Fetch a URL (GET)
Fast-path HTTP fetch. Response body IS the content; metadata in X-Fetch-* headers.
Omit format for raw passthrough. Use format=markdown or format=html for conversion.
Parameters
url_query (str)format_ (GetFetchFormat | Unset)country (str | Unset): Default: 'US'.timeout_ms (int | Unset): Default: 60000.cache_ttl (GetFetchCacheTtlType1 | str | Unset): Default: '48h'.
Call styles
sync_detailed(client, url_query, format_, country, timeout_ms, cache_ttl) -> Response[str]
sync(client, url_query, format_, country, timeout_ms, cache_ttl) -> str | None
await asyncio_detailed(client, url_query, format_, country, timeout_ms, cache_ttl) -> Response[str]
await asyncio(client, url_query, format_, country, timeout_ms, cache_ttl) -> str | NonePost Fetch
Fetch a URL (POST)
Same as GET /v1/fetch but with a JSON request body.
Parameters
body (FetchRequest)
Call styles
sync_detailed(client, body) -> Response[str]
sync(client, body) -> str | None
await asyncio_detailed(client, body) -> Response[str]
await asyncio(client, body) -> str | None