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