Smart Image Finder
A complete solution for AI agents to find high-quality images for articles, dashboards, and content creation.
No browser required — all methods work via command line in the background.
Core Methods
| Method | Best For | Pros | Cons |
|---|
| News Site Extraction | Specific news events | Authentic, high-res, authoritative | Need to know source |
| Brave Image Search |
General keywords | Fast, free, good relevance | Variable quality |
|
AI Generation | Concept art, custom visuals | Fully customizable | Requires good prompts |
Method 1: News Website High-Res Extraction (No Browser)
Workflow: curl + grep (Recommended)
Extract image URLs directly from HTML without opening a browser:
CODEBLOCK0
Source-Specific Extraction Patterns
CODEBLOCK1
Verified Sources (Direct Download Works)
Tech/AI Category
| Source | CDN Pattern | HD Parameters | Notes |
|---|
| TechCrunch | INLINECODE0 | INLINECODE1 | Most stable ✅ |
| Bloomberg |
assets.bwbx.io/images/ | Direct HD | WebP format |
Politics/International Category
| Source | CDN Pattern | HD Parameters | Notes |
|---|
| Reuters | INLINECODE3 | INLINECODE4 | Most stable ✅ |
| BBC |
ichef.bbci.co.uk/news/1024/ |
/1024/ max | Limited to 1024px |
|
NBC News |
media-cldnry.s-nbcnews.com/image/ | Direct download | Medium size |
|
France24 |
s.france24.com/media/display/ |
w:1920 | Adjustable ✅ |
Space/Science Category
| Source | CDN Pattern | HD Parameters | Notes |
|---|
| Spaceflight Now | INLINECODE10 | Remove size suffix | WordPress standard |
Chinese Sources
| Source | CDN Pattern | Notes |
|---|
| ThePaper (澎湃) | INLINECODE11 | Direct download ✅ |
Sources Requiring Manual Save
| Source | Issue | Workaround |
|---|
| Guardian | URL signature validation | Right-click save |
| The Verge |
Complex CDN format | Use Brave search instead |
| Wired | Page protection | Manual save |
| CNN | URL extraction difficult | Use Brave search instead |
| AP News | Parameter adjustment fails | Save original manually |
HD Parameter Quick Reference
CODEBLOCK2
Method 2: Brave Image Search (No Browser)
Best for: Quick general-purpose images, automated workflows.
Basic Usage
CODEBLOCK3
Rate Limiting ⚠️
Brave API has rate limits. When making multiple searches:
CODEBLOCK4
Best practices:
- - Free tier: ~1 request/second max
- Add
sleep 1 or sleep 2 between batch requests - If you get 429 (rate limited), wait 60 seconds before retrying
Search Tips
- 1. Add year:
SpaceX Starship 2025 is more precise than INLINECODE15 - Add event terms:
Keir Starmer Xi Jinping Beijing handshake beats INLINECODE17 - Site restriction:
site:reuters.com Trump tariff limits to specific source
One-liner: Search and Download
CODEBLOCK5
Verify Image Accessibility
CODEBLOCK6
Method 3: AI Image Generation (No Browser)
Best for: Concept images, creative illustrations, when real photos unavailable.
Free Option: Pollinations
CODEBLOCK7
Prompt Best Practices
CODEBLOCK8
Platform Comparison
| Platform | Prompt Language | Size Params | Notes |
|---|
| Pollinations | English | width/height | Free unlimited |
| Jimeng (即梦) |
Chinese | 16:9/1:1 | Best for Chinese scenes |
| DALL-E | English | 1792x1024 | Highest quality |
Complete Workflow Example (All CLI, No Browser)
Scenario: Find image for "UK PM visits China" article
CODEBLOCK9
Quick Reference Card
Choose Method by Scenario
| Need | Recommended Method | Reason |
|---|
| Specific news event | News site extraction | Authentic, authoritative |
| General concept image |
Brave search | Fast, free |
| No suitable real photo | AI generation | Fully customizable |
| Article cover | AI generation | Controllable text space |
| Dashboard news | Brave search | Automation-friendly |
Image Quality Checklist
- - [ ] Resolution ≥ 1200px width
- [ ] File size > 50KB (smaller likely thumbnail)
- [ ]
file command confirms image (not HTML) - [ ] No watermarks
- [ ] No copyright issues (news images for commentary/citation)
Troubleshooting
| Problem | Cause | Solution |
|---|
| curl returns HTML | Hotlink protection/signature | Try different source or Brave search |
| Image 403 |
URL expired | Re-fetch URL |
| Blurry image | Downloaded thumbnail | Adjust HD parameters |
| Brave no results | Keywords too specific | Simplify keywords |
| grep returns empty | Page uses JavaScript rendering | Use Brave search instead |
智能图片查找器
为AI智能体提供完整解决方案,用于查找文章、仪表盘和内容创作所需的高质量图片。
无需浏览器 — 所有方法均通过后台命令行运行。
核心方法
| 方法 | 适用场景 | 优点 | 缺点 |
|---|
| 新闻网站提取 | 特定新闻事件 | 真实、高清、权威 | 需知道来源 |
| Brave图片搜索 |
通用关键词 | 快速、免费、相关性好 | 质量参差不齐 |
|
AI生成 | 概念图、自定义视觉 | 完全可定制 | 需要好的提示词 |
方法一:新闻网站高清提取(无需浏览器)
工作流程:curl + grep(推荐)
直接从HTML中提取图片URL,无需打开浏览器:
bash
步骤1:获取页面HTML并提取图片URL
curl -sL https://www.reuters.com/world/article-slug/ | \
grep -oE https://www\.reuters\.com/resizer/v2/[^]+\.jpg[^]* | head -3
步骤2:使用高清参数下载
curl -sL -o photo.jpg https://www.reuters.com/resizer/v2/xxx.jpg?width=3000&quality=100
步骤3:验证是否为图片
file photo.jpg # 应显示:JPEG image data
特定来源提取模式
bash
路透社
curl -sL $URL | grep -oE https://www\.reuters\.com/resizer/v2/[^]+\.jpg[^]* | head -3
TechCrunch
curl -sL $URL | grep -oE https://techcrunch\.com/wp-content/uploads/[^]+\.(jpg|png) | head -3
彭博社
curl -sL $URL | grep -oE https://assets\.bwbx\.io/images/[^]+\.(jpg|webp) | head -3
BBC
curl -sL $URL | grep -oE https://ichef\.bbci\.co\.uk/news/[0-9]+/[^]+\.jpg | head -3
法国24台
curl -sL $URL | grep -oE https://s\.france24\.com/media/display/[^]+\.jpg | head -3
Spaceflight Now(WordPress)
curl -sL $URL | grep -oE https://spaceflightnow\.com/wp-content/uploads/[^]+\.jpg | head -3
澎湃新闻
curl -sL $URL | grep -oE https://imagepphcloud\.thepaper\.cn/pph/image/[^]+\.jpg | head -3
已验证来源(可直接下载)
科技/AI类别
| 来源 | CDN模式 | 高清参数 | 备注 |
|---|
| TechCrunch | techcrunch.com/wp-content/uploads/ | ?w=2048 | 最稳定 ✅ |
| 彭博社 |
assets.bwbx.io/images/ | 直接高清 | WebP格式 |
政治/国际类别
| 来源 | CDN模式 | 高清参数 | 备注 |
|---|
| 路透社 | reuters.com/resizer/v2/ | ?width=3000&quality=100 | 最稳定 ✅ |
| BBC |
ichef.bbci.co.uk/news/1024/ | /1024/ 最大 | 限制1024px |
|
NBC新闻 | media-cldnry.s-nbcnews.com/image/ | 直接下载 | 中等尺寸 |
|
法国24台 | s.france24.com/media/display/ | w:1920 | 可调整 ✅ |
太空/科学类别
| 来源 | CDN模式 | 高清参数 | 备注 |
|---|
| Spaceflight Now | spaceflightnow.com/wp-content/uploads/ | 移除尺寸后缀 | WordPress标准 |
中文来源
| 来源 | CDN模式 | 备注 |
|---|
| 澎湃新闻 | imagepphcloud.thepaper.cn/pph/image/ | 直接下载 ✅ |
需要手动保存的来源
| 来源 | 问题 | 替代方案 |
|---|
| 卫报 | URL签名验证 | 右键保存 |
| The Verge |
复杂CDN格式 | 改用Brave搜索 |
| Wired | 页面保护 | 手动保存 |
| CNN | URL提取困难 | 改用Brave搜索 |
| 美联社 | 参数调整失败 | 手动保存原图 |
高清参数快速参考
bash
路透社
?width=3000&quality=100
TechCrunch
?w=2048
BBC(替换URL中的数字)
/1024/ # 最大可用
法国24台
w:1920
NBC新闻(URL参数)
t_fit-1500w
方法二:Brave图片搜索(无需浏览器)
适用于:快速通用图片、自动化工作流程。
基本用法
bash
设置API密钥(首次使用)
export BRAVE
APIKEY=your
apikey
搜索图片
curl -s https://api.search.brave.com/res/v1/images/search?q=keyword&count=10 \
-H X-Subscription-Token: $BRAVE
APIKEY | jq .results[] | {title, url: .properties.url, width: .properties.width}
直接获取第一张图片URL
curl -s https://api.search.brave.com/res/v1/images/search?q=SpaceX%20Starship&count=1 \
-H X-Subscription-Token: $BRAVE
APIKEY | jq -r .results[0].properties.url
速率限制 ⚠️
Brave API有速率限制。进行多次搜索时:
bash
在请求之间添加延迟(建议1-2秒)
for query in query1 query2 query3; do
curl -s https://api.search.brave.com/res/v1/images/search?q=$query&count=1 \
-H X-Subscription-Token: $BRAVE
APIKEY | jq -r .results[0].properties.url
sleep 2 # 请求之间等待2秒
done
最佳实践:
- - 免费版:约1次请求/秒最大
- 批量请求之间添加 sleep 1 或 sleep 2
- 如果收到429(速率限制),等待60秒后重试
搜索技巧
- 1. 添加年份:SpaceX Starship 2025 比 SpaceX Starship 更精确
- 添加事件术语:Keir Starmer Xi Jinping Beijing handshake 优于 UK China meeting
- 网站限制:site:reuters.com Trump tariff 限制特定来源
一行命令:搜索并下载
bash
搜索、获取第一个结果URL、下载
IMG_URL=$(curl -s https://api.search.brave.com/res/v1/images/search?q=SpaceX%20launch%202025&count=1 \
-H X-Subscription-Token: $BRAVE
APIKEY | jq -r .results[0].properties.url)
curl -sL -o spacex.jpg $IMG_URL
file spacex.jpg
验证图片可访问性
bash
检查URL是否返回200
curl -sI $IMAGE_URL | head -1
应返回:HTTP/2 200
检查内容类型
curl -sI $IMAGE_URL | grep -i content-type
应返回:content-type: image/jpeg 或 image/png
方法三:AI图片生成(无需浏览器)
适用于:概念图、创意插图、无合适真实照片时。
免费选项:Pollinations
bash
生成图片(完全免费,无需API密钥)
curl -sL -o output.jpg https://image.pollinations.ai/prompt/description?width=1920&height=1080&nologo=true
示例:科技风格AI概念图
curl -sL -o ai-concept.jpg https://image.pollinations.ai/prompt/futuristic%20AI%20chip%20glowing%20blue%20on%20dark%20background%20minimalist%20tech%20style?width=1920&height=1080&nologo=true
提示词最佳实践