images-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Images Search

图片搜索

Requires API Key: Get one at https://api.search.brave.com
需要API密钥:请前往https://api.search.brave.com获取
套餐:包含在Search套餐中。详情请见https://api-dashboard.search.brave.com/app/subscriptions/subscribe

Quick Start (cURL)

快速入门(cURL)

Basic Search

基础搜索

bash
curl -s "https://api.search.brave.com/res/v1/images/search?q=mountain+landscape" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"
bash
curl -s "https://api.search.brave.com/res/v1/images/search?q=mountain+landscape" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"

With Parameters

带参数的搜索

bash
curl -s "https://api.search.brave.com/res/v1/images/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=northern lights photography" \
  --data-urlencode "country=US" \
  --data-urlencode "search_lang=en" \
  --data-urlencode "count=20" \
  --data-urlencode "safesearch=strict"
bash
curl -s "https://api.search.brave.com/res/v1/images/search" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -G \
  --data-urlencode "q=northern lights photography" \
  --data-urlencode "country=US" \
  --data-urlencode "search_lang=en" \
  --data-urlencode "count=20" \
  --data-urlencode "safesearch=strict"

Endpoint

接口地址

http
GET https://api.search.brave.com/res/v1/images/search
Authentication:
X-Subscription-Token: <API_KEY>
header
http
GET https://api.search.brave.com/res/v1/images/search
身份验证
X-Subscription-Token: <API_KEY>
请求头

Parameters

参数

ParameterTypeRequiredDefaultDescription
q
stringYes-Search query (1-400 chars, max 50 words)
country
stringNo
US
Search country (2-letter country code or
ALL
)
search_lang
stringNo
en
2+ char language code
count
intNo50Results to return (1-200)
safesearch
stringNo
strict
off
or
strict
(no
moderate
for images)
spellcheck
boolNotrueAuto-correct query; corrected query in
query.altered
参数类型是否必填默认值描述
q
string-搜索查询(1-400个字符,最多50个单词)
country
string
US
搜索国家(两位国家代码或
ALL
search_lang
string
en
两位及以上字符的语言代码
count
int50返回结果数量(1-200)
safesearch
string
strict
可选值为
off
strict
(图片搜索无
moderate
选项)
spellcheck
booltrue自动纠正查询;纠正后的查询会在
query.altered
中返回

Response Format

响应格式

json
{
  "type": "images",
  "query": {
    "original": "mountain landscape",
    "altered": null,
    "spellcheck_off": false,
    "show_strict_warning": false
  },
  "results": [
    {
      "type": "image_result",
      "title": "Beautiful Mountain Landscape",
      "url": "https://example.com/mountain-photo",
      "source": "example.com",
      "page_fetched": "2025-09-15T10:30:00Z",
      "thumbnail": {
        "src": "https://imgs.search.brave.com/...",
        "width": 200,
        "height": 150
      },
      "properties": {
        "url": "https://example.com/images/mountain.jpg",
        "placeholder": "https://imgs.search.brave.com/placeholder/...",
        "width": 1920,
        "height": 1080
      },
      "meta_url": {
        "scheme": "https",
        "netloc": "example.com",
        "hostname": "example.com",
        "favicon": "https://imgs.search.brave.com/favicon/...",
        "path": "/mountain-photo"
      },
      "confidence": "high"
    }
  ],
  "extra": {
    "might_be_offensive": false
  }
}
json
{
  "type": "images",
  "query": {
    "original": "mountain landscape",
    "altered": null,
    "spellcheck_off": false,
    "show_strict_warning": false
  },
  "results": [
    {
      "type": "image_result",
      "title": "Beautiful Mountain Landscape",
      "url": "https://example.com/mountain-photo",
      "source": "example.com",
      "page_fetched": "2025-09-15T10:30:00Z",
      "thumbnail": {
        "src": "https://imgs.search.brave.com/...",
        "width": 200,
        "height": 150
      },
      "properties": {
        "url": "https://example.com/images/mountain.jpg",
        "placeholder": "https://imgs.search.brave.com/placeholder/...",
        "width": 1920,
        "height": 1080
      },
      "meta_url": {
        "scheme": "https",
        "netloc": "example.com",
        "hostname": "example.com",
        "favicon": "https://imgs.search.brave.com/favicon/...",
        "path": "/mountain-photo"
      },
      "confidence": "high"
    }
  ],
  "extra": {
    "might_be_offensive": false
  }
}

Response Fields

响应字段

FieldTypeDescription
type
stringAlways
"images"
query.original
stringOriginal query
query.altered
string?Spellchecked query (null if no correction)
query.spellcheck_off
bool?Whether spellcheck was disabled
query.show_strict_warning
bool?True if strict safesearch hid relevant results
results[]
arrayList of image results
results[].type
stringAlways
"image_result"
results[].title
string?Image title
results[].url
string?Page URL where image was found
results[].source
string?Source domain
results[].page_fetched
string?ISO datetime of last page crawl
results[].thumbnail.src
string?Brave-proxied thumbnail URL (~500px width)
results[].thumbnail.width
int?Thumbnail width
results[].thumbnail.height
int?Thumbnail height
results[].properties.url
string?Original full-size image URL
results[].properties.placeholder
string?Low-res placeholder URL (Brave-proxied)
results[].properties.width
int?Original image width (may be null)
results[].properties.height
int?Original image height (may be null)
results[].meta_url.scheme
string?URL protocol scheme
results[].meta_url.netloc
string?Network location
results[].meta_url.hostname
string?Lowercased domain
results[].meta_url.favicon
string?Favicon URL
results[].meta_url.path
string?URL path
results[].confidence
string?Relevance:
low
,
medium
, or
high
extra.might_be_offensive
boolWhether results may contain offensive content
字段类型描述
type
string固定为
"images"
query.original
string原始查询内容
query.altered
string?拼写纠正后的查询内容(无纠正时为null)
query.spellcheck_off
bool?是否禁用了拼写检查
query.show_strict_warning
bool?当严格安全搜索隐藏了相关结果时,值为true
results[]
array图片结果列表
results[].type
string固定为
"image_result"
results[].title
string?图片标题
results[].url
string?图片所在页面的URL
results[].source
string?源域名
results[].page_fetched
string?页面最后爬取的ISO格式时间
results[].thumbnail.src
string?Brave代理的缩略图URL(宽度约500px)
results[].thumbnail.width
int?缩略图宽度
results[].thumbnail.height
int?缩略图高度
results[].properties.url
string?原始高清图片的URL
results[].properties.placeholder
string?低分辨率占位图URL(由Brave代理)
results[].properties.width
int?原始图片宽度(部分图片可能无此数据)
results[].properties.height
int?原始图片高度(部分图片可能无此数据)
results[].meta_url.scheme
string?URL协议
results[].meta_url.netloc
string?网络位置
results[].meta_url.hostname
string?小写格式的域名
results[].meta_url.favicon
string?网站图标URL
results[].meta_url.path
string?URL路径
results[].confidence
string?相关度:
low
medium
high
extra.might_be_offensive
bool结果是否可能包含冒犯性内容

Use Cases

使用场景

  • Visual content discovery: Build image galleries, mood boards, or visual research tools. Use
    count=200
    for comprehensive coverage. Prefer over
    web-search
    when you need image-specific metadata (dimensions, thumbnails).
  • Content enrichment: Add relevant images to articles or generated content. Use
    country
    and
    search_lang
    to target your audience's locale.
  • Safe image retrieval: Default
    safesearch=strict
    ensures family-friendly results out of the box. Only two modes (off/strict) — no moderate option, unlike web/video/news search.
  • High-volume batch retrieval: Up to 200 images per request (vs 20 for web, 50 for videos/news). Ideal for bulk image sourcing or visual analysis pipelines.
  • 视觉内容发现:构建图片图库、情绪板或视觉研究工具。使用
    count=200
    获取全面的结果。当你需要图片特定元数据(尺寸、缩略图)时,优先选择此接口而非
    web-search
  • 内容丰富:为文章或生成式内容添加相关图片。使用
    country
    search_lang
    参数定位目标受众的地区和语言。
  • 安全图片检索:默认
    safesearch=strict
    确保结果适合全年龄段。图片搜索仅支持两种模式(关闭/严格),不像网页/视频/新闻搜索有中等模式。
  • 大批量批量检索:每次请求最多可返回200张图片(网页搜索最多20条,视频/新闻最多50条)。非常适合批量图片采集或视觉分析流程。

Notes

注意事项

  • SafeSearch: Defaults to
    strict
    for images (stricter than web search)
  • High volume: Can return up to 200 results per request
  • Thumbnails: Brave-proxied for user privacy (500px width). Use
    properties.url
    for original full-resolution image.
  • Dimensions:
    properties.width/height
    may be missing for some images
  • Placeholder:
    properties.placeholder
    is a low-res URL (not inline base64) useful for progressive loading UX
  • 安全搜索:图片搜索默认使用
    strict
    模式(比网页搜索更严格)
  • 高容量:每次请求最多可返回200条结果
  • 缩略图:由Brave代理,保护用户隐私(宽度500px)。如需原始高清图片,请使用
    properties.url
  • 尺寸信息:部分图片可能没有
    properties.width/height
    数据
  • 占位图
    properties.placeholder
    是低分辨率URL(不是内联base64格式),适合用于渐进式加载的用户体验优化