Go to example tasks

为 AI 训练构建图片数据集(按关键词)

按关键词批量收集谷歌图片的原图 URL 与尺寸, 快速搭建机器学习训练数据集。结构化 JSON, 支持多关键词一次抓取, 按结果计费。

Try for free
Google Images API - $0.10 per 1,000 - Fast Image API
Google Images API - $0.10 per 1,000 - Fast Image APIjohnvc/google-images-api
Query
Position
Title
Image URL
+4 fields
Text
Number
Boolean
List
Object

Input

Search Queries(required):熊猫+1
Maximum Results Per Query:50
Language:zh-cn

Output fields

Query
Position
Title
Image URL
Image Width
Image Height
Source
Page Link

How it works

Sign up on Apify or log in

The Google Images API - $0.10 per 1,000 - Fast Image API Actor is ready to run with the inputs already set for "为 AI 训练构建图片数据集(按关键词)". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "为 AI 训练构建图片数据集(按关键词)" task

The Google Images API - $0.10 per 1,000 - Fast Image API Actor will start running based on the input automatically. You can also change all the input fields, like search queries, maximum results per query, and more, to match your specific use case.

Receive the "为 AI 训练构建图片数据集(按关键词)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as query, position, title, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "为 AI 训练构建图片数据集(按关键词)" task via API.

Image

Integrate "为 AI 训练构建图片数据集(按关键词)" into your workflow

Connect "为 AI 训练构建图片数据集(按关键词)" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

每张图片占一行,包含 query、position、title、imageUrl、imageWidth、imageHeight、source 和 link。其中 query 字段就是这一行所属的关键词,例如 熊猫 或 竹林,相当于现成的类别标签,不用再手工逐张标注。整个数据集可以一键导出为 JSON、CSV 或 Excel 文件,直接交给训练脚本使用。

queries 列表里每个关键词对应一个类别,示例为 熊猫 和 竹林;maxResultsPerQuery 控制每类返回多少张,示例为 50,建议先用小样本确认结果再调大。示例把 hl 设为 zh-cn,gl 默认为 us,都可以按需要修改。

通过 Apify API 调用该任务的运行端点,传入 queries 列表,运行结束后把数据集读回为 JSON,再由你的下载脚本逐行抓取 imageUrl 指向的文件。Python 可用 apify-client 包分页读取;结果按页保存,中途停止也不会丢掉已经返回的行。

在 Apify Console 打开该任务,点击 Actions,再选 Schedule,填入 cron,例如 0 6 1 * * 表示每月一日早上六点运行。对于变化不大的类别,可以打开 reuseOlderResults,复用三十天内的相同搜索,速度会更快。

在 Claude 或任何支持 MCP 的客户端中添加 https://mcp.apify.com/?tools=actors,docs,johnvc/google-images-api ,之后只要一句提示,例如 各抓五十张熊猫和竹林的图片,助手就会运行该任务,并把每一行的原图链接和宽高尺寸读回对话,方便直接挑选和整理。

按实际返回的图片数计费,没有启动费、单次运行费或月度最低消费。某个关键词图片不足时会提前结束,只为返回的行付费;maxResultsPerQuery 低于 50 会提升到 50,这是计费的最小页。当前单价见 Google Images API 的 Actor 页面。

任务只返回每张图片的 imageUrl、imageWidth 和 imageHeight,不下载文件本身;下载由你的脚本完成,可以先按尺寸筛选再抓取。如果只需要导出一份关键词结果表而不是训练集,用姊妹任务 批量导出谷歌图片搜索结果(CSV) 就够了。