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