Tavily

Tavily Search

post

Execute a search query using Tavily Search.

Header parameters
AuthorizationstringRequiredExample: sk-XIl7IWyv0rWeba
Body
modelstringRequiredExample: tavily-search
querystringRequired

The search query to execute with Tavily.

Example: who is Leo Messi?
auto_parametersbooleanOptional

When auto_parameters is enabled, Tavily automatically configures search parameters based on your query's content and intent. You can still set other parameters manually, and your explicit values will override the automatic ones. The parameters include_answer, include_raw_content, and max_results must always be set manually, as they directly affect response size. Note: search_depth may be automatically set to advanced when it's likely to improve results. This uses 2 API credits per request. To avoid the extra cost, you can explicitly set search_depth to basic. Currently in beta.

Default: false
topicstring · enumOptional

The category of the search. news is useful for retrieving real-time updates, particularly about politics, sports, and major current events covered by mainstream media sources. general is for broader, more general-purpose searches that may include a wide range of sources.

Default: generalExample: generalPossible values:
search_depthstring · enumOptional

The depth of the search. advanced search is tailored to retrieve the most relevant sources and content snippets for your query, while basic search provides generic content snippets from each source. A advanced search costs twice price than basic search.

Default: basicExample: basicPossible values:
chunks_per_sourceinteger · enumOptional

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 content length. Chunks will appear in the content field as: <chunk 1> [...] <chunk 2> [...] <chunk 3>. Available only when search_depth is advanced.

Default: 3Example: 3Possible values:
max_resultsinteger · max: 20Optional

The maximum number of search results to return.

Default: 5Example: 5
time_rangestring · enumOptional

The time range back from the current date to filter results based on publish date or last updated date. Useful when looking for sources that have published or updated data. If the time_range parameter is provided, you can't also include start_date and end_date parameters

Possible values:
start_datestringOptional

Will return all results after the specified start date based on publish date or last updated date. Required to be written in the format YYYY-MM-DD

Example: 2025-02-09
end_datestringOptional

Will return all results before the specified end date based on publish date or last updated date. Required to be written in the format YYYY-MM-DD

Example: 2025-12-29
include_answerbooleanOptional

Include an LLM-generated answer to the provided query. true returns a quick answer. false returns a more detailed answer.

Default: false
include_raw_contentbooleanOptional

Include the cleaned and parsed HTML content of each search result. true returns search result content in markdown format. false returns the plain text from the results and may increase latency.

Default: false
include_imagesbooleanOptional

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

Default: false
include_image_descriptionsbooleanOptional

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

Default: false
include_faviconbooleanOptional

Whether to include the favicon URL for each result.

Default: false
include_domainsstring[]Optional

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

exclude_domainsstring[]Optional

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

countrystring · enumOptional

Boost search results from a specific country. This will prioritize content from the selected country in the search results. Available only if topic is general.

Possible values:
Responses
200Success
application/json
post
/v1/search
POST /v1/search HTTP/1.1
Host: search.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 431

{
  "model": "tavily-search",
  "query": "who is Leo Messi?",
  "auto_parameters": true,
  "topic": "general",
  "search_depth": "basic",
  "chunks_per_source": 3,
  "max_results": 5,
  "time_range": "",
  "start_date": "2025-02-09",
  "end_date": "2025-12-29",
  "include_answer": true,
  "include_raw_content": true,
  "include_images": true,
  "include_image_descriptions": true,
  "include_favicon": false,
  "include_domains": [
    "goole.com"
  ],
  "exclude_domains": [
    "baidu.com"
  ],
  "country": "cuba"
}
{
  "query": "Who is Leo Messi?",
  "answer": "Lionel Messi, born in 1987, is an Argentine footballer widely regarded as one of the greatest players of his generation. He spent the majority of his career playing for FC Barcelona, where he won numerous domestic league titles and UEFA Champions League titles. Messi is known for his exceptional dribbling skills, vision, and goal-scoring ability. He has won multiple FIFA Ballon d'Or awards, numerous La Liga titles with Barcelona, and holds the record for most goals scored in a calendar year. In 2014, he led Argentina to the World Cup final, and in 2015, he helped Barcelona capture another treble. Despite turning 36 in June, Messi remains highly influential in the sport.",
  "images": [],
  "results": [
    {
      "title": "Lionel Messi Facts | Britannica",
      "url": "https://www.britannica.com/facts/Lionel-Messi",
      "content": "Lionel Messi, an Argentine footballer, is widely regarded as one of the greatest football players of his generation. Born in 1987, Messi spent the majority of his career playing for Barcelona, where he won numerous domestic league titles and UEFA Champions League titles. Messi is known for his exceptional dribbling skills, vision, and goal",
      "score": 0.81025416,
      "raw_content": null,
      "favicon": "https://britannica.com/favicon.png"
    }
  ],
  "auto_parameters": {
    "topic": "general",
    "search_depth": "basic"
  },
  "response_time": "1.67",
  "request_id": "123e4567-e89b-12d3-a456-426614174111"
}

Tavily Search Compatible

post

Execute a search query using Tavily Search.

Header parameters
AuthorizationstringRequiredExample: sk-XIl7IWyv0rWeba
Body
querystringRequired

The search query to execute with Tavily.

Example: who is Leo Messi?
auto_parametersbooleanOptional

When auto_parameters is enabled, Tavily automatically configures search parameters based on your query's content and intent. You can still set other parameters manually, and your explicit values will override the automatic ones. The parameters include_answer, include_raw_content, and max_results must always be set manually, as they directly affect response size. Note: search_depth may be automatically set to advanced when it's likely to improve results. This uses 2 API credits per request. To avoid the extra cost, you can explicitly set search_depth to basic. Currently in beta.

Default: false
topicstring · enumOptional

The category of the search. news is useful for retrieving real-time updates, particularly about politics, sports, and major current events covered by mainstream media sources. general is for broader, more general-purpose searches that may include a wide range of sources.

Default: generalExample: generalPossible values:
search_depthstring · enumOptional

The depth of the search. advanced search is tailored to retrieve the most relevant sources and content snippets for your query, while basic search provides generic content snippets from each source. A advanced search costs twice price than basic search.

Default: basicExample: basicPossible values:
chunks_per_sourceinteger · enumOptional

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 content length. Chunks will appear in the content field as: <chunk 1> [...] <chunk 2> [...] <chunk 3>. Available only when search_depth is advanced.

Default: 3Example: 3Possible values:
max_resultsinteger · max: 20Optional

The maximum number of search results to return.

Default: 5Example: 5
time_rangestring · enumOptional

The time range back from the current date to filter results based on publish date or last updated date. Useful when looking for sources that have published or updated data. If the time_range parameter is provided, you can't also include start_date and end_date parameters

Possible values:
start_datestringOptional

Will return all results after the specified start date based on publish date or last updated date. Required to be written in the format YYYY-MM-DD

Example: 2025-02-09
end_datestringOptional

Will return all results before the specified end date based on publish date or last updated date. Required to be written in the format YYYY-MM-DD

Example: 2025-12-29
include_answerbooleanOptional

Include an LLM-generated answer to the provided query. true returns a quick answer. false returns a more detailed answer.

Default: false
include_raw_contentbooleanOptional

Include the cleaned and parsed HTML content of each search result. true returns search result content in markdown format. false returns the plain text from the results and may increase latency.

Default: false
include_imagesbooleanOptional

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

Default: false
include_image_descriptionsbooleanOptional

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

Default: false
include_faviconbooleanOptional

Whether to include the favicon URL for each result.

Default: false
include_domainsstring[]Optional

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

exclude_domainsstring[]Optional

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

countrystring · enumOptional

Boost search results from a specific country. This will prioritize content from the selected country in the search results. Available only if topic is general.

Possible values:
Responses
200Success
application/json
post
/v1/tavily
POST /v1/tavily HTTP/1.1
Host: search.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 407

{
  "query": "who is Leo Messi?",
  "auto_parameters": true,
  "topic": "general",
  "search_depth": "basic",
  "chunks_per_source": 3,
  "max_results": 5,
  "time_range": "",
  "start_date": "2025-02-09",
  "end_date": "2025-12-29",
  "include_answer": true,
  "include_raw_content": true,
  "include_images": true,
  "include_image_descriptions": true,
  "include_favicon": false,
  "include_domains": [
    "goole.com"
  ],
  "exclude_domains": [
    "baidu.com"
  ],
  "country": "cuba"
}
{
  "query": "Who is Leo Messi?",
  "answer": "Lionel Messi, born in 1987, is an Argentine footballer widely regarded as one of the greatest players of his generation. He spent the majority of his career playing for FC Barcelona, where he won numerous domestic league titles and UEFA Champions League titles. Messi is known for his exceptional dribbling skills, vision, and goal-scoring ability. He has won multiple FIFA Ballon d'Or awards, numerous La Liga titles with Barcelona, and holds the record for most goals scored in a calendar year. In 2014, he led Argentina to the World Cup final, and in 2015, he helped Barcelona capture another treble. Despite turning 36 in June, Messi remains highly influential in the sport.",
  "images": [],
  "results": [
    {
      "title": "Lionel Messi Facts | Britannica",
      "url": "https://www.britannica.com/facts/Lionel-Messi",
      "content": "Lionel Messi, an Argentine footballer, is widely regarded as one of the greatest football players of his generation. Born in 1987, Messi spent the majority of his career playing for Barcelona, where he won numerous domestic league titles and UEFA Champions League titles. Messi is known for his exceptional dribbling skills, vision, and goal",
      "score": 0.81025416,
      "raw_content": null,
      "favicon": "https://britannica.com/favicon.png"
    }
  ],
  "auto_parameters": {
    "topic": "general",
    "search_depth": "basic"
  },
  "response_time": "1.67",
  "request_id": "123e4567-e89b-12d3-a456-426614174111"
}

Last updated