最后更新
更新日志/search_images25 credits per call搜索图片
返回某个查询词的一页 Google Images 结果(约 100 条):每张图片的标题、原图 URL 和尺寸、缩略图、所在网页、来源网站和文件大小。翻到 4-5 页左右就没有更多结果了。
Authorization: Bearer <key> on every request.Parameters
the search text
1-based results page; an empty "results" list means there are no more
any, large, medium or icon
any, photo, clipart, lineart, animated or face
any, color, gray, transparent, or a single colour: red, orange, yellow, green, teal, blue, purple, pink, white, black, brown
how recently the image was published: any, day, week, month or year
any, or creative_commons for images under Creative Commons licences
active to filter explicit results, off to show everything
interface language code, e.g. en, fr, de
two-letter country code of the region to search from, e.g. us, gb, fr
Response fields
querye.g."red fox"pagee.g.1counte.g.100results
ide.g."w8_Z7HjHAIVjYM"titlee.g."Red Fox Stories | Insights & Photography by Roeselien Raimond"image_urle.g."https://www.roeselienraimond.com/wp-content/uploads/2025/07/happy-smiling-zen-fox-roeselien-raimond.webp"widthe.g.1000heighte.g.1238thumbnail_urle.g."https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLQ2kP_i1EA_lkUIRQo7t2FbX5pFwOqbq_kZcQ4MqB1g&s=10"thumbnail_widthe.g.498thumbnail_heighte.g.615page_urle.g."https://www.roeselienraimond.com/species-red-fox/"domaine.g."www.roeselienraimond.com"site_namee.g."Roeselien Raimond"file_sizee.g."169KB"dominant_colore.g."rgb(104,88,85)"curl "https://api.maviapi.com/v1/sites/images-google/search_images?q=red%20fox&page=1&size=any&type=any&color=any&time=any&license=any&safe=active&hl=en&gl=us" \-H "Authorization: Bearer $MAVI_KEY"
{
"query": "red fox",
"page": 1,
"count": 100,
"results": [
{
"id": "w8_Z7HjHAIVjYM",
"title": "Red Fox Stories | Insights & Photography by Roeselien Raimond",
"image_url": "https://www.roeselienraimond.com/wp-content/uploads/2025/07/happy-smiling-zen-fox-roeselien-raimond.webp",
"width": 1000,
"height": 1238,
"thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTLQ2kP_i1EA_lkUIRQo7t2FbX5pFwOqbq_kZcQ4MqB1g&s=10",
"thumbnail_width": 498,
"thumbnail_height": 615,
"page_url": "https://www.roeselienraimond.com/species-red-fox/",
"domain": "www.roeselienraimond.com",
"site_name": "Roeselien Raimond",
"file_size": "169KB",
"dominant_color": "rgb(104,88,85)"
}
]
}Get all the data, no code
Collect every page of GET /search_images into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use Google Images API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of Google Images API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=images-google -- npx -y '@maviapi/mcp'Import Google Images API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/images-google/openapi.json - Postman
https://api.maviapi.com/v1/apis/images-google/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
使用 Google Images API 进行开发
选择一个端点开始
- 搜索图片
GET /search_images返回某个查询词的一页 Google Images 结果(约 100 条):每张图片的标题、原图 URL 和尺寸、缩略图、所在网页、来源网站和文件大小。翻到 4-5 页左右就没有更多结果了。
GET /search_images 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 q string / query 否 the search text page integer / query 否 1-based results page; an empty "results" list means there are no more size string / query 否 any, large, medium or icon type string / query 否 any, photo, clipart, lineart, animated or face color string / query 否 any, color, gray, transparent, or a single colour: red, orange, yellow, green, teal, blue, purple, pink, white, black, brown time string / query 否 how recently the image was published: any, day, week, month or year license string / query 否 any, or creative_commons for images under Creative Commons licences safe string / query 否 active to filter explicit results, off to show everything hl string / query 否 interface language code, e.g. en, fr, de gl string / query 否 two-letter country code of the region to search from, e.g. us, gb, fr 响应字段 字段 类型 说明 query string page integer count integer results object[] results[].id string results[].title string results[].image_url string results[].width integer results[].height integer results[].thumbnail_url string results[].thumbnail_width integer results[].thumbnail_height integer results[].page_url string results[].domain string results[].site_name string results[].file_size string results[].dominant_color string - 搜索建议
GET /suggestions返回 Google Images 针对未输完的图片搜索词给出的自动补全建议,最热门的排在前面。
GET /suggestions 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 q string / query 否 the partial search text to complete hl string / query 否 interface language code, e.g. en, fr, de gl string / query 否 two-letter country code that biases the suggestions, e.g. us, gb, fr 响应字段 字段 类型 说明 query string suggestions string[] - 图片
GET /image返回某个查询结果中单张图片的完整记录:标题、原图 URL 和尺寸、缩略图、所在网页、来源网站和文件大小。不传 id 时,返回该查询排在第一位的图片。
GET /image 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 id string / query 否 the image "id" from search_images results q string / query 否 the search text the id was found under max_pages integer / query 否 how many result pages to look through for the id (1-5) 响应字段 字段 类型 说明 id string title string image_url string width integer height integer thumbnail_url string thumbnail_width integer thumbnail_height integer page_url string domain string site_name string file_size string dominant_color string query string page integer
将 Google Images 数据导出为 CSV
下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。
| 列表 | CSV 列 |
|---|---|
搜索图片GET /search_images | id, title, image_url, width, height, thumbnail_url, thumbnail_width, thumbnail_height, page_url, domain, site_name, file_size, dominant_color |
嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作
Google Images API 常见问题
能获取什么数据、费用多少、如何调用。
Google Images 有官方 API 吗?
有,Google Images 提供自己的 API:Custom Search JSON API(核实日期:2026-11-25)。本页的 Google Images API 与它无关,是非官方 API:它是 maviapi 针对 images.google.com 上的公开数据提供的独立托管 API,并非由 Google Images 开发、认可或支持。
Google Images API 可以获取哪些数据?
Google Images API 有 3 个端点。每个端点都返回 JSON,参数和字段见上方的文档:
- GET
/search_images: 返回某个查询词的一页 Google Images 结果(约 100 条):每张图片的标题、原图 URL 和尺寸、缩略图、所在网页、来源网站和文件大小。 - GET
/suggestions: 返回 Google Images 针对未输完的图片搜索词给出的自动补全建议,最热门的排在前面。 - GET
/image: 返回某个查询结果中单张图片的完整记录:标题、原图 URL 和尺寸、缩略图、所在网页、来源网站和文件大小。
Google Images API 的价格是多少?
调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 25 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $4.90。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。
如何调用 Google Images API?
向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /search_images:
curl 'https://api.maviapi.com/v1/sites/images-google/search_images' \
-H "Authorization: Bearer $MAVI_KEY"在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。
以 JSON 获取 Google Images 数据有哪些方式?
以 JSON 获取 Google Images 数据的每种方式适合不同的需求:
- Custom Search JSON API: 需要写入权限、账号数据或与 Google Images 签订协议时更合适。
- 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 images.google.com 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
- Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
- RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
- maviapi: 本页的 Google Images API:3 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。
images.google.com 改版后会怎样?
更新会破坏我的 Google Images API 集成吗?
不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。
相关 API
- Google Maps API
来自 maps.google.com 的结构化数据。
- Google API
以 JSON 形式返回 Google 搜索结果:任意查询词的网页排名结果和新闻搜索。
- Tripadvisor API
来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…