[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"navigation_docs":3,"-providers-serpapi":100,"-providers-serpapi-surround":469},[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":99},"Providers","\u002Fproviders","2.providers\u002F0.index",[49,51,55,59,63,67,71,75,79,83,87,91,95],{"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","i-lucide-library",{"id":101,"title":80,"body":102,"description":462,"extension":463,"links":464,"meta":465,"navigation":173,"path":81,"seo":467,"stem":82,"__hash__":468},"docs\u002F2.providers\u002F08.serpapi.md",{"type":103,"value":104,"toc":455},"minimark",[105,109,114,296,303,307,350,354,393,397,442,446,451],[106,107],"provider-facts",{"provider":108},"serpapi",[110,111,113],"h2",{"id":112},"address-it","Address it",[115,116,121],"pre",{"className":117,"code":118,"language":119,"meta":120,"style":120},"language-ts shiki shiki-themes github-light github-light poimandres","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 matches = await searchByImage(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\", { provider: \"serpapi\" });\n","ts","",[122,123,124,168,175,212,258],"code",{"__ignoreMap":120},[125,126,129,133,137,141,144,147,150,154,158,162,165],"span",{"class":127,"line":128},"line",1,[125,130,132],{"class":131},"sP0CR","import",[125,134,136],{"class":135},"sKlNE"," {",[125,138,140],{"class":139},"snHMy"," create",[125,142,143],{"class":135},",",[125,145,146],{"class":139}," searchByImage",[125,148,149],{"class":135}," }",[125,151,153],{"class":152},"stCPd"," from",[125,155,157],{"class":156},"scVjq"," \"",[125,159,161],{"class":160},"sQ7BG","@agntn\u002Fweb",[125,163,164],{"class":156},"\"",[125,166,167],{"class":135},";\n",[125,169,171],{"class":127,"line":170},2,[125,172,174],{"emptyLinePlaceholder":173},true,"\n",[125,176,178,182,186,189,193,196,199,201,203,205,208],{"class":127,"line":177},3,[125,179,181],{"class":180},"s1TYA","const",[125,183,185],{"class":184},"saoiD"," serpapi",[125,187,188],{"class":180}," =",[125,190,192],{"class":191},"sZW6a"," await",[125,194,140],{"class":195},"sULi6",[125,197,198],{"class":135},"(",[125,200,164],{"class":156},[125,202,108],{"class":160},[125,204,164],{"class":156},[125,206,207],{"class":135},"); ",[125,209,211],{"class":210},"sjhu3","\u002F\u002F SERPAPI_API_KEY\n",[125,213,215,217,220,222,224,227,230,233,235,237,240,242,245,248,251,255],{"class":127,"line":214},4,[125,216,181],{"class":180},[125,218,219],{"class":184}," results",[125,221,188],{"class":180},[125,223,192],{"class":191},[125,225,185],{"class":226},"spVlQ",[125,228,229],{"class":135},".",[125,231,232],{"class":195},"search",[125,234,198],{"class":135},[125,236,164],{"class":156},[125,238,239],{"class":160},"query",[125,241,164],{"class":156},[125,243,244],{"class":135},", {",[125,246,247],{"class":139}," maxResults",[125,249,250],{"class":135},":",[125,252,254],{"class":253},"siHFe"," 10",[125,256,257],{"class":135}," });\n",[125,259,261,263,266,268,270,272,274,276,279,281,283,286,288,290,292,294],{"class":127,"line":260},5,[125,262,181],{"class":180},[125,264,265],{"class":184}," matches",[125,267,188],{"class":180},[125,269,192],{"class":191},[125,271,146],{"class":195},[125,273,198],{"class":135},[125,275,164],{"class":156},[125,277,278],{"class":160},"https:\u002F\u002Fexample.com\u002Fimage.jpg",[125,280,164],{"class":156},[125,282,244],{"class":135},[125,284,285],{"class":139}," provider",[125,287,250],{"class":135},[125,289,157],{"class":156},[125,291,108],{"class":160},[125,293,164],{"class":156},[125,295,257],{"class":135},[297,298,299,300,229],"p",{},"The key is a query parameter on ",[122,301,302],{},"serpapi.com",[110,304,306],{"id":305},"what-it-reads","What it reads",[308,309,310,323],"table",{},[311,312,313],"thead",{},[314,315,316,320],"tr",{},[317,318,319],"th",{},"Call",[317,321,322],{},"Endpoint",[324,325,326,338],"tbody",{},[314,327,328,333],{},[329,330,331],"td",{},[122,332,232],{},[329,334,335],{},[122,336,337],{},"GET \u002Fsearch?engine=google&q=…&num=…&start=…",[314,339,340,345],{},[329,341,342],{},[122,343,344],{},"searchByImage",[329,346,347],{},[122,348,349],{},"GET \u002Fsearch?engine=google_lens&url=…",[110,351,353],{"id":352},"what-comes-back","What comes back",[297,355,356,357,360,361,364,365,368,369,372,373,376,377,360,380,383,384,360,387,368,390,229],{},"Search: ",[122,358,359],{},"publishedDate",", ",[122,362,363],{},"image"," (thumbnail), ",[122,366,367],{},"favicon"," and ",[122,370,371],{},"metadata.{position, source, displayedLink}",". No filters. Paging through ",[122,374,375],{},"start",". Image matches carry ",[122,378,379],{},"pageUrl",[122,381,382],{},"imageUrl",", dimensions, ",[122,385,386],{},"source",[122,388,389],{},"position",[122,391,392],{},"exactMatch",[110,394,396],{"id":395},"gotchas","Gotchas",[398,399,400,409,412,435],"ul",{},[401,402,403,404,408],"li",{},"The only built-in reverse image provider. Everything under ",[405,406,407],"a",{"href":25},"Reverse image search"," applies.",[401,410,411],{},"100 searches a month on the free plan. A burst answers 429 fast.",[401,413,414,417,418,421,422,425,426,428,429,431,432,434],{},[122,415,416],{},"maxResults"," is applied on our side to whatever Google or Lens returns. Google pays little attention to ",[122,419,420],{},"num"," (a ",[122,423,424],{},"maxResults: 1"," call still brought back nine organic results) and hands a different page for a ",[122,427,375],{}," off the ten grid, so a small ",[122,430,416],{}," 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 ",[122,433,375],{}," moves only once the page is used up.",[401,436,437,438,441],{},"No matches is an empty list, not an error. An image Lens cannot fetch looks the same, so ",[122,439,440],{},"[]"," may also mean the provider never saw the picture.",[110,443,445],{"id":444},"where-it-lives","Where it lives",[297,447,448,229],{},[122,449,450],{},"src\u002Fproviders\u002Fserpapi.ts",[452,453,454],"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":120,"searchDepth":170,"depth":170,"links":456},[457,458,459,460,461],{"id":112,"depth":170,"text":113},{"id":305,"depth":170,"text":306},{"id":352,"depth":170,"text":353},{"id":395,"depth":170,"text":396},{"id":444,"depth":170,"text":445},"SerpAPI's Google endpoints for classic SERP results and Google Lens for reverse image search.","md",null,{"icon":466},"i-lucide-scan-search",{"title":80,"description":462},"qB032qY3exE48bnWFbfhxc1QpID-6J4844xWEKXG7dA",[470,472],{"title":76,"path":77,"stem":78,"description":471,"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":473,"children":-1},"SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.",1790041407472]