[{"data":1,"prerenderedAt":422},["ShallowReactive",2],{"navigation_docs":3,"-providers-serpbase":104,"-providers-serpbase-surround":417},[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":84,"body":106,"description":410,"extension":411,"links":412,"meta":413,"navigation":171,"path":85,"seo":415,"stem":86,"__hash__":416},"docs\u002F2.providers\u002F09.serpbase.md",{"type":107,"value":108,"toc":403},"minimark",[109,113,118,271,282,286,334,338,361,365,390,394,399],[110,111],"provider-facts",{"provider":112},"serpbase",[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 } from \"@agntn\u002Fweb\";\n\nconst serpbase = await create(\"serpbase\"); \u002F\u002F SERPBASE_API_KEY\nconst results = await serpbase.search(\"query\", { category: \"news\", maxResults: 10 });\n","ts","",[126,127,128,166,173,210],"code",{"__ignoreMap":124},[129,130,133,137,141,145,148,152,156,160,163],"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,151],{"class":150},"stCPd"," from",[129,153,155],{"class":154},"scVjq"," \"",[129,157,159],{"class":158},"sQ7BG","@agntn\u002Fweb",[129,161,162],{"class":154},"\"",[129,164,165],{"class":139},";\n",[129,167,169],{"class":131,"line":168},2,[129,170,172],{"emptyLinePlaceholder":171},true,"\n",[129,174,176,180,184,187,191,194,197,199,201,203,206],{"class":131,"line":175},3,[129,177,179],{"class":178},"s1TYA","const",[129,181,183],{"class":182},"saoiD"," serpbase",[129,185,186],{"class":178}," =",[129,188,190],{"class":189},"sZW6a"," await",[129,192,144],{"class":193},"sULi6",[129,195,196],{"class":139},"(",[129,198,162],{"class":154},[129,200,112],{"class":158},[129,202,162],{"class":154},[129,204,205],{"class":139},"); ",[129,207,209],{"class":208},"sjhu3","\u002F\u002F SERPBASE_API_KEY\n",[129,211,213,215,218,220,222,225,228,231,233,235,238,240,243,246,249,251,254,256,259,262,264,268],{"class":131,"line":212},4,[129,214,179],{"class":178},[129,216,217],{"class":182}," results",[129,219,186],{"class":178},[129,221,190],{"class":189},[129,223,183],{"class":224},"spVlQ",[129,226,227],{"class":139},".",[129,229,230],{"class":193},"search",[129,232,196],{"class":139},[129,234,162],{"class":154},[129,236,237],{"class":158},"query",[129,239,162],{"class":154},[129,241,242],{"class":139},", {",[129,244,245],{"class":143}," category",[129,247,248],{"class":139},":",[129,250,155],{"class":154},[129,252,253],{"class":158},"news",[129,255,162],{"class":154},[129,257,258],{"class":139},",",[129,260,261],{"class":143}," maxResults",[129,263,248],{"class":139},[129,265,267],{"class":266},"siHFe"," 10",[129,269,270],{"class":139}," });\n",[272,273,274,275,278,279,227],"p",{},"The key goes in the ",[126,276,277],{},"X-API-Key"," header against ",[126,280,281],{},"api.serpbase.dev",[114,283,285],{"id":284},"what-it-reads","What it reads",[287,288,289,302],"table",{},[290,291,292],"thead",{},[293,294,295,299],"tr",{},[296,297,298],"th",{},"Call",[296,300,301],{},"Endpoint",[303,304,305],"tbody",{},[293,306,307,312],{},[308,309,310],"td",{},[126,311,230],{},[308,313,314,317,318,321,322,325,326,325,328,321,331],{},[126,315,316],{},"POST"," to the endpoint the category picks: web by default, ",[126,319,320],{},"images","\u002F",[126,323,324],{},"image",", ",[126,327,253],{},[126,329,330],{},"videos",[126,332,333],{},"video",[114,335,337],{"id":336},"what-comes-back","What comes back",[272,339,340,325,343,325,345,348,349,352,353,356,357,360],{},[126,341,342],{},"publishedDate",[126,344,324],{},[126,346,347],{},"favicon"," and ",[126,350,351],{},"metadata.{position, rank, searchType, requestId, elapsedMs, creditsCharged}",". Only ",[126,354,355],{},"category"," is honoured. Paging works, but the next token stays ",[126,358,359],{},"unknown"," until a page comes back empty, SerpBase does not say when it is done.",[114,362,364],{"id":363},"gotchas","Gotchas",[366,367,368,375],"ul",{},[369,370,371,374],"li",{},[126,372,373],{},"maxResults"," is applied on our side to the returned page, the endpoint decides the page size.",[369,376,377,378,381,382,385,386,389],{},"Credits are charged per request and reported in ",[126,379,380],{},"metadata.creditsCharged",". An empty balance answers HTTP 200 with ",[126,383,384],{},"status: 1020",". That is ",[126,387,388],{},"PaymentError"," here, so automatic search tries the next configured provider instead of stopping.",[114,391,393],{"id":392},"where-it-lives","Where it lives",[272,395,396,227],{},[126,397,398],{},"src\u002Fproviders\u002Fserpbase.ts",[400,401,402],"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":168,"depth":168,"links":404},[405,406,407,408,409],{"id":116,"depth":168,"text":117},{"id":284,"depth":168,"text":285},{"id":336,"depth":168,"text":337},{"id":363,"depth":168,"text":364},{"id":392,"depth":168,"text":393},"SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.","md",null,{"icon":414},"i-lucide-layers",{"title":84,"description":410},"vRy2aZM_BVpCWC-Xl5m8AyNUlm4tsWZnEN3IYOloe7Y",[418,420],{"title":80,"path":81,"stem":82,"description":419,"children":-1},"SerpAPI's Google endpoints for classic SERP results and Google Lens for reverse image search.",{"title":88,"path":89,"stem":90,"description":421,"children":-1},"The Tavily search API, with an optional generated answer in response metadata, and Tavily Extract for reading pages.",1790257651978]