← Back to Tavily
POST/extract

Tavily Extract

Extract web page content from one or more specified URLs using Tavily Extract.

Tavily·Dynamic pricing

Dynamic pricing

ceil(count(body.urls) / 5) * (lower(body.extract_depth) == 'advanced' ? 0.02 : 0.01)

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "tavily", path: "/extract", body: { "urls": "example" } }); console.log(output);

Body parameters

urlsrequired
string

The URL to extract content from.

query
string

User intent for reranking extracted content chunks. When provided, chunks are reranked based on relevance to this query.

chunks_per_source
integer

Chunks are short content snippets (maximum 500 characters each) pulled directly from the source. Use chunks_per_source to define the maximum number of relevant chunks returned per source and to control the raw_content length. Chunks will appear in the raw_content field as: <chunk 1> [...] <chunk 2> [...] <chunk 3>. Available only when query is provided. Must be between 1 and 5.

extract_depth
enum<string>

The depth of the extraction process. advanced extraction retrieves more data, including tables and embedded content, with higher success but may increase latency.basic extraction costs 1 credit per 5 successful URL extractions, while advanced extraction costs 2 credits per 5 successful URL extractions.

include_images
boolean

Include a list of images extracted from the URLs in the response. Default is false.

include_favicon
boolean

Whether to include the favicon URL for each result.

format
enum<string>

The format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency.

timeout
number

Maximum time in seconds to wait for the URL extraction before timing out. Must be between 1.0 and 60.0 seconds. If not specified, default timeouts are applied based on extract_depth: 10 seconds for basic extraction and 30 seconds for advanced extraction.

Response

results
array
request_id
string
response_time
number
failed_results.0.url
string
failed_results.0.error
string
    Orthogonal - Giving AI agents the tools they need.