POST
/
search

Authorizations

Authorization
string
header
required

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

Body

application/json
query
string
required

The search query to execute with Tavily.

days
integer
default:
3

Number of days back from the current date to include. Available only if topic is 'news'.

Required range: x > 0
exclude_domains
string[]

A list of domains to specifically exclude from the search results.

include_answer
default:
false

Include an LLM-generated answer to the provided query. 'basic' or true returns a quick answer. 'advanced' returns a more detailed answer.

include_domains
string[]

A list of domains to specifically include in the search results.

include_image_descriptions
boolean
default:
false

When include_images is true, also add a descriptive text for each image.

include_images
boolean
default:
false

Also perform an image search and include the results in the response.

include_raw_content
boolean
default:
false

Include the cleaned and parsed HTML content of each search result.

max_results
integer
default:
5

The maximum number of search results to return.

Required range: 0 < x < 20
search_depth
enum<string>
default:
basic

The depth of the search. A basic search costs 1 API Credit, while an advanced search costs 2 API Credits.

Available options:
basic,
advanced
time_range
enum<string>

The time range back from the current date to filter results.

Available options:
day,
week,
month,
year,
d,
w,
m,
y
topic
enum<string>
default:
general

The category of the search.

Available options:
general,
news

Response

200 - application/json
answer
string

A short answer to the user's query, generated by an LLM.

images
object[]

List of query-related images. If include_image_descriptions is true, each item will have 'url' and 'description'.

query
string

The search query that was executed.

response_time
number

Time in seconds it took to complete the request.

results
object[]

A list of sorted search results, ranked by relevancy.