Google Images API: how to run an image search for mood boards
Get structured Google Images results with image URLs, dimensions, titles, and source pages for a visual reference table
On this page
You have a spring campaign brief and need 40 reference images for a mood board, with dimensions and source pages so a design team can shortlist visual styles. Run one Google Images search through anyapi.google.images, then read the structured rows into a reference table. No run has been executed for this guide; the result table is a design, with placeholder values
The task and worksheet design
Example input, invented for this guide:
| Field | Example value |
|---|---|
| query | pastel skincare flat lay |
| gl | us |
| hl | en |
| limit | 40 |
The search returns one row per image. The shortlist column is added by the reader. Values here are placeholders showing the shape. Use the same field names in the request and the worksheet so the returned rows map directly to the planned columns. Keep the shortlist column empty until the design team reviews dimensions and the source page
| position | title | url | width | height | source | sourceUrl | thumbnailUrl | shortlist |
|---|---|---|---|---|---|---|---|---|
| 1 | (image title) | (direct image URL) | 1200 | 800 | acme-skincare.example | (source page URL) | (thumbnail URL) | blank |
The source host shown is invented; use the source and sourceUrl values the search returns
Input fields for the image search
Call anyapi.google.images through POST /v1/runs with toolId anyapi.google.images with query set from the campaign brief. gl sets country localization and defaults to us; hl sets interface and results language and defaults to en. For a US English mood board, set gl to us and hl to en. location, timeframe and autocorrect are optional controls. Use autocorrect when the query should be searched exactly as written; leave it at its default when spelling correction is acceptable. Use timeframe only when the mood board should be limited to recent images
limit accepts 1 to 100 images per call and defaults to 20. Requests for 10 results or fewer are billed at a lower rate than larger requests. Set limit to 40 for this mood board, so one call returns the planned number of references
Reading the output fields that drive a shortlist
found is true when at least one image result was returned. data is the result wrapper, or null when nothing was found. When found is true, data.items holds records. Use position for Google result order, title for the image title, url for the direct full-size image, width and height for pixel dimensions, source for the host domain, sourceUrl for the page the image appears on, and thumbnailUrl for the thumbnail. Set the shortlist flag after checking dimensions and the source page. The items array is the main table source, and each record keeps Google result order through position. Use these field names as column headers so the table matches the output schema
reason is present only when found is false; its value is not_found. The contract says a found: false answer is a successful call, not an error, and costUsd is what it actually cost. Treat that row as an empty result
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to run one Google Images search for 40 reference images for a spring campaign mood board. Check the current inputs and price of anyapi.google.images before running. Use query "pastel skincare flat lay" as the Example input, gl "us", hl "en" and limit 40. Return a table with position, title, url, width, height, source, sourceUrl, thumbnailUrl and a blank shortlist column. If found is false, return the query and reason not_found instead of image rows. Do not fill the shortlist column.Estimated tool cost
The catalog lists anyapi.google.images at up to $0.00198 per call, unit max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single 40-image query | calls x max price | up to $0.00198 per call | 1 | $0.00198 |
| 20-query batch | calls x max price | up to $0.00198 per call | 20 | $0.0396 |
For a 40-image request, plan at the listed max_call price. The 20-query batch is a separate scenario for a larger research pass
Next action
Open https://purrkey.app/tools/google_search?q=images to check the current inputs and price before the first call
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Google Search.FAQ
How do I run a Google Images search for a mood board?
Call anyapi.google.images with query set from the campaign brief, gl and hl set to the target market and language, and limit set to the number of reference images needed. For 40 references, set limit to 40.
What inputs does anyapi.google.images take?
It requires query. The input schema also lists gl, hl, limit, location, timeframe and autocorrect as properties.
What does the anyapi.google.images output include?
It returns found and data. When found is true, data.items holds records with position, title, url, width, height, source, sourceUrl and thumbnailUrl.
What happens when no images are found?
found is false and the reason value is not found. The contract says a found false answer is a successful call, not an error, and costUsd is what it actually cost.
What is the limit range for anyapi.google.images?
limit accepts 1 to 100 images per call and defaults to 20. Requests for 10 results or fewer are billed at a lower rate than larger requests.
How much does a 20-query Google Images batch cost?
At up to $0.00198 per call, 20 calls are at most $0.0396. A single 40-image query is at most $0.00198.
Next step
Try this with Google Search
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.