[{"data":1,"prerenderedAt":528},["ShallowReactive",2],{"navigation_docs":3,"-providers-serpapi":104,"-providers-serpapi-surround":523},[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":80,"body":106,"description":516,"extension":517,"links":518,"meta":519,"navigation":156,"path":81,"seo":521,"stem":82,"__hash__":522},"docs\u002F2.providers\u002F08.serpapi.md",{"type":107,"value":108,"toc":509},"minimark",[109,113,118,297,305,309,357,361,415,419,496,500,505],[110,111],"provider-facts",{"provider":112},"serpapi",[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, searchByImage } from \"@agntn\u002Fweb\";\n\nconst serpapi = await create(\"serpapi\"); \u002F\u002F SERPAPI_API_KEY\nconst results = await serpapi.search(\"query\", { maxResults: 10 });\nconst in2021 = await serpapi.search(\"node.js release\", {\n  startPublishedDate: \"2021-01-01\",\n  endPublishedDate: \"2021-12-31\",\n});\nconst matches = await searchByImage(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\", { provider: \"serpapi\" });\n","ts","",[126,127,128,151,158,190,216,240,252,263,269],"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, searchByImage } ",[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}," serpapi ",[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},"\"serpapi\"",[129,184,185],{"class":139},"); ",[129,187,189],{"class":188},"scIB-","\u002F\u002F SERPAPI_API_KEY\n",[129,191,193,195,198,200,202,205,208,210,213],{"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}," serpapi.",[129,206,207],{"class":175},"search",[129,209,179],{"class":139},[129,211,212],{"class":146},"\"query\"",[129,214,215],{"class":139},", { maxResults: 10 });\n",[129,217,219,221,224,226,228,230,232,234,237],{"class":131,"line":218},5,[129,220,163],{"class":135},[129,222,223],{"class":139}," in2021 ",[129,225,169],{"class":135},[129,227,172],{"class":135},[129,229,204],{"class":139},[129,231,207],{"class":175},[129,233,179],{"class":139},[129,235,236],{"class":146},"\"node.js release\"",[129,238,239],{"class":139},", {\n",[129,241,243,246,249],{"class":131,"line":242},6,[129,244,245],{"class":139},"  startPublishedDate: ",[129,247,248],{"class":146},"\"2021-01-01\"",[129,250,251],{"class":139},",\n",[129,253,255,258,261],{"class":131,"line":254},7,[129,256,257],{"class":139},"  endPublishedDate: ",[129,259,260],{"class":146},"\"2021-12-31\"",[129,262,251],{"class":139},[129,264,266],{"class":131,"line":265},8,[129,267,268],{"class":139},"});\n",[129,270,272,274,277,279,281,284,286,289,292,294],{"class":131,"line":271},9,[129,273,163],{"class":135},[129,275,276],{"class":139}," matches ",[129,278,169],{"class":135},[129,280,172],{"class":135},[129,282,283],{"class":175}," searchByImage",[129,285,179],{"class":139},[129,287,288],{"class":146},"\"https:\u002F\u002Fexample.com\u002Fimage.jpg\"",[129,290,291],{"class":139},", { provider: ",[129,293,182],{"class":146},[129,295,296],{"class":139}," });\n",[298,299,300,301,304],"p",{},"The key is a query parameter on ",[126,302,303],{},"serpapi.com",".",[114,306,308],{"id":307},"what-it-reads","What it reads",[310,311,312,325],"table",{},[313,314,315],"thead",{},[316,317,318,322],"tr",{},[319,320,321],"th",{},"Call",[319,323,324],{},"Endpoint",[326,327,328,345],"tbody",{},[316,329,330,335],{},[331,332,333],"td",{},[126,334,207],{},[331,336,337,340,341,344],{},[126,338,339],{},"GET \u002Fsearch?engine=google&q=…&num=…&start=…",", plus ",[126,342,343],{},"tbs=cdr:1,cd_min:M\u002FD\u002FYYYY,cd_max:M\u002FD\u002FYYYY"," when a date bound is set",[316,346,347,352],{},[331,348,349],{},[126,350,351],{},"searchByImage",[331,353,354],{},[126,355,356],{},"GET \u002Fsearch?engine=google_lens&url=…",[114,358,360],{"id":359},"what-comes-back","What comes back",[298,362,363,364,367,368,371,372,375,376,379,380,375,383,386,387,390,391,394,395,398,399,367,402,405,406,367,409,375,412,304],{},"Search: ",[126,365,366],{},"publishedDate",", ",[126,369,370],{},"image"," (thumbnail), ",[126,373,374],{},"favicon"," and ",[126,377,378],{},"metadata.{position, source, displayedLink}",". ",[126,381,382],{},"startPublishedDate",[126,384,385],{},"endPublishedDate"," go out as Google's custom date range, the only filter here, and ",[126,388,389],{},"includeDomains"," and friends come back in ",[126,392,393],{},"ignoredFilters",". Paging through ",[126,396,397],{},"start",". Image matches carry ",[126,400,401],{},"pageUrl",[126,403,404],{},"imageUrl",", dimensions, ",[126,407,408],{},"source",[126,410,411],{},"position",[126,413,414],{},"exactMatch",[114,416,418],{"id":417},"gotchas","Gotchas",[420,421,422,448,456,466,489],"ul",{},[423,424,425,426,429,430,433,434,437,438,440,441,433,444,447],"li",{},"The date range takes whole days in US order, so each bound becomes its UTC day as ",[126,427,428],{},"M\u002FD\u002FYYYY",". A lone bound goes out alone, because Google takes ",[126,431,432],{},"cd_min"," or ",[126,435,436],{},"cd_max"," by itself and there is no reason to make up the other end. ",[126,439,366],{}," is Google's own text, ",[126,442,443],{},"Oct 19, 2021",[126,445,446],{},"6 days ago",", and plenty of results have none.",[423,449,450,451,455],{},"The only built-in reverse image provider. Everything under ",[452,453,454],"a",{"href":25},"Reverse image search"," applies.",[423,457,458,459,465],{},"250 searches a month on the ",[452,460,464],{"href":461,"rel":462},"https:\u002F\u002Fserpapi.com\u002Fpricing",[463],"nofollow","free plan"," as of September 2026. A burst answers 429 fast.",[423,467,468,471,472,475,476,479,480,482,483,485,486,488],{},[126,469,470],{},"maxResults"," is applied on our side to whatever Google or Lens returns. Google pays little attention to ",[126,473,474],{},"num"," (a ",[126,477,478],{},"maxResults: 1"," call still brought back nine organic results) and hands a different page for a ",[126,481,397],{}," off the ten grid, so a small ",[126,484,470],{}," walks each Google page in slices: the continuation fetches the same page again, which SerpAPI serves from its cache for an hour without charging, and ",[126,487,397],{}," moves only once the page is used up.",[423,490,491,492,495],{},"No matches is an empty list, not an error. An image Lens cannot fetch looks the same, so ",[126,493,494],{},"[]"," may also mean the provider never saw the picture.",[114,497,499],{"id":498},"where-it-lives","Where it lives",[298,501,502,304],{},[126,503,504],{},"src\u002Fproviders\u002Fserpapi.ts",[506,507,508],"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":510},[511,512,513,514,515],{"id":116,"depth":153,"text":117},{"id":307,"depth":153,"text":308},{"id":359,"depth":153,"text":360},{"id":417,"depth":153,"text":418},{"id":498,"depth":153,"text":499},"SerpAPI's Google endpoints for classic SERP results and Google Lens for reverse image search.","md",null,{"icon":520},"i-lucide-scan-search",{"title":80,"description":516},"yCOZIDCjfQljtSYGooJq4VrKWn80piZSjH5LzhNGcYU",[524,526],{"title":76,"path":77,"stem":78,"description":525,"children":-1},"A self-hosted SearXNG metasearch instance, no key, with a reachability probe and the engines behind each result in metadata.",{"title":84,"path":85,"stem":86,"description":527,"children":-1},"SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.",1791204847392]