/install image-search
Image Search (Google Lens)
Identify anything from an image using Google Lens via SerpAPI.
Setup
Requires SERPAPI_KEY environment variable. Get a key at https://serpapi.com/ (100 free searches/month).
No pip dependencies needed — uses only Python stdlib (urllib, json, base64).
Usage
From CLI / Agent (exec tool)
# Search by image URL
python3 {baseDir}/scripts/lens_search.py "https://example.com/photo.jpg"
# Search by local file (auto-uploads to get a URL)
python3 {baseDir}/scripts/lens_search.py /path/to/image.png
# Refine with text query (e.g., find red version of a product)
python3 {baseDir}/scripts/lens_search.py "https://example.com/bag.jpg" --query "red"
# Product search (returns prices)
python3 {baseDir}/scripts/lens_search.py "https://example.com/sneakers.jpg" --type products
# Find exact matches (where this image appears online)
python3 {baseDir}/scripts/lens_search.py "https://example.com/photo.jpg" --type exact_matches
# Raw JSON output for programmatic use
python3 {baseDir}/scripts/lens_search.py "https://example.com/photo.jpg" --json
# Localized results (e.g., Japanese products with ¥ prices)
python3 {baseDir}/scripts/lens_search.py "https://example.com/laptop.jpg" --type products --country jp
Search Types
| Type | Use Case | Returns |
|---|---|---|
all (default) |
General identification | Entity name + visual matches + text |
visual_matches |
Find similar images | Visually similar results with sources |
exact_matches |
Find image origin | Pages containing this exact image |
products |
Shopping / price lookup | Products with prices and buy links |
about_this_image |
Image provenance | Metadata about the image's origin |
Output Format
The script outputs structured markdown:
## Identified Entity
- **Danny DeVito** — [link](https://...)
## Visual Matches (top 5)
- **Danny DeVito — Wikipedia** (Wikipedia) ✅ exact match
https://en.wikipedia.org/wiki/Danny_DeVito
- ...
Use --json for raw SerpAPI response when you need thumbnails, image dimensions, or other metadata.
Agent Decision Guide
When a user sends an image:
- Already identified by vision model? If the main model confidently recognizes the entity, skip reverse search.
- Uncertain identification? Run
lens_search.pyto verify. Compare model's guess with Lens results. - Need details beyond identification? First identify with Lens, then
web_searchfor deeper info. - Shopping intent? Use
--type productsto get prices and buy links directly. - Local file from user? The script handles local files by auto-uploading to get a searchable URL.
Combining with Other Tools
Typical multi-tool workflow:
1. User sends image → "What building is this?"
2. reverse_image_search → identifies "Cologne Cathedral"
3. web_search("Cologne Cathedral history architecture") → detailed info
4. Compose answer combining visual match + web knowledge
Limitations
- SerpAPI free tier: 100 searches/month. Paid plans from $50/month.
- Local file upload uses freeimage.host (free) or imgbb (needs IMGBB_API_KEY).
- Google Lens results vary by region; use
--countryfor localized results. - Some niche/long-tail entities may not return useful visual matches.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install image-search - 安装完成后,直接呼叫该 Skill 的名称或使用
/image-search触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Image Search 是什么?
Visual image search using Google Lens via SerpAPI. Identify objects, landmarks, products, plants, animals, artwork, logos, or any visual entity from an image... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 529 次。
如何安装 Image Search?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-search」即可一键安装,无需额外配置。
Image Search 是免费的吗?
是的,Image Search 完全免费(开源免费),可自由下载、安装和使用。
Image Search 支持哪些平台?
Image Search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Image Search?
由 TobiasLee(@tobiaslee)开发并维护,当前版本 v1.0.0。