[{"data":1,"prerenderedAt":775},["ShallowReactive",2],{"navigation_docs":3,"-providers-tavily":100,"-providers-tavily-surround":770},[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":99},"Providers","\u002Fproviders","2.providers\u002F0.index",[49,51,55,59,63,67,71,75,79,83,87,91,95],{"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","i-lucide-library",{"id":101,"title":88,"body":102,"description":763,"extension":764,"links":765,"meta":766,"navigation":178,"path":89,"seo":768,"stem":90,"__hash__":769},"docs\u002F2.providers\u002F10.tavily.md",{"type":103,"value":104,"toc":756},"minimark",[105,109,114,465,473,477,561,565,619,652,656,743,747,752],[106,107],"provider-facts",{"provider":108},"tavily",[110,111,113],"h2",{"id":112},"address-it","Address it",[115,116,121],"pre",{"className":117,"code":118,"language":119,"meta":120,"style":120},"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","",[122,123,124,173,180,217,272,328,333,386,408,413],"code",{"__ignoreMap":120},[125,126,129,133,137,141,144,147,149,152,155,159,163,167,170],"span",{"class":127,"line":128},"line",1,[125,130,132],{"class":131},"sP0CR","import",[125,134,136],{"class":135},"sKlNE"," {",[125,138,140],{"class":139},"snHMy"," create",[125,142,143],{"class":135},",",[125,145,146],{"class":139}," readUrl",[125,148,143],{"class":135},[125,150,151],{"class":139}," searchProviderDetailed",[125,153,154],{"class":135}," }",[125,156,158],{"class":157},"stCPd"," from",[125,160,162],{"class":161},"scVjq"," \"",[125,164,166],{"class":165},"sQ7BG","@agntn\u002Fweb",[125,168,169],{"class":161},"\"",[125,171,172],{"class":135},";\n",[125,174,176],{"class":127,"line":175},2,[125,177,179],{"emptyLinePlaceholder":178},true,"\n",[125,181,183,187,191,194,198,201,204,206,208,210,213],{"class":127,"line":182},3,[125,184,186],{"class":185},"s1TYA","const",[125,188,190],{"class":189},"saoiD"," tavily",[125,192,193],{"class":185}," =",[125,195,197],{"class":196},"sZW6a"," await",[125,199,140],{"class":200},"sULi6",[125,202,203],{"class":135},"(",[125,205,169],{"class":161},[125,207,108],{"class":165},[125,209,169],{"class":161},[125,211,212],{"class":135},"); ",[125,214,216],{"class":215},"sjhu3","\u002F\u002F TAVILY_API_KEY\n",[125,218,220,222,225,227,229,232,235,238,240,242,245,247,250,253,256,259,261,264,266,269],{"class":127,"line":219},4,[125,221,186],{"class":185},[125,223,224],{"class":189}," results",[125,226,193],{"class":185},[125,228,197],{"class":196},[125,230,190],{"class":231},"spVlQ",[125,233,234],{"class":135},".",[125,236,237],{"class":200},"search",[125,239,203],{"class":135},[125,241,169],{"class":161},[125,243,244],{"class":165},"query",[125,246,169],{"class":161},[125,248,249],{"class":135},", {",[125,251,252],{"class":139}," includeDomains",[125,254,255],{"class":135},":",[125,257,258],{"class":135}," [",[125,260,169],{"class":161},[125,262,263],{"class":165},"docs.python.org",[125,265,169],{"class":161},[125,267,268],{"class":135},"]",[125,270,271],{"class":135}," });\n",[125,273,275,277,280,282,284,286,288,290,292,294,296,298,300,303,305,307,310,312,314,317,319,321,324,326],{"class":127,"line":274},5,[125,276,186],{"class":185},[125,278,279],{"class":189}," recent",[125,281,193],{"class":185},[125,283,197],{"class":196},[125,285,190],{"class":231},[125,287,234],{"class":135},[125,289,237],{"class":200},[125,291,203],{"class":135},[125,293,169],{"class":161},[125,295,244],{"class":165},[125,297,169],{"class":161},[125,299,249],{"class":135},[125,301,302],{"class":139}," category",[125,304,255],{"class":135},[125,306,162],{"class":161},[125,308,309],{"class":165},"news",[125,311,169],{"class":161},[125,313,143],{"class":135},[125,315,316],{"class":139}," startPublishedDate",[125,318,255],{"class":135},[125,320,162],{"class":161},[125,322,323],{"class":165},"2026-06-01",[125,325,169],{"class":161},[125,327,271],{"class":135},[125,329,331],{"class":127,"line":330},6,[125,332,179],{"emptyLinePlaceholder":178},[125,334,336,338,341,343,345,347,349,351,353,355,358,360,362,364,366,369,371,375,377,380,382,384],{"class":127,"line":335},7,[125,337,186],{"class":185},[125,339,340],{"class":189}," answer",[125,342,193],{"class":185},[125,344,197],{"class":196},[125,346,151],{"class":200},[125,348,203],{"class":135},[125,350,169],{"class":161},[125,352,108],{"class":165},[125,354,169],{"class":161},[125,356,357],{"class":135},", ",[125,359,169],{"class":161},[125,361,244],{"class":165},[125,363,169],{"class":161},[125,365,249],{"class":135},[125,367,368],{"class":139}," summary",[125,370,255],{"class":135},[125,372,374],{"class":373},"siHFe"," true",[125,376,143],{"class":135},[125,378,379],{"class":139}," fullText",[125,381,255],{"class":135},[125,383,374],{"class":373},[125,385,271],{"class":135},[125,387,389,392,394,397,400,402,405],{"class":127,"line":388},8,[125,390,391],{"class":231},"answer",[125,393,234],{"class":135},[125,395,396],{"class":231},"metadata",[125,398,399],{"class":135},"?.",[125,401,391],{"class":231},[125,403,404],{"class":135},"; ",[125,406,407],{"class":215},"\u002F\u002F the generated answer for the query\n",[125,409,411],{"class":127,"line":410},9,[125,412,179],{"emptyLinePlaceholder":178},[125,414,416,418,421,423,425,427,429,431,434,436,438,441,443,445,447,449,451,454,456,458,461,463],{"class":127,"line":415},10,[125,417,186],{"class":185},[125,419,420],{"class":189}," page",[125,422,193],{"class":185},[125,424,197],{"class":196},[125,426,146],{"class":200},[125,428,203],{"class":135},[125,430,169],{"class":161},[125,432,433],{"class":165},"https:\u002F\u002Fdocs.python.org\u002F3\u002F",[125,435,169],{"class":161},[125,437,249],{"class":135},[125,439,440],{"class":139}," provider",[125,442,255],{"class":135},[125,444,162],{"class":161},[125,446,108],{"class":165},[125,448,169],{"class":161},[125,450,143],{"class":135},[125,452,453],{"class":139}," format",[125,455,255],{"class":135},[125,457,162],{"class":161},[125,459,460],{"class":165},"text",[125,462,169],{"class":161},[125,464,271],{"class":135},[466,467,468,469,472],"p",{},"Search puts the key in the body of a POST to ",[122,470,471],{},"api.tavily.com",", Extract takes it as a Bearer token.",[110,474,476],{"id":475},"what-it-reads","What it reads",[478,479,480,493],"table",{},[481,482,483],"thead",{},[484,485,486,490],"tr",{},[487,488,489],"th",{},"Call",[487,491,492],{},"Endpoint",[494,495,496,535],"tbody",{},[484,497,498,503],{},[499,500,501],"td",{},[122,502,237],{},[499,504,505,508,509,357,512,357,515,357,518,357,521,524,525,357,528,357,531,534],{},[122,506,507],{},"POST \u002Fsearch"," with ",[122,510,511],{},"max_results",[122,513,514],{},"search_depth: \"basic\"",[122,516,517],{},"include_answer",[122,519,520],{},"include_raw_content",[122,522,523],{},"include_published_date: true",", and ",[122,526,527],{},"topic",[122,529,530],{},"start_date",[122,532,533],{},"end_date"," when asked",[484,536,537,542],{},[499,538,539],{},[122,540,541],{},"read",[499,543,544,547,548,357,551,357,554,557,558],{},[122,545,546],{},"POST \u002Fextract"," with one URL in ",[122,549,550],{},"urls",[122,552,553],{},"extract_depth: \"basic\"",[122,555,556],{},"format"," and ",[122,559,560],{},"timeout",[110,562,564],{"id":563},"what-comes-back","What comes back",[466,566,567,357,570,573,574,357,577,579,580,583,584,587,588,591,592,557,595,598,599,557,601,524,603,606,607,357,610,612,613,616,617,234],{},[122,568,569],{},"score",[122,571,572],{},"publishedDate"," and, with ",[122,575,576],{},"fullText",[122,578,460],{}," from ",[122,581,582],{},"raw_content",". ",[122,585,586],{},"summary"," asks for the query answer, which lands in response ",[122,589,590],{},"metadata.answer",", not on a result. Include and exclude domains work, ",[122,593,594],{},"startPublishedDate",[122,596,597],{},"endPublishedDate"," go through as ",[122,600,530],{},[122,602,533],{},[122,604,605],{},"category"," set to ",[122,608,609],{},"general",[122,611,309],{}," or ",[122,614,615],{},"finance"," picks Tavily's ",[122,618,527],{},[466,620,621,622,612,625,627,628,631,632,635,636,627,639,583,642,644,645,557,648,651],{},"Reads give ",[122,623,624],{},"markdown",[122,626,460],{}," in ",[122,629,630],{},"content",", the page ",[122,633,634],{},"title"," and Tavily's ",[122,637,638],{},"request_id",[122,640,641],{},"metadata.requestId",[122,643,560],{}," is passed on in seconds, clamped to Tavily's 1 to 60. No links, images or selectors, and ",[122,646,647],{},"maxTokens",[122,649,650],{},"noCache"," are ignored.",[110,653,655],{"id":654},"gotchas","Gotchas",[657,658,659,671,681,691,698,705,727,733],"ul",{},[660,661,662,663,666,667,670],"li",{},"The answer is one string for the whole query, so it lives on the response, not on a result. ",[122,664,665],{},"search()"," alone cannot show it, ",[122,668,669],{},"searchDetailed()"," can.",[660,672,673,676,677,680],{},[122,674,675],{},"search_depth"," is always ",[122,678,679],{},"basic",". Advanced depth costs more credits and is not exposed, on purpose.",[660,682,683,684,687,688,690],{},"Tavily dates a result only when asked, so every search asks. It writes the date as ",[122,685,686],{},"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 ",[122,689,572],{},". Tavily calls the field beta.",[660,692,693,694,697],{},"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 ",[122,695,696],{},"filter_by_published_date"," isn't sent on purpose.",[660,699,700,701,704],{},"A spent plan or pay-as-you-go cap comes back as HTTP 432 or 433, not 402. Both are ",[122,702,703],{},"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.",[660,706,707,708,711,712,715,716,357,719,722,723,726],{},"A page Extract cannot fetch is not an HTTP error. The response is a 200 with an empty ",[122,709,710],{},"results"," and the reason in ",[122,713,714],{},"failed_results"," (",[122,717,718],{},"404 page not found",[122,720,721],{},"Failed to fetch url",", which is also what a PDF gets). That becomes a ",[122,724,725],{},"WebError"," with the reason, not a fallback.",[660,728,729,732],{},[122,730,731],{},"url"," on a read is the one you asked for. Extract does not report where a redirect ended up.",[660,734,735,736,738,739,742],{},"Extract is ",[122,737,679],{}," depth, ",[122,740,741],{},"advanced"," (tables and embedded content, twice the credits) is not exposed. Basic costs one credit per five successful pages.",[110,744,746],{"id":745},"where-it-lives","Where it lives",[466,748,749,234],{},[122,750,751],{},"src\u002Fproviders\u002Ftavily.ts",[753,754,755],"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":120,"searchDepth":175,"depth":175,"links":757},[758,759,760,761,762],{"id":112,"depth":175,"text":113},{"id":475,"depth":175,"text":476},{"id":563,"depth":175,"text":564},{"id":654,"depth":175,"text":655},{"id":745,"depth":175,"text":746},"The Tavily search API, with an optional generated answer in response metadata, and Tavily Extract for reading pages.","md",null,{"icon":767},"i-lucide-compass",{"title":88,"description":763},"d4sjrVOx8Cx64pe4N659y7kP6TPLl104fr7hp97-6Lk",[771,773],{"title":84,"path":85,"stem":86,"description":772,"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":774,"children":-1},"TinyFish Search for news and research results with publisher metadata, and TinyFish Fetch for reading pages.",1790163165094]