Skip to the page

Google Custom Search images (searchType=image)

Change the address.

Google discontinues the Custom Search JSON API, and its searchType=image call with it, on January 1, 2027. The API is already closed to new customers. SpecStream answers the same image call today, in Google's JSON.

The switch is one line: https://api.specstream.ai in place of https://www.googleapis.com, and a SpecStream key in key=. searchType=image, q, num and start stay, and items[].link is still the image.

An image search of up to 10 results costs $0.005, which is $5 per 1,000, the price of a web search, with no plan and no daily limit. The same key runs web search scoring 97.9 F-score on all 1,000 SimpleQA Verified questions.

New accounts get $10 of credit, no card. It covers 2,000 searches.

Custom Search image search to SpecStream, parameter by parameter and field by field

SpecStreamGoogle Custom Search JSON API, searchType=image
AddressGET https://api.specstream.ai/customsearch/v1 with searchType=imageGET https://www.googleapis.com/customsearch/v1. Closed to new customers, and discontinued on January 1, 2027
The keyA SpecStream key in key=, in the X-Goog-Api-Key header or as a Bearer tokenAn API key, and a Programmable Search Engine you configured
`searchType`image returns image results. Any other value gets 400 in Google's error form, and a call without it returns web resultsimage for custom image search. Left out, results are limited to webpages
`cx`Accepted and not used. The results come from the image search of several engines at onceThe ID of the Programmable Search Engine to use for the request
`num`1 to 10, and 10 when you send none. A value outside that range gets 400Integers between 1 and 10, inclusive
`start`From 1. queries.nextPage[0].startIndex gives the next pageNever more than 100 results for a query: start plus num above 100 returns an error
`items[].link`The image itself. displayLink is the site of the page it is on, and snippet is the image's titleThe URL of each result
`items[].image`contextLink, the page the image is on, with width, height, thumbnailLink, thumbnailWidth and thumbnailHeight when the search engines give them. byteSize is left outcontextLink, a URL pointing to the webpage hosting the image, with height, width, byteSize (the size of the image, in bytes), thumbnailLink, thumbnailHeight and thumbnailWidth
`mime` and `fileFormat`The image's media type, such as image/jpeg, when the search engines give itThe MIME type and the file format of the search result
ErrorsGoogle's error body: error.code, message, errors[] and status. A 429 comes with Retry-After and charges nothingIts terms say you may be charged for each successful request
Price per 1,000 searches$5. An image search of up to 10 results is one search at $0.005, the price of a web search$5 per 1,000 queries after 100 free queries a day, for existing customers
Daily limitNone. Calls spend from your balance, inside the spending limit you set on the account or the key10,000 queries a day

Google's image search call, on SpecStream

What else Custom Search image customers can use

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to migrate, step by step

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Set the base address to https://api.specstream.ai where your code has https://www.googleapis.com or https://customsearch.googleapis.com, and send the SpecStream key in key=. In Python:

import requests

BASE = "https://api.specstream.ai"  # was https://www.googleapis.com

reply = requests.get(
    f"{BASE}/customsearch/v1",
    params={"key": SPECSTREAM_KEY, "cx": CX, "searchType": "image", "q": "red running shoes", "num": 10},
    timeout=30,
)
reply.raise_for_status()
for item in reply.json().get("items", []):
    image = item["image"]
    print(item["link"], image["contextLink"], image.get("width"), image.get("height"))

3. In JavaScript, with the key in the X-Goog-Api-Key header:

const params = new URLSearchParams({ searchType: "image", q: "red running shoes", num: "10" });
const res = await fetch(`https://api.specstream.ai/customsearch/v1?${params}`, {
  headers: { "X-Goog-Api-Key": process.env.SPECSTREAM_KEY },
});
const data = await res.json();
for (const item of data.items ?? []) console.log(item.link, item.image.contextLink);

4. If your code uses Google's Python client, change the line that builds it: build("customsearch", "v1", developerKey=SPECSTREAM_KEY, client_options={"api_endpoint": "https://api.specstream.ai"}). cse().list(q=..., cx=..., searchType="image") stays as it is. Tested on November 10, 2026 with google-api-python-client 2.202.0. Read image.width, image.height and the thumbnail fields with a default, as above: they are there when the search engines give them. Drop any read of image.byteSize.

5. To page, send the startIndex from queries.nextPage[0] as start. On a 429, wait the seconds in Retry-After and send the call again; nothing was charged.

Frequently asked questions

Something we didn't answer? Talk to a human

Is Google's image search API shutting down?
Yes. Google discontinues the Custom Search JSON API, which serves searchType=image, on January 1, 2027, and it is closed to new customers. SpecStream answers the same image call at https://api.specstream.ai/customsearch/v1 today.
What is the best Google Images API alternative?
SpecStream, at $5 per 1,000 image searches with no daily limit. It answers Google's own searchType=image call in Google's JSON, so the code you have keeps working after one changed line.
How do I search images with the Custom Search API in Python?
Send searchType=image with q and num (1 to 10) to /customsearch/v1, and read items[].link for the image and items[].image.contextLink for its page. On SpecStream the call is the same with https://api.specstream.ai as the address and a SpecStream key in key=.
Which image fields does SpecStream not return?
One: image.byteSize, because no engine gives it. image.width, image.height, thumbnailLink, thumbnailWidth, thumbnailHeight, mime and fileFormat come back when the search engines give them.
Do I still need a search engine ID (cx) for image search?
No. cx is accepted and not used, so a call that sends it works unchanged. The results come from the image search of several engines at once.
How much does an image search cost?
$0.005 for up to 10 results, which is $5 per 1,000, the same as a web search. Google charges existing customers $5 per 1,000 after 100 free queries a day and stops at 10,000 a day; SpecStream has no daily limit.
Does SpecStream do reverse image search?
No. SpecStream searches images by words: q is the query, as on Google's searchType=image call.

Sources

SpecStream wrote this page. Each Google figure comes from Google's own pages, and each other provider's figure from that company's own page. The route's behavior is taken from its code.

  1. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 10, 2026
  2. Google Custom Search JSON API reference, cse.listdevelopers.google.com/custom-search/v1/reference/rest/v1/cse/list, read Nov 10, 2026
  3. Google Custom Search JSON API reference, Searchdevelopers.google.com/custom-search/v1/reference/rest/v1/Search, read Nov 10, 2026
  4. Google Custom Search terms of servicedevelopers.google.com/custom-search/terms, read Nov 10, 2026
  5. Google Cloud, Agent Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
  6. Gemini API, grounding with Google Searchai.google.dev/gemini-api/docs/google-search, read Nov 10, 2026
  7. Brave Search APIbrave.com/search/api/, read Nov 10, 2026
  8. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  9. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026