Skip to main content
POST
/
tavily
/
extract
Extract web page content from specified URLs using Tavily Extract.
curl --request POST \
  --url https://api.aisa.one/apis/v1/tavily/extract \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "urls": [
    "https://en.wikipedia.org/wiki/Artificial_intelligence"
  ],
  "query": "<string>",
  "chunks_per_source": 3,
  "extract_depth": "basic",
  "include_images": false,
  "include_favicon": false,
  "format": "markdown",
  "timeout": 30.5,
  "include_usage": false
}
'
{
  "results": [
    {
      "url": "<string>",
      "raw_content": "<string>",
      "favicon": "<string>"
    }
  ],
  "failed_results": [
    "<string>"
  ],
  "response_time": 123,
  "usage": {
    "credits": 123
  },
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
urls
string[]
required

The URLs to extract content from.

Example:
[
"https://en.wikipedia.org/wiki/Artificial_intelligence"
]
query
string

User intent for reranking extracted content chunks.

chunks_per_source
integer
default:3

Maximum number of relevant chunks returned per source.

Required range: 1 <= x <= 5
extract_depth
enum<string>
default:basic

Depth of the extraction process.

Available options:
basic,
advanced
include_images
boolean
default:false

Include a list of images extracted from the URLs.

include_favicon
boolean
default:false

Include the favicon URL for each result.

format
enum<string>
default:markdown

Format of the extracted web page content.

Available options:
markdown,
text
timeout
number<float>

Maximum time in seconds to wait for the URL extraction.

Required range: 1 <= x <= 60
include_usage
boolean
default:false

Include credit usage information in the response.

Response

200 - application/json

Extraction results returned successfully.

results
object[]
failed_results
string[]

List of URLs that could not be processed.

response_time
number<float>

Time in seconds it took to complete the request.

usage
object
request_id
string

Unique request identifier.