[{"data":1,"prerenderedAt":557},["ShallowReactive",2],{"navigation_docs":3,"-guide-image":96,"-guide-image-surround":552},[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":24,"body":98,"description":545,"extension":546,"links":547,"meta":548,"navigation":159,"path":25,"seo":550,"stem":26,"__hash__":551},"docs\u002F1.guide\u002F5.image.md",{"type":99,"value":100,"toc":540},"minimark",[101,106,321,333,503,506,510,529,533,536],[102,103,105],"h2",{"id":104},"search-by-image","Search by image",[107,108,113],"pre",{"className":109,"code":110,"language":111,"meta":112,"style":112},"language-ts shiki shiki-themes github-light github-light poimandres","import { searchByImage } from \"@agntn\u002Fweb\";\n\nconst matches = await searchByImage(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\", {\n  provider: \"serpapi\",\n  maxResults: 5,\n});\n\nfor (const match of matches) {\n  console.log(match.pageUrl, match.imageUrl, match.imageWidth, match.imageHeight);\n}\n","ts","",[114,115,116,154,161,195,214,228,234,239,262,315],"code",{"__ignoreMap":112},[117,118,121,125,129,133,136,140,144,148,151],"span",{"class":119,"line":120},"line",1,[117,122,124],{"class":123},"sP0CR","import",[117,126,128],{"class":127},"sKlNE"," {",[117,130,132],{"class":131},"snHMy"," searchByImage",[117,134,135],{"class":127}," }",[117,137,139],{"class":138},"stCPd"," from",[117,141,143],{"class":142},"scVjq"," \"",[117,145,147],{"class":146},"sQ7BG","@agntn\u002Fweb",[117,149,150],{"class":142},"\"",[117,152,153],{"class":127},";\n",[117,155,157],{"class":119,"line":156},2,[117,158,160],{"emptyLinePlaceholder":159},true,"\n",[117,162,164,168,172,175,179,182,185,187,190,192],{"class":119,"line":163},3,[117,165,167],{"class":166},"s1TYA","const",[117,169,171],{"class":170},"saoiD"," matches",[117,173,174],{"class":166}," =",[117,176,178],{"class":177},"sZW6a"," await",[117,180,132],{"class":181},"sULi6",[117,183,184],{"class":127},"(",[117,186,150],{"class":142},[117,188,189],{"class":146},"https:\u002F\u002Fexample.com\u002Fimage.jpg",[117,191,150],{"class":142},[117,193,194],{"class":127},", {\n",[117,196,198,201,204,206,209,211],{"class":119,"line":197},4,[117,199,200],{"class":131},"  provider",[117,202,203],{"class":127},":",[117,205,143],{"class":142},[117,207,208],{"class":146},"serpapi",[117,210,150],{"class":142},[117,212,213],{"class":127},",\n",[117,215,217,220,222,226],{"class":119,"line":216},5,[117,218,219],{"class":131},"  maxResults",[117,221,203],{"class":127},[117,223,225],{"class":224},"siHFe"," 5",[117,227,213],{"class":127},[117,229,231],{"class":119,"line":230},6,[117,232,233],{"class":127},"});\n",[117,235,237],{"class":119,"line":236},7,[117,238,160],{"emptyLinePlaceholder":159},[117,240,242,245,248,250,253,256,259],{"class":119,"line":241},8,[117,243,244],{"class":138},"for",[117,246,247],{"class":127}," (",[117,249,167],{"class":166},[117,251,252],{"class":170}," match",[117,254,255],{"class":166}," of",[117,257,171],{"class":258},"spVlQ",[117,260,261],{"class":127},") {\n",[117,263,265,268,271,274,276,279,281,284,287,289,291,294,296,298,300,303,305,307,309,312],{"class":119,"line":264},9,[117,266,267],{"class":258},"  console",[117,269,270],{"class":127},".",[117,272,273],{"class":181},"log",[117,275,184],{"class":127},[117,277,278],{"class":258},"match",[117,280,270],{"class":127},[117,282,283],{"class":258},"pageUrl",[117,285,286],{"class":127},", ",[117,288,278],{"class":258},[117,290,270],{"class":127},[117,292,293],{"class":258},"imageUrl",[117,295,286],{"class":127},[117,297,278],{"class":258},[117,299,270],{"class":127},[117,301,302],{"class":258},"imageWidth",[117,304,286],{"class":127},[117,306,278],{"class":258},[117,308,270],{"class":127},[117,310,311],{"class":258},"imageHeight",[117,313,314],{"class":127},");\n",[117,316,318],{"class":119,"line":317},10,[117,319,320],{"class":127},"}\n",[322,323,324,325,328,329,332],"p",{},"This is its own capability, not a text search with a URL stuffed into the query. A provider without image lookup gets ",[114,326,327],{},"ImageSearchNotSupportedError",", not a fake query it would answer with garbage. ",[114,330,331],{},"searchImageProviders()"," lists the ones that have it. Right now that is SerpAPI, which goes through Google Lens.",[107,334,336],{"className":109,"code":335,"language":111,"meta":112,"style":112},"interface ImageSearchResult {\n  pageUrl: string; \u002F\u002F the page that shows the image\n  imageUrl: string; \u002F\u002F the matched image\n  title: string;\n  provider: string;\n  source?: string;\n  thumbnailUrl?: string;\n  imageWidth?: number;\n  imageHeight?: number;\n  thumbnailWidth?: number;\n  thumbnailHeight?: number;\n  position?: number;\n  exactMatch?: boolean;\n}\n",[114,337,338,350,369,383,394,404,416,427,439,450,461,473,485,498],{"__ignoreMap":112},[117,339,340,343,347],{"class":119,"line":120},[117,341,342],{"class":166},"interface",[117,344,346],{"class":345},"sCrqT"," ImageSearchResult",[117,348,349],{"class":127}," {\n",[117,351,352,356,358,362,365],{"class":119,"line":156},[117,353,355],{"class":354},"s0VbO","  pageUrl",[117,357,203],{"class":166},[117,359,361],{"class":360},"s8yaW"," string",[117,363,364],{"class":127},"; ",[117,366,368],{"class":367},"sjhu3","\u002F\u002F the page that shows the image\n",[117,370,371,374,376,378,380],{"class":119,"line":163},[117,372,373],{"class":354},"  imageUrl",[117,375,203],{"class":166},[117,377,361],{"class":360},[117,379,364],{"class":127},[117,381,382],{"class":367},"\u002F\u002F the matched image\n",[117,384,385,388,390,392],{"class":119,"line":197},[117,386,387],{"class":354},"  title",[117,389,203],{"class":166},[117,391,361],{"class":360},[117,393,153],{"class":127},[117,395,396,398,400,402],{"class":119,"line":216},[117,397,200],{"class":354},[117,399,203],{"class":166},[117,401,361],{"class":360},[117,403,153],{"class":127},[117,405,406,409,412,414],{"class":119,"line":230},[117,407,408],{"class":354},"  source",[117,410,411],{"class":166},"?:",[117,413,361],{"class":360},[117,415,153],{"class":127},[117,417,418,421,423,425],{"class":119,"line":236},[117,419,420],{"class":354},"  thumbnailUrl",[117,422,411],{"class":166},[117,424,361],{"class":360},[117,426,153],{"class":127},[117,428,429,432,434,437],{"class":119,"line":241},[117,430,431],{"class":354},"  imageWidth",[117,433,411],{"class":166},[117,435,436],{"class":360}," number",[117,438,153],{"class":127},[117,440,441,444,446,448],{"class":119,"line":264},[117,442,443],{"class":354},"  imageHeight",[117,445,411],{"class":166},[117,447,436],{"class":360},[117,449,153],{"class":127},[117,451,452,455,457,459],{"class":119,"line":317},[117,453,454],{"class":354},"  thumbnailWidth",[117,456,411],{"class":166},[117,458,436],{"class":360},[117,460,153],{"class":127},[117,462,464,467,469,471],{"class":119,"line":463},11,[117,465,466],{"class":354},"  thumbnailHeight",[117,468,411],{"class":166},[117,470,436],{"class":360},[117,472,153],{"class":127},[117,474,476,479,481,483],{"class":119,"line":475},12,[117,477,478],{"class":354},"  position",[117,480,411],{"class":166},[117,482,436],{"class":360},[117,484,153],{"class":127},[117,486,488,491,493,496],{"class":119,"line":487},13,[117,489,490],{"class":354},"  exactMatch",[117,492,411],{"class":166},[117,494,495],{"class":360}," boolean",[117,497,153],{"class":127},[117,499,501],{"class":119,"line":500},14,[117,502,320],{"class":127},[322,504,505],{},"Page and image stay separate on purpose. A match says where the image appears and which file matched, and never pretends those are the same thing.",[102,507,509],{"id":508},"what-the-url-must-be","What the URL must be",[322,511,512,513,516,517,520,521,524,525,528],{},"The image URL goes to the provider as is. So it has to be public, absolute, ",[114,514,515],{},"http"," or ",[114,518,519],{},"https",", and it should not carry credentials or private query tokens, because the provider will fetch it and you just handed them the token. ",[114,522,523],{},"EmptyImageUrlError"," and ",[114,526,527],{},"InvalidImageUrlError"," cover the blank and malformed cases before any request leaves.",[102,530,532],{"id":531},"what-stays-out","What stays out",[322,534,535],{},"Uploads, hosting, OCR, embeddings, perceptual hashes, local image analysis. None of it is here. Lookup by URL fits because it is a thin adapter over a search API. The rest drags in heavy dependencies and belongs in an image or vision package of its own.",[537,538,539],"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 .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}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);}html pre.shiki code .sCrqT, html code.shiki .sCrqT{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#A6ACCDC0}html pre.shiki code .s0VbO, html code.shiki .s0VbO{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#A6ACCD}html pre.shiki code .s8yaW, html code.shiki .s8yaW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#A6ACCDC0}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}",{"title":112,"searchDepth":156,"depth":156,"links":541},[542,543,544],{"id":104,"depth":156,"text":105},{"id":508,"depth":156,"text":509},{"id":531,"depth":156,"text":532},"A public image URL in, the pages that contain or resemble it out, through SerpAPI Google Lens.","md",null,{"icon":549},"i-lucide-image",{"title":24,"description":545},"N6uwGmNrj5PBMavdWgLM6Iz4WFV-kSht2gIV_1WZY2c",[553,555],{"title":20,"path":21,"stem":22,"description":554,"children":-1},"URL in, normalized page out, with Jina Reader first, automatic fallback, an exact output bound and a continuation for the rest.",{"title":28,"path":29,"stem":30,"description":556,"children":-1},"The web command, its five subcommands, the flags, and the JSON envelopes that match the library.",1788509442866]