Data API / Tavily / Search
Tavily Search
Search the web and return ranked results with titles, URLs and content snippets. query is required. Use max_results to control the number of results and search_depth to select the search mode. Additional answer, images and raw content are returned only when requested. Set include_usage to receive resource usage information; usage.credits is not a Felo charge.
Параметры
Параметров пути, запроса и заголовков нет.
Тело запроса
querystringОбязательныйThe search query to execute with Tavily.
search_depthstringНеобязательныйДопустимые значения: advanced · basic · fast · ultra-fast
Controls the latency vs. relevance tradeoff. advanced gives the highest relevance with higher latency and cost; basic is balanced; fast and ultra-fast optimize for lower latency.
chunks_per_sourceintegerНеобязательныйMaximum number of relevant chunks returned per source.
max_resultsintegerНеобязательныйMaximum number of search results to return.
topicstringНеобязательныйДопустимые значения: general · news · finance
Category of the search.
time_rangestringНеобязательныйДопустимые значения: day · week · month · year · d · w · m · y
Time range to filter results based on publish date.
start_datestringНеобязательныйReturn results after the specified start date.
end_datestringНеобязательныйReturn results before the specified end date.
include_answerНеобязательныйДопустимые значения: basic · advanced
Include an LLM-generated answer. true uses the default answer mode; basic or advanced selects the answer generation mode.
include_raw_contentНеобязательныйДопустимые значения: markdown · text
Include cleaned and parsed content for each search result. true or markdown returns markdown; text returns plain text and may increase latency.
include_imagesbooleanНеобязательныйPerform an image search and include results.
include_image_descriptionsbooleanНеобязательныйAdd descriptive text for each image when include_images is true.
safe_searchbooleanНеобязательныйFilter out adult or unsafe content from search results. Enterprise only; not supported when search_depth is fast or ultra-fast.
include_faviconbooleanНеобязательныйInclude the favicon URL for each result.
include_domainsstring[]НеобязательныйList of domains to specifically include in the search results.
exclude_domainsstring[]НеобязательныйList of domains to specifically exclude from the search results.
countrystringНеобязательныйДопустимые значения: afghanistan · albania · algeria · andorra · angola · argentina · armenia · australia · austria · azerbaijan · bahamas · bahrain · bangladesh · barbados · belarus · belgium · belize · benin · bhutan · bolivia · bosnia and herzegovina · botswana · brazil · brunei · bulgaria · burkina faso · burundi · cambodia · cameroon · canada · cape verde · central african republic · chad · chile · china · colombia · comoros · congo · costa rica · croatia · cuba · cyprus · czech republic · denmark · djibouti · dominican republic · ecuador · egypt · el salvador · equatorial guinea · eritrea · estonia · ethiopia · fiji · finland · france · gabon · gambia · georgia · germany · ghana · greece · guatemala · guinea · haiti · honduras · hungary · iceland · india · indonesia · iran · iraq · ireland · israel · italy · jamaica · japan · jordan · kazakhstan · kenya · kuwait · kyrgyzstan · latvia · lebanon · lesotho · liberia · libya · liechtenstein · lithuania · luxembourg · madagascar · malawi · malaysia · maldives · mali · malta · mauritania · mauritius · mexico · moldova · monaco · mongolia · montenegro · morocco · mozambique · myanmar · namibia · nepal · netherlands · new zealand · nicaragua · niger · nigeria · north korea · north macedonia · norway · oman · pakistan · panama · papua new guinea · paraguay · peru · philippines · poland · portugal · qatar · romania · russia · rwanda · saudi arabia · senegal · serbia · singapore · slovakia · slovenia · somalia · south africa · south korea · south sudan · spain · sri lanka · sudan · sweden · switzerland · syria · taiwan · tajikistan · tanzania · thailand · togo · trinidad and tobago · tunisia · turkey · turkmenistan · uganda · ukraine · united arab emirates · united kingdom · united states · uruguay · uzbekistan · venezuela · vietnam · yemen · zambia · zimbabwe
Boost search results from a specific country. Available only when topic is general.
auto_parametersbooleanНеобязательныйAutomatically configure search parameters based on query content.
include_usagebooleanНеобязательныйInclude resource usage information in the response. This is not Felo billing information.
Пример запроса
curl -X POST "https://openapi.felo.ai/v1/beta/tavily/search" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "<string>",
"search_depth": "<string>",
"chunks_per_source": 0,
"max_results": 0,
"topic": "<string>",
"time_range": "<string>",
"start_date": "<string>",
"end_date": "<string>"
}'Ответ
Пример ответа
{
"query": "Python official documentation",
"answer": null,
"images": [],
"results": [
{
"title": "Python Documentation",
"url": "https://docs.python.org/3/",
"content": "Documentation for the Python programming language.",
"score": 0.98,
"raw_content": null
}
],
"response_time": 1.2,
"usage": {
"credits": 1
},
"request_id": "example-search-request"
}Поля ответа
querystringНеобязательныйThe search query that was executed.
answerНеобязательныйA short LLM-generated answer. Present as null when include_answer is false or no answer is generated.
imagesobject[]НеобязательныйurlstringНеобязательныйImage URL.
descriptionstringНеобязательныйImage description.
resultsobject[]НеобязательныйtitlestringНеобязательныйTitle of the search result.
urlstringНеобязательныйURL of the search result.
contentstringНеобязательныйContent snippet of the search result.
scorenumberНеобязательныйRelevance score of the search result.
faviconНеобязательныйFavicon URL of the search result.
raw_contentНеобязательныйCleaned and parsed source content. Null unless include_raw_content is requested or no raw content is available.
response_timenumberНеобязательныйTime in seconds it took to complete the request.
usageobjectНеобязательныйcreditsintegerНеобязательныйResource units consumed by this request, not USD or Felo credits.
request_idstringНеобязательныйUnique request identifier.