[{"data":1,"prerenderedAt":506},["ShallowReactive",2],{"navigation_docs":3,"-providers-tinyfish":104,"-providers-tinyfish-surround":501},[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":92,"body":106,"description":494,"extension":495,"links":496,"meta":497,"navigation":156,"path":93,"seo":499,"stem":94,"__hash__":500},"docs\u002F2.providers\u002F11.tinyfish.md",{"type":107,"value":108,"toc":487},"minimark",[109,113,118,249,269,273,318,322,358,362,474,478,483],[110,111],"provider-facts",{"provider":112},"tinyfish",[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 } from \"@agntn\u002Fweb\";\n\nconst tinyfish = await create(\"tinyfish\"); \u002F\u002F TINYFISH_API_KEY\nconst results = await tinyfish.search(\"transformer inference\", { category: \"research_paper\" });\nconst page = await readUrl(\"https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762\", { provider: \"tinyfish\" });\n","ts","",[126,127,128,151,158,190,222],"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 } ",[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}," tinyfish ",[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},"\"tinyfish\"",[129,184,185],{"class":139},"); ",[129,187,189],{"class":188},"scIB-","\u002F\u002F TINYFISH_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}," tinyfish.",[129,206,207],{"class":175},"search",[129,209,179],{"class":139},[129,211,212],{"class":146},"\"transformer inference\"",[129,214,215],{"class":139},", { category: ",[129,217,218],{"class":146},"\"research_paper\"",[129,220,221],{"class":139}," });\n",[129,223,225,227,230,232,234,237,239,242,245,247],{"class":131,"line":224},5,[129,226,163],{"class":135},[129,228,229],{"class":139}," page ",[129,231,169],{"class":135},[129,233,172],{"class":135},[129,235,236],{"class":175}," readUrl",[129,238,179],{"class":139},[129,240,241],{"class":146},"\"https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762\"",[129,243,244],{"class":139},", { provider: ",[129,246,182],{"class":146},[129,248,221],{"class":139},[250,251,252,253,256,257,260,261,264,265,268],"p",{},"The key goes in the ",[126,254,255],{},"X-API-Key"," header. Search talks to ",[126,258,259],{},"api.search.tinyfish.ai",", reads to ",[126,262,263],{},"api.fetch.tinyfish.ai",", ",[126,266,267],{},"readBaseURL"," in the config moves the second one.",[114,270,272],{"id":271},"what-it-reads","What it reads",[274,275,276,289],"table",{},[277,278,279],"thead",{},[280,281,282,286],"tr",{},[283,284,285],"th",{},"Call",[283,287,288],{},"Endpoint",[290,291,292,305],"tbody",{},[280,293,294,299],{},[295,296,297],"td",{},[126,298,207],{},[295,300,301,304],{},[126,302,303],{},"GET"," on the search host with the query, filters and a page number",[280,306,307,312],{},[295,308,309],{},[126,310,311],{},"read",[295,313,314,317],{},[126,315,316],{},"POST"," on the fetch host",[114,319,321],{"id":320},"what-comes-back","What comes back",[250,323,324,264,327,330,331,334,335,338,339,342,343,346,347,350,351,342,354,357],{},[126,325,326],{},"publishedDate",[126,328,329],{},"author"," and ",[126,332,333],{},"metadata.{position, siteName, publisher, authors, venue, year, citedByCount, pdfUrl}",", which is why it is the one to use for papers. Domain filters, a ",[126,336,337],{},"category"," of ",[126,340,341],{},"news"," or ",[126,344,345],{},"research_paper"," and both date bounds work. Paging goes up to ten pages, the next token stays ",[126,348,349],{},"unknown"," until a page comes back empty. Reads give ",[126,352,353],{},"markdown",[126,355,356],{},"html",".",[114,359,361],{"id":360},"gotchas","Gotchas",[363,364,365,372,387,420,459,471],"ul",{},[366,367,368,371],"li",{},[126,369,370],{},"maxResults"," is applied on our side to one result page.",[366,373,374,375,378,379,382,383,386],{},"A bounded read asks for ",[126,376,377],{},"links"," only when it will keep them. ",[126,380,381],{},"image_links"," stays on, because ",[126,384,385],{},"image"," is the first image URL and a bounded read still returns it.",[366,388,389,390,393,394,397,398,400,401,403,404,407,408,411,412,415,416,419],{},"TinyFish parses a plain-text file as HTML, whether the read asks for Markdown or HTML. Every ",[126,391,392],{},"\u003C...>"," comes back empty, and ",[126,395,396],{},"\u003Cscript\u002Fscript.h>"," swallows the rest of the file. So a read with no title, description or language asks again for the JSON tree. When that tree holds one ",[126,399,126],{}," node, its text is the file byte for byte, and the read returns it. An ",[126,402,356],{}," read gets it escaped inside ",[126,405,406],{},"\u003Cpre>",", the way a browser shows a text file. Asked right after the Markdown, the tree can come from cache as ",[126,409,410],{},"text: null",", so the read asks once more with ",[126,413,414],{},"ttl: 0",". A ",[126,417,418],{},"noCache"," read skips it, since that tree never came from cache. A failed tree request keeps what came first.",[366,421,422,423,426,427,430,431,264,434,264,437,264,440,443,444,447,448,450,451,454,455,458],{},"A page Fetch could not get is a ",[126,424,425],{},"200"," with the reason in ",[126,428,429],{},"errors",". Reasons about TinyFish's own fetcher (",[126,432,433],{},"bot_blocked",[126,435,436],{},"login_required",[126,438,439],{},"timeout",[126,441,442],{},"target_http_error"," and the like) become ",[126,445,446],{},"PageFetchError",", so an automatic read moves on to Tavily or Exa. The status inside ",[126,449,442],{}," is what TinyFish got back, and once it was a 401 on a public raw GitHub file that curl read fine. ",[126,452,453],{},"page_not_found"," stays an ",[126,456,457],{},"HTTPError"," with its 404 or 410, and a bad URL or selector stops the chain.",[366,460,461,462,464,465,330,468,357],{},"The window is by day, a datetime bound becomes its UTC day. With ",[126,463,345],{}," only the year of each bound goes through, as ",[126,466,467],{},"pub_year_min",[126,469,470],{},"pub_year_max",[366,472,473],{},"Search access has to be enabled on the TinyFish account. A key without it answers with an auth failure, not a helpful message.",[114,475,477],{"id":476},"where-it-lives","Where it lives",[250,479,480,357],{},[126,481,482],{},"src\u002Fproviders\u002Ftinyfish.ts",[484,485,486],"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":488},[489,490,491,492,493],{"id":116,"depth":153,"text":117},{"id":271,"depth":153,"text":272},{"id":320,"depth":153,"text":321},{"id":360,"depth":153,"text":361},{"id":476,"depth":153,"text":477},"TinyFish Search for news and research results with publisher metadata, and TinyFish Fetch for reading pages.","md",null,{"icon":498},"i-lucide-fish",{"title":92,"description":494},"zirphP3PGb1LO9xH2uKFkr-jumy-J3VYHU4FsUh_sDc",[502,504],{"title":88,"path":89,"stem":90,"description":503,"children":-1},"The Tavily search API, with an optional generated answer in response metadata, and Tavily Extract for reading pages.",{"title":96,"path":97,"stem":98,"description":505,"children":-1},"Web search through your existing Pi, OMP, Codex or OpenCode login.",1790790788307]