Images Search
Paid Images Search proxy via x402 pay-per-use (HTTP 402).
Prerequisites: This skill requires x402-payment. Complete the setup steps before first use.
Service URLs
| Role | Domain |
|---|
| API Provider | https://www.cpbox.io |
| Facilitator |
https://www.cppay.finance |
Endpoint (Agent Interface)
CODEBLOCK0
Payment Flow (x402 Protocol)
- 1. First request ->
402 Payment Required with requirements JSON - Sign & retry with
PAYMENT-SIGNATURE -> result JSON
With @springmint/x402-payment or x402-sdk-go, payment is automatic.
Quick Start (cURL)
Basic Search
CODEBLOCK1
With Parameters
CODEBLOCK2
Using with x402-payment
CODEBLOCK3
Parameters
| Parameter | Type | Required | Default | Description |
|---|
| INLINECODE4 | string | Yes | - | Search query (1-400 chars, max 50 words) |
| INLINECODE5 |
string | No |
US | Search country (2-letter country code or
ALL) |
|
search_lang | string | No |
en | 2+ char language code |
|
count | int | No | 50 | Results to return (1-200) |
|
safesearch | string | No |
strict |
off or
strict (no
moderate for images) |
|
spellcheck | bool | No | true | Auto-correct query; corrected query in
query.altered |
Response Format
CODEBLOCK4
Response Fields
| Field | Type | Description |
|---|
| INLINECODE18 | string | Always INLINECODE19 |
| INLINECODE20 |
string | Original 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[] | array | List of image results |
|
results[].type | string | Always
"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? | Proxy-served 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 (proxy-served) |
|
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 | bool | Whether results may contain offensive content |
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.
Notes
- - SafeSearch: Defaults to
strict for images (stricter than web search) - High volume: Can return up to 200 results per request
- Thumbnails: Proxy-served 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
图片搜索
通过 x402按次付费(HTTP 402)代理的付费图片搜索。
前置条件:此技能需要x402支付。首次使用前请完成设置步骤。
服务URL
| 角色 | 域名 |
|---|
| API提供方 | https://www.cpbox.io |
| 协调方 |
https://www.cppay.finance |
端点(代理接口)
http
GET /api/x402/images-search
支付流程(x402协议)
- 1. 首次请求 -> 返回402 Payment Required及需求JSON
- 签名重试 -> 携带PAYMENT-SIGNATURE -> 返回结果JSON
使用@springmint/x402-payment或x402-sdk-go时,支付自动完成。
快速开始(cURL)
基础搜索
bash
curl -s https://www.cpbox.io/api/x402/images-search?q=mountain+landscape \
-H Accept: application/json
带参数搜索
bash
curl -s https://www.cpbox.io/api/x402/images-search \
-H Accept: application/json \
-G \
--data-urlencode q=northern lights photography \
--data-urlencode country=US \
--data-urlencode search_lang=en \
--data-urlencode count=20 \
--data-urlencode safesearch=strict
使用x402-payment
bash
npx @springmint/x402-payment \
--url https://www.cpbox.io/api/x402/images-search?q=mountain+landscape&count=20 \
--method GET
参数
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|
| q | 字符串 | 是 | - | 搜索查询(1-400字符,最多50个词) |
| country |
字符串 | 否 | US | 搜索国家(2字母国家代码或ALL) |
| search_lang | 字符串 | 否 | en | 2+字符语言代码 |
| count | 整数 | 否 | 50 | 返回结果数(1-200) |
| safesearch | 字符串 | 否 | strict | off或strict(图片无moderate选项) |
| spellcheck | 布尔值 | 否 | true | 自动纠正查询;纠正后的查询在query.altered中 |
响应格式
json
{
type: images,
query: {
original: mountain landscape,
altered: null,
spellcheck_off: false,
showstrictwarning: 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.provider/...,
width: 200,
height: 150
},
properties: {
url: https://example.com/images/mountain.jpg,
placeholder: https://imgs.search.provider/placeholder/...,
width: 1920,
height: 1080
},
meta_url: {
scheme: https,
netloc: example.com,
hostname: example.com,
favicon: https://imgs.search.provider/favicon/...,
path: /mountain-photo
},
confidence: high
}
],
extra: {
mightbeoffensive: false
}
}
响应字段
| 字段 | 类型 | 描述 |
|---|
| type | 字符串 | 始终为images |
| query.original |
字符串 | 原始查询 |
| query.altered | 字符串? | 拼写纠正后的查询(无纠正时为null) |
| query.spellcheck_off | 布尔值? | 拼写检查是否禁用 |
| query.show
strictwarning | 布尔值? | 严格安全搜索是否隐藏了相关结果 |
| results[] | 数组 | 图片结果列表 |
| results[].type | 字符串 | 始终为image_result |
| results[].title | 字符串? | 图片标题 |
| results[].url | 字符串? | 图片所在页面URL |
| results[].source | 字符串? | 来源域名 |
| results[].page_fetched | 字符串? | 上次页面抓取的ISO日期时间 |
| results[].thumbnail.src | 字符串? | 代理提供的缩略图URL(约500px宽) |
| results[].thumbnail.width | 整数? | 缩略图宽度 |
| results[].thumbnail.height | 整数? | 缩略图高度 |
| results[].properties.url | 字符串? | 原始全尺寸图片URL |
| results[].properties.placeholder | 字符串? | 低分辨率占位图URL(代理提供) |
| results[].properties.width | 整数? | 原始图片宽度(可能为null) |
| results[].properties.height | 整数? | 原始图片高度(可能为null) |
| results[].meta_url.scheme | 字符串? | URL协议方案 |
| results[].meta_url.netloc | 字符串? | 网络位置 |
| results[].meta_url.hostname | 字符串? | 小写域名 |
| results[].meta_url.favicon | 字符串? | 网站图标URL |
| results[].meta_url.path | 字符串? | URL路径 |
| results[].confidence | 字符串? | 相关性:low、medium或high |
| extra.might
beoffensive | 布尔值 | 结果是否可能包含冒犯性内容 |
使用场景
- - 视觉内容发现:构建图片库、情绪板或视觉研究工具。使用count=200获取全面覆盖。需要图片特定元数据(尺寸、缩略图)时优先于web-search。
- 内容丰富:为文章或生成内容添加相关图片。使用country和search_lang定位目标受众区域。
- 安全图片检索:默认safesearch=strict确保开箱即用的家庭友好结果。仅两种模式(off/strict)——与网页/视频/新闻搜索不同,无moderate选项。
- 大批量批量检索:每次请求最多200张图片(网页20张,视频/新闻50张)。适合批量图片采集或视觉分析流程。
注意事项
- - 安全搜索:图片默认strict(比网页搜索更严格)
- 高容量:每次请求最多返回200个结果
- 缩略图:代理提供以保护用户隐私(500px宽)。使用properties.url获取原始全分辨率图片。
- 尺寸:部分图片可能缺失properties.width/height
- 占位图:properties.placeholder是低分辨率URL(非内联base64),适用于渐进加载用户体验