Skip to main content
The Custom Search JSON API supports full image search through a single additional parameter: searchType=image. Add it to any standard request and the API returns image-specific results instead of web pages — each with dimensions, thumbnail URLs, byte sizes, and the hosting context. You can then layer on filters for image size, format, color profile, and dominant color to match exactly the kind of visual content your application needs.

How image search works

When you set searchType=image, Google’s index returns image results rather than web documents. Each result in the items[] array includes an image sub-object containing the full-resolution URL, its dimensions and file size, plus a thumbnailLink for lightweight preview rendering. The link field points to the direct image URL; displayLink and contextLink tell you the originating domain and page.
Your Programmable Search Engine must have Image search enabled. Open the Control Panel, select your engine, go to Search features → Image search, and toggle it on.

Key parameters

string
required
Set to image to switch the response to image results. Omitting this parameter returns standard web results.
string
required
Your image search query. Standard Google operators work here too — for example q=golden+retriever+puppy or q=logo+filetype:png.
string
Filter by image dimensions. Accepted values:
string
Filter by the kind of image content. Accepted values:
string
Filter by the color profile of the image. Accepted values:
string
Return only images where a single color dominates. Accepted values: black, blue, brown, gray, green, orange, pink, purple, red, teal, white, yellow.
integer
Number of image results per page. Accepts 110. Defaults to 10.
integer
1-based offset into the result set. Maximum 91. Use with num to paginate.
string
Safe-search level. active enables strict filtering; off disables it. Defaults to off.

Make your first image search request

1

Enable image search on your engine

Visit the Programmable Search Engine Control Panel, open your engine’s settings, and enable Image search under Search features.
2

Build the request

Add searchType=image alongside your existing key, cx, and q parameters. All other filters are optional:
3

Apply image-specific filters

Narrow results by size, type, and color in a single request:

Full curl example

The request below fetches large, full-color photos of red foxes in the wild with safe search on:

Sample image result item

The items[] array in an image search response has the same top-level fields as a web search result, plus an image sub-object:

Understand the image sub-object

URL of the web page that hosts the image. Use this to attribute the image source or link back to the originating page.
integer
Full-resolution height of the image in pixels.
integer
Full-resolution width of the image in pixels.
integer
File size of the full-resolution image in bytes.
URL of a Google-hosted thumbnail. Suitable for building image grids without hotlinking the original source.
integer
Height of the thumbnail image in pixels.
integer
Width of the thumbnail image in pixels.

Common patterns

Fetch transparent-background icon images — useful for logo searches or UI asset discovery:

Display images responsibly

The link field points to a third-party image URL. Do not hotlink production traffic directly to these URLs — the source server may apply rate limits, move the file, or have terms of service that prohibit hotlinking. Fetch and cache the image on your own infrastructure, or use thumbnailLink for preview purposes.
Always attribute the image source using image.contextLink and respect the licensing terms of the originating site. For royalty-free or Creative Commons images, combine image search with the rights filter (see Advanced Filters).

Error reference

Enable SafeSearch (safe=active) whenever your application might serve minors or operates in a regulated context. The default (off) returns unfiltered results.