[{"data":1,"prerenderedAt":795},["ShallowReactive",2],{"navigation_docs":3,"-providers-tavily":104,"-providers-tavily-surround":790},[4,44],{"title":5,"path":6,"stem":7,"children":8,"icon":43},"Guide","\u002Fguide","1.guide\u002F1.index",[9,11,15,19,23,27,31,35,39],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Searching","\u002Fguide\u002Fsearch","1.guide\u002F2.search",{"title":16,"path":17,"stem":18},"Fan-out","\u002Fguide\u002Ffanout","1.guide\u002F3.fanout",{"title":20,"path":21,"stem":22},"Reading","\u002Fguide\u002Fread","1.guide\u002F4.read",{"title":24,"path":25,"stem":26},"Reverse Image Search","\u002Fguide\u002Fimage","1.guide\u002F5.image",{"title":28,"path":29,"stem":30},"CLI","\u002Fguide\u002Fcli","1.guide\u002F6.cli",{"title":32,"path":33,"stem":34},"Agents","\u002Fguide\u002Fagents","1.guide\u002F7.agents",{"title":36,"path":37,"stem":38},"Custom Providers","\u002Fguide\u002Fcustom","1.guide\u002F8.custom",{"title":40,"path":41,"stem":42},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F9.explorer","i-lucide-book-open",{"title":45,"path":46,"stem":47,"children":48,"icon":103},"Providers","\u002Fproviders","2.providers\u002F0.index",[49,51,55,59,63,67,71,75,79,83,87,91,95,99],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Brave","\u002Fproviders\u002Fbrave","2.providers\u002F01.brave",{"title":56,"path":57,"stem":58},"Context.dev","\u002Fproviders\u002Fcontext","2.providers\u002F02.context",{"title":60,"path":61,"stem":62},"Exa","\u002Fproviders\u002Fexa","2.providers\u002F03.exa",{"title":64,"path":65,"stem":66},"Firecrawl","\u002Fproviders\u002Ffirecrawl","2.providers\u002F04.firecrawl",{"title":68,"path":69,"stem":70},"Jina","\u002Fproviders\u002Fjina","2.providers\u002F05.jina",{"title":72,"path":73,"stem":74},"Mojeek","\u002Fproviders\u002Fmojeek","2.providers\u002F06.mojeek",{"title":76,"path":77,"stem":78},"SearXNG","\u002Fproviders\u002Fsearxng","2.providers\u002F07.searxng",{"title":80,"path":81,"stem":82},"SerpAPI","\u002Fproviders\u002Fserpapi","2.providers\u002F08.serpapi",{"title":84,"path":85,"stem":86},"SerpBase","\u002Fproviders\u002Fserpbase","2.providers\u002F09.serpbase",{"title":88,"path":89,"stem":90},"Tavily","\u002Fproviders\u002Ftavily","2.providers\u002F10.tavily",{"title":92,"path":93,"stem":94},"TinyFish","\u002Fproviders\u002Ftinyfish","2.providers\u002F11.tinyfish",{"title":96,"path":97,"stem":98},"OpenAI Codex","\u002Fproviders\u002Fopenai-codex","2.providers\u002F12.openai-codex",{"title":100,"path":101,"stem":102},"Marginalia","\u002Fproviders\u002Fmarginalia","2.providers\u002F13.marginalia","i-lucide-library",{"id":105,"title":88,"body":106,"description":783,"extension":784,"links":785,"meta":786,"navigation":182,"path":89,"seo":788,"stem":90,"__hash__":789},"docs\u002F2.providers\u002F10.tavily.md",{"type":107,"value":108,"toc":776},"minimark",[109,113,118,469,477,481,565,569,640,672,676,763,767,772],[110,111],"provider-facts",{"provider":112},"tavily",[114,115,117],"h2",{"id":116},"address-it","Address it",[119,120,125],"pre",{"className":121,"code":122,"language":123,"meta":124,"style":124},"language-ts shiki shiki-themes github-light github-light poimandres","import { create, readUrl, searchProviderDetailed } from \"@agntn\u002Fweb\";\n\nconst tavily = await create(\"tavily\"); \u002F\u002F TAVILY_API_KEY\nconst results = await tavily.search(\"query\", { includeDomains: [\"docs.python.org\"] });\nconst recent = await tavily.search(\"query\", { category: \"news\", startPublishedDate: \"2026-06-01\" });\n\nconst answer = await searchProviderDetailed(\"tavily\", \"query\", { summary: true, fullText: true });\nanswer.metadata?.answer; \u002F\u002F the generated answer for the query\n\nconst page = await readUrl(\"https:\u002F\u002Fdocs.python.org\u002F3\u002F\", { provider: \"tavily\", format: \"text\" });\n","ts","",[126,127,128,177,184,221,276,332,337,390,412,417],"code",{"__ignoreMap":124},[129,130,133,137,141,145,148,151,153,156,159,163,167,171,174],"span",{"class":131,"line":132},"line",1,[129,134,136],{"class":135},"sP0CR","import",[129,138,140],{"class":139},"sKlNE"," {",[129,142,144],{"class":143},"snHMy"," create",[129,146,147],{"class":139},",",[129,149,150],{"class":143}," readUrl",[129,152,147],{"class":139},[129,154,155],{"class":143}," searchProviderDetailed",[129,157,158],{"class":139}," }",[129,160,162],{"class":161},"stCPd"," from",[129,164,166],{"class":165},"scVjq"," \"",[129,168,170],{"class":169},"sQ7BG","@agntn\u002Fweb",[129,172,173],{"class":165},"\"",[129,175,176],{"class":139},";\n",[129,178,180],{"class":131,"line":179},2,[129,181,183],{"emptyLinePlaceholder":182},true,"\n",[129,185,187,191,195,198,202,205,208,210,212,214,217],{"class":131,"line":186},3,[129,188,190],{"class":189},"s1TYA","const",[129,192,194],{"class":193},"saoiD"," tavily",[129,196,197],{"class":189}," =",[129,199,201],{"class":200},"sZW6a"," await",[129,203,144],{"class":204},"sULi6",[129,206,207],{"class":139},"(",[129,209,173],{"class":165},[129,211,112],{"class":169},[129,213,173],{"class":165},[129,215,216],{"class":139},"); ",[129,218,220],{"class":219},"sjhu3","\u002F\u002F TAVILY_API_KEY\n",[129,222,224,226,229,231,233,236,239,242,244,246,249,251,254,257,260,263,265,268,270,273],{"class":131,"line":223},4,[129,225,190],{"class":189},[129,227,228],{"class":193}," results",[129,230,197],{"class":189},[129,232,201],{"class":200},[129,234,194],{"class":235},"spVlQ",[129,237,238],{"class":139},".",[129,240,241],{"class":204},"search",[129,243,207],{"class":139},[129,245,173],{"class":165},[129,247,248],{"class":169},"query",[129,250,173],{"class":165},[129,252,253],{"class":139},", {",[129,255,256],{"class":143}," includeDomains",[129,258,259],{"class":139},":",[129,261,262],{"class":139}," [",[129,264,173],{"class":165},[129,266,267],{"class":169},"docs.python.org",[129,269,173],{"class":165},[129,271,272],{"class":139},"]",[129,274,275],{"class":139}," });\n",[129,277,279,281,284,286,288,290,292,294,296,298,300,302,304,307,309,311,314,316,318,321,323,325,328,330],{"class":131,"line":278},5,[129,280,190],{"class":189},[129,282,283],{"class":193}," recent",[129,285,197],{"class":189},[129,287,201],{"class":200},[129,289,194],{"class":235},[129,291,238],{"class":139},[129,293,241],{"class":204},[129,295,207],{"class":139},[129,297,173],{"class":165},[129,299,248],{"class":169},[129,301,173],{"class":165},[129,303,253],{"class":139},[129,305,306],{"class":143}," category",[129,308,259],{"class":139},[129,310,166],{"class":165},[129,312,313],{"class":169},"news",[129,315,173],{"class":165},[129,317,147],{"class":139},[129,319,320],{"class":143}," startPublishedDate",[129,322,259],{"class":139},[129,324,166],{"class":165},[129,326,327],{"class":169},"2026-06-01",[129,329,173],{"class":165},[129,331,275],{"class":139},[129,333,335],{"class":131,"line":334},6,[129,336,183],{"emptyLinePlaceholder":182},[129,338,340,342,345,347,349,351,353,355,357,359,362,364,366,368,370,373,375,379,381,384,386,388],{"class":131,"line":339},7,[129,341,190],{"class":189},[129,343,344],{"class":193}," answer",[129,346,197],{"class":189},[129,348,201],{"class":200},[129,350,155],{"class":204},[129,352,207],{"class":139},[129,354,173],{"class":165},[129,356,112],{"class":169},[129,358,173],{"class":165},[129,360,361],{"class":139},", ",[129,363,173],{"class":165},[129,365,248],{"class":169},[129,367,173],{"class":165},[129,369,253],{"class":139},[129,371,372],{"class":143}," summary",[129,374,259],{"class":139},[129,376,378],{"class":377},"siHFe"," true",[129,380,147],{"class":139},[129,382,383],{"class":143}," fullText",[129,385,259],{"class":139},[129,387,378],{"class":377},[129,389,275],{"class":139},[129,391,393,396,398,401,404,406,409],{"class":131,"line":392},8,[129,394,395],{"class":235},"answer",[129,397,238],{"class":139},[129,399,400],{"class":235},"metadata",[129,402,403],{"class":139},"?.",[129,405,395],{"class":235},[129,407,408],{"class":139},"; ",[129,410,411],{"class":219},"\u002F\u002F the generated answer for the query\n",[129,413,415],{"class":131,"line":414},9,[129,416,183],{"emptyLinePlaceholder":182},[129,418,420,422,425,427,429,431,433,435,438,440,442,445,447,449,451,453,455,458,460,462,465,467],{"class":131,"line":419},10,[129,421,190],{"class":189},[129,423,424],{"class":193}," page",[129,426,197],{"class":189},[129,428,201],{"class":200},[129,430,150],{"class":204},[129,432,207],{"class":139},[129,434,173],{"class":165},[129,436,437],{"class":169},"https:\u002F\u002Fdocs.python.org\u002F3\u002F",[129,439,173],{"class":165},[129,441,253],{"class":139},[129,443,444],{"class":143}," provider",[129,446,259],{"class":139},[129,448,166],{"class":165},[129,450,112],{"class":169},[129,452,173],{"class":165},[129,454,147],{"class":139},[129,456,457],{"class":143}," format",[129,459,259],{"class":139},[129,461,166],{"class":165},[129,463,464],{"class":169},"text",[129,466,173],{"class":165},[129,468,275],{"class":139},[470,471,472,473,476],"p",{},"Search puts the key in the body of a POST to ",[126,474,475],{},"api.tavily.com",", Extract takes it as a Bearer token.",[114,478,480],{"id":479},"what-it-reads","What it reads",[482,483,484,497],"table",{},[485,486,487],"thead",{},[488,489,490,494],"tr",{},[491,492,493],"th",{},"Call",[491,495,496],{},"Endpoint",[498,499,500,539],"tbody",{},[488,501,502,507],{},[503,504,505],"td",{},[126,506,241],{},[503,508,509,512,513,361,516,361,519,361,522,361,525,528,529,361,532,361,535,538],{},[126,510,511],{},"POST \u002Fsearch"," with ",[126,514,515],{},"max_results",[126,517,518],{},"search_depth: \"basic\"",[126,520,521],{},"include_answer",[126,523,524],{},"include_raw_content",[126,526,527],{},"include_published_date: true",", and ",[126,530,531],{},"topic",[126,533,534],{},"start_date",[126,536,537],{},"end_date"," when asked",[488,540,541,546],{},[503,542,543],{},[126,544,545],{},"read",[503,547,548,551,552,361,555,361,558,561,562],{},[126,549,550],{},"POST \u002Fextract"," with one URL in ",[126,553,554],{},"urls",[126,556,557],{},"extract_depth: \"basic\"",[126,559,560],{},"format"," and ",[126,563,564],{},"timeout",[114,566,568],{"id":567},"what-comes-back","What comes back",[470,570,571,574,575,578,579,582,583,586,587,361,590,593,594,597,598,600,601,604,605,608,609,612,613,561,616,619,620,561,622,528,624,627,628,361,631,633,634,637,638,238],{},[126,572,573],{},"snippet"," is Tavily's ",[126,576,577],{},"content",", a few passages of the page glued together with ",[126,580,581],{},"[...]",". That runs past 1,000 characters more often than not, so it stops at 500 with ",[126,584,585],{},"…",". Results also carry ",[126,588,589],{},"score",[126,591,592],{},"publishedDate"," and, with ",[126,595,596],{},"fullText",", the whole page as ",[126,599,464],{}," from ",[126,602,603],{},"raw_content",". ",[126,606,607],{},"summary"," asks for the query answer, which lands in response ",[126,610,611],{},"metadata.answer",", not on a result. Include and exclude domains work, ",[126,614,615],{},"startPublishedDate",[126,617,618],{},"endPublishedDate"," go through as ",[126,621,534],{},[126,623,537],{},[126,625,626],{},"category"," set to ",[126,629,630],{},"general",[126,632,313],{}," or ",[126,635,636],{},"finance"," picks Tavily's ",[126,639,531],{},[470,641,642,643,633,646,648,649,651,652,655,656,648,659,604,662,664,665,561,668,671],{},"Reads give ",[126,644,645],{},"markdown",[126,647,464],{}," in ",[126,650,577],{},", the page ",[126,653,654],{},"title"," and Tavily's ",[126,657,658],{},"request_id",[126,660,661],{},"metadata.requestId",[126,663,564],{}," is passed on in seconds, clamped to Tavily's 1 to 60. No links, images or selectors, and ",[126,666,667],{},"maxTokens",[126,669,670],{},"noCache"," are ignored.",[114,673,675],{"id":674},"gotchas","Gotchas",[677,678,679,691,701,711,718,725,747,753],"ul",{},[680,681,682,683,686,687,690],"li",{},"The answer is one string for the whole query, so it lives on the response, not on a result. ",[126,684,685],{},"search()"," alone cannot show it, ",[126,688,689],{},"searchDetailed()"," can.",[680,692,693,696,697,700],{},[126,694,695],{},"search_depth"," is always ",[126,698,699],{},"basic",". Advanced depth costs more credits and is not exposed, on purpose.",[680,702,703,704,707,708,710],{},"Tavily dates a result only when asked, so every search asks. It writes the date as ",[126,705,706],{},"Tue, 11 Mar 2025 17:00:00 GMT",", which becomes ISO 8601 here like everyone else's, and a page it couldn't date has no ",[126,709,592],{},". Tavily calls the field beta.",[680,712,713,714,717],{},"The window is by day, so a datetime bound becomes its UTC day. Pages Tavily couldn't date stay in, three of five on a plain query, so ",[126,715,716],{},"filter_by_published_date"," isn't sent on purpose.",[680,719,720,721,724],{},"A spent plan or pay-as-you-go cap comes back as HTTP 432 or 433, not 402. Both are ",[126,722,723],{},"PaymentError"," here, so automatic search and read move on to the next configured provider. A wrong key is still 401 and still stops the chain.",[680,726,727,728,731,732,735,736,361,739,742,743,746],{},"A page Extract cannot fetch is not an HTTP error. The response is a 200 with an empty ",[126,729,730],{},"results"," and the reason in ",[126,733,734],{},"failed_results"," (",[126,737,738],{},"404 page not found",[126,740,741],{},"Failed to fetch url",", which is also what a PDF gets). That becomes a ",[126,744,745],{},"WebError"," with the reason, not a fallback.",[680,748,749,752],{},[126,750,751],{},"url"," on a read is the one you asked for. Extract does not report where a redirect ended up.",[680,754,755,756,758,759,762],{},"Extract is ",[126,757,699],{}," depth, ",[126,760,761],{},"advanced"," (tables and embedded content, twice the credits) is not exposed. Basic costs one credit per five successful pages.",[114,764,766],{"id":765},"where-it-lives","Where it lives",[470,768,769,238],{},[126,770,771],{},"src\u002Fproviders\u002Ftavily.ts",[773,774,775],"style",{},"html pre.shiki code .sP0CR, html code.shiki .sP0CR{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .stCPd, html code.shiki .stCPd{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#A6ACCD}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sZW6a, html code.shiki .sZW6a{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7C0}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .sjhu3, html code.shiki .sjhu3{--shiki-light:#6A737D;--shiki-light-font-style:inherit;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#767C9DB0;--shiki-dark-font-style:italic}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":124,"searchDepth":179,"depth":179,"links":777},[778,779,780,781,782],{"id":116,"depth":179,"text":117},{"id":479,"depth":179,"text":480},{"id":567,"depth":179,"text":568},{"id":674,"depth":179,"text":675},{"id":765,"depth":179,"text":766},"The Tavily search API, with an optional generated answer in response metadata, and Tavily Extract for reading pages.","md",null,{"icon":787},"i-lucide-compass",{"title":88,"description":783},"9KZxRHPINwJVj5mKY828gmfXhOOQNkjqPt6v_WTJa-M",[791,793],{"title":84,"path":85,"stem":86,"description":792,"children":-1},"SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.",{"title":92,"path":93,"stem":94,"description":794,"children":-1},"TinyFish Search for news and research results with publisher metadata, and TinyFish Fetch for reading pages.",1790458676338]