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