Skip to navigation

Extract

View as MarkdownOpen in Claude

The Extract API fetches any webpage or PDF and parses it into clean Markdown or HTML. Use it after a Web Search API call, when your agent needs the full document, such as a filing, a contract, or a research paper, instead of a highlight.

PDF tables come back as Markdown or HTML tables with rows and columns intact. Set parse_effort=standard to also send complex PDF pages, such as charts and images, through an advanced model for the most complete output.

Authentication

X-API-Keystring

A unique API Key is required to authorize API access. Get your API Key with free credits.

Request

This endpoint expects an object.
urlstringRequiredformat: "uri"
The URL to extract content from.
full_pageobjectOptional
Options for the returned page content. When omitted, the page is returned as Markdown.
extraction_sourceenumOptionalDefaults to blend

Indicates where full_page content comes from.

blend serves cached content when it is available and crawls the page live when it is not. This is the default.

cache returns cached content only. It is the fastest option, and contents is omitted for results that have no cached content.

fetch always crawls the page live, which returns the freshest content at the cost of higher latency.

Allowed values:
timeoutintegerOptional2-100Defaults to 30
Seconds the request may take end to end, including the cache lookup and the crawl. Must be between 2 and 100. Default is 30. Past it the request returns a 504.
parse_effortenumOptionalDefaults to standard

How much effort to spend parsing PDF pages. Has no effect on web pages.

lite extracts the content embedded in each page. Use it for digitally created PDFs when you want the lowest cost.

standard also sends complex pages, such as charts and images, through an advanced model, and is billed per page. Use it when you want the most complete output.

For example, lite works well on a text-based contract, while an earnings report with revenue charts returns more complete content under standard.

Allowed values:

Response

A JSON object containing the extracted content from the URL
urlstringOptionalformat: "uri"
The URL whose content was extracted.
extraction_sourcestringOptional

Where the request allowed content to come from. blend serves cached content when it is available and crawls the page live when it is not.

titlestringOptional
The title of the webpage.
contentsobjectOptional
The extracted content from the URL.
metadataobjectOptional
Metadata about the webpage.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error