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