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