[{"data":1,"prerenderedAt":590},["ShallowReactive",2],{"navigation_docs":3,"-providers-serpapi":100,"-providers-serpapi-surround":585},[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":578,"extension":579,"links":580,"meta":581,"navigation":173,"path":81,"seo":583,"stem":82,"__hash__":584},"docs\u002F2.providers\u002F08.serpapi.md",{"type":103,"value":104,"toc":571},"minimark",[105,109,114,367,374,378,426,430,484,488,558,562,567],[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 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","",[122,123,124,168,175,212,258,288,306,323,329],"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,278,280,283,285],{"class":127,"line":260},5,[125,262,181],{"class":180},[125,264,265],{"class":184}," in2021",[125,267,188],{"class":180},[125,269,192],{"class":191},[125,271,185],{"class":226},[125,273,229],{"class":135},[125,275,232],{"class":195},[125,277,198],{"class":135},[125,279,164],{"class":156},[125,281,282],{"class":160},"node.js release",[125,284,164],{"class":156},[125,286,287],{"class":135},", {\n",[125,289,291,294,296,298,301,303],{"class":127,"line":290},6,[125,292,293],{"class":139},"  startPublishedDate",[125,295,250],{"class":135},[125,297,157],{"class":156},[125,299,300],{"class":160},"2021-01-01",[125,302,164],{"class":156},[125,304,305],{"class":135},",\n",[125,307,309,312,314,316,319,321],{"class":127,"line":308},7,[125,310,311],{"class":139},"  endPublishedDate",[125,313,250],{"class":135},[125,315,157],{"class":156},[125,317,318],{"class":160},"2021-12-31",[125,320,164],{"class":156},[125,322,305],{"class":135},[125,324,326],{"class":127,"line":325},8,[125,327,328],{"class":135},"});\n",[125,330,332,334,337,339,341,343,345,347,350,352,354,357,359,361,363,365],{"class":127,"line":331},9,[125,333,181],{"class":180},[125,335,336],{"class":184}," matches",[125,338,188],{"class":180},[125,340,192],{"class":191},[125,342,146],{"class":195},[125,344,198],{"class":135},[125,346,164],{"class":156},[125,348,349],{"class":160},"https:\u002F\u002Fexample.com\u002Fimage.jpg",[125,351,164],{"class":156},[125,353,244],{"class":135},[125,355,356],{"class":139}," provider",[125,358,250],{"class":135},[125,360,157],{"class":156},[125,362,108],{"class":160},[125,364,164],{"class":156},[125,366,257],{"class":135},[368,369,370,371,229],"p",{},"The key is a query parameter on ",[122,372,373],{},"serpapi.com",[110,375,377],{"id":376},"what-it-reads","What it reads",[379,380,381,394],"table",{},[382,383,384],"thead",{},[385,386,387,391],"tr",{},[388,389,390],"th",{},"Call",[388,392,393],{},"Endpoint",[395,396,397,414],"tbody",{},[385,398,399,404],{},[400,401,402],"td",{},[122,403,232],{},[400,405,406,409,410,413],{},[122,407,408],{},"GET \u002Fsearch?engine=google&q=…&num=…&start=…",", plus ",[122,411,412],{},"tbs=cdr:1,cd_min:M\u002FD\u002FYYYY,cd_max:M\u002FD\u002FYYYY"," when a date bound is set",[385,415,416,421],{},[400,417,418],{},[122,419,420],{},"searchByImage",[400,422,423],{},[122,424,425],{},"GET \u002Fsearch?engine=google_lens&url=…",[110,427,429],{"id":428},"what-comes-back","What comes back",[368,431,432,433,436,437,440,441,444,445,448,449,444,452,455,456,459,460,463,464,467,468,436,471,474,475,436,478,444,481,229],{},"Search: ",[122,434,435],{},"publishedDate",", ",[122,438,439],{},"image"," (thumbnail), ",[122,442,443],{},"favicon"," and ",[122,446,447],{},"metadata.{position, source, displayedLink}",". ",[122,450,451],{},"startPublishedDate",[122,453,454],{},"endPublishedDate"," go out as Google's custom date range, the only filter here, and ",[122,457,458],{},"includeDomains"," and friends come back in ",[122,461,462],{},"ignoredFilters",". Paging through ",[122,465,466],{},"start",". Image matches carry ",[122,469,470],{},"pageUrl",[122,472,473],{},"imageUrl",", dimensions, ",[122,476,477],{},"source",[122,479,480],{},"position",[122,482,483],{},"exactMatch",[110,485,487],{"id":486},"gotchas","Gotchas",[489,490,491,517,525,528,551],"ul",{},[492,493,494,495,498,499,502,503,506,507,509,510,502,513,516],"li",{},"The date range takes whole days in US order, so each bound becomes its UTC day as ",[122,496,497],{},"M\u002FD\u002FYYYY",". A lone bound goes out alone, because Google takes ",[122,500,501],{},"cd_min"," or ",[122,504,505],{},"cd_max"," by itself and there is no reason to make up the other end. ",[122,508,435],{}," is Google's own text, ",[122,511,512],{},"Oct 19, 2021",[122,514,515],{},"6 days ago",", and plenty of results have none.",[492,518,519,520,524],{},"The only built-in reverse image provider. Everything under ",[521,522,523],"a",{"href":25},"Reverse image search"," applies.",[492,526,527],{},"100 searches a month on the free plan. A burst answers 429 fast.",[492,529,530,533,534,537,538,541,542,544,545,547,548,550],{},[122,531,532],{},"maxResults"," is applied on our side to whatever Google or Lens returns. Google pays little attention to ",[122,535,536],{},"num"," (a ",[122,539,540],{},"maxResults: 1"," call still brought back nine organic results) and hands a different page for a ",[122,543,466],{}," off the ten grid, so a small ",[122,546,532],{}," 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,549,466],{}," moves only once the page is used up.",[492,552,553,554,557],{},"No matches is an empty list, not an error. An image Lens cannot fetch looks the same, so ",[122,555,556],{},"[]"," may also mean the provider never saw the picture.",[110,559,561],{"id":560},"where-it-lives","Where it lives",[368,563,564,229],{},[122,565,566],{},"src\u002Fproviders\u002Fserpapi.ts",[568,569,570],"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":572},[573,574,575,576,577],{"id":112,"depth":170,"text":113},{"id":376,"depth":170,"text":377},{"id":428,"depth":170,"text":429},{"id":486,"depth":170,"text":487},{"id":560,"depth":170,"text":561},"SerpAPI's Google endpoints for classic SERP results and Google Lens for reverse image search.","md",null,{"icon":582},"i-lucide-scan-search",{"title":80,"description":578},"q2IX2ssMRPWdI38LvdTZf2QxC3dqvt3Sp5ny4b4wX1Q",[586,588],{"title":76,"path":77,"stem":78,"description":587,"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":589,"children":-1},"SerpBase's Google SERP endpoints, with a category that picks the web, images, news or videos endpoint.",1790163163806]