Google’s Image Search API Ends on January 1, 2027. Here’s What to Use Instead
“Existing Custom Search JSON API customers have until January 1, 2027.” What stops, who still depends on searchType=image, and how to replace it — with images you can actually publish.
For more than a decade, the shortest path from a word to a picture, for a program, was one URL:
customsearch/v1?searchType=image&q=…. Chat bots used it to answer “show me a cat”,
agent frameworks to give a model eyes on the web, plugins to put a picture on top of a post. On
1 January 2027, Google switches it off — and since Bing’s image API is already gone, neither of
the two big search engines will sell you a replacement.
This guide pins down what stops and when, from Google’s and Microsoft’s own pages; shows who still depends on it; and sorts the replacements by the job your code was really doing — because the right answer for “find any image on the web” is the wrong one for “find an image I can publish”. In a hurry? Jump to the three jobs or straight to the migration.
What Google is switching off, and when
Google told its Programmable Search Engine customers in January 2026, by email and on its blog. The developer pages now say it in a few sentences:
| Source | What it says | Date |
|---|---|---|
| Custom Search JSON API overview | “The Custom Search JSON API is closed to new customers.” · “Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution.” | Live page, read 17 Nov 20261 |
| Same page · pricing | 100 free queries a day, then $5 per 1,000, up to 10,000 a day — a price that “applies only to existing Custom Search JSON API customers until the service discontinuation on January 1, 2027.” | Live page |
| Google’s email to Programmable Search Engine customers | “All new engines must be configured to use the ‘Sites to search’ feature”; existing engines “can continue to use the ‘Search the entire web’ option until January 1, 2027.” | 22 Jan 2026 (blog post dated 20 Jan)2 |
API reference · cse.list |
Still documents searchType — “Specifies the search type: image” — with no end date. |
Not updated |
Quotes copied from each page on 17 November 2026. Every source is in the footnotes.
Image search isn’t a separate product that might survive. The overview describes one API that returns
“either web search or image search results in JSON format”, and searchType=image is just a
parameter of it: when the endpoint goes, both go. New projects are locked out already — developers
report that a fresh Google Cloud project gets 403 PERMISSION_DENIED, “This project does not
have the access to Custom Search JSON API”, even with a valid key and engine ID3.
What Google hasn’t published is what the endpoint will answer on 2 January. Plan for an error, not
for a polite notice.
Bing went first
Microsoft took the same road seventeen months earlier. Its lifecycle notice of May 2025 is blunt: “Bing Search APIs will be retired on August 11, 2025. Any existing instances of Bing Search APIs will be decommissioned completely, and the product will no longer be available to be used or new customer signup.”4 The Bing Image Search API was one of them; its documentation now sits in Microsoft’s archive of retired products.
The replacement Microsoft points to, Grounding with Bing Search, “allows Azure AI Agents to incorporate real-time public web data when generating responses with an LLM”. It feeds a model’s answer; the notice says nothing about returning images. Google’s suggested routes are similar in spirit: Vertex AI Search, “a favorable alternative for searching up to 50 domains”, and a form to “express your interest” in its full-web search. Search Engine Journal reported in September that Google now documents a Web Search Service API for that — for partners only, with no public price or sign-up4.
So from 1 January 2027, neither of the two big search engines sells a self-serve API that turns a query into web images as JSON. Whatever you pick next, it won’t be an official Google or Bing API.
Who still depends on it
More code than you might think. On 17 November, GitHub’s code search counted about
3,000 files in public repositories that contain both customsearch and
searchType=image3. Read through them and four families appear:
-
Agents and LLM tool kits. CAMEL, a multi-agent framework with 18,000 GitHub stars,
ships a
search_google()tool whosesearch_type="image"option appends&searchType=imageto acustomsearch/v1URL. Every agent that leans on a tool like that loses its eyes on 1 January. - Apps that pick a picture for you. beets, the music-library manager, has a “Google Images” source in its album-art plugin that calls the same endpoint. Plugins, auto-blogging scripts and slide or video generators do the same to put an image on top of a draft.
- Chat bots. Several of the most-starred matches are Discord and IRC bots whose image command is a single Custom Search call.
- Research and monitoring scripts. Dataset collection, brand monitoring, “what does this product look like” lookups — anything that needed the open web’s images in JSON.
Maintainers have started to react. On 5 November, one developer filed the same heads-up — “Google
Custom Search JSON API is discontinued on January 1, 2027” — in 30 projects that call it. A pull request
on LangChain’s Google integration proposes a setting to point its search wrapper at another endpoint; a
LlamaIndex issue asks for the same; the UK AI Security Institute’s inspect_ai has an issue
open to remove its Google search provider altogether3. Most of that
discussion is about web results. Image search gets less attention — and it has a trap of its own.
First, name the job
“Replace Google’s image search API” sounds like one problem. It is three, with different answers:
| What your code used it for | What you need now | Where to look |
|---|---|---|
| 1 · Find any image on the web — research, monitoring, “what does X look like” | A web search API with image results | Brave Search API, or a provider of Google results such as SerpApi, SearchApi or DataForSEO |
| 2 · Find an image to show or publish — illustrations, thumbnails, bots and agents that post pictures | Images whose licence allows that use, with the credit to display | Pexafy, or one library at a time: Unsplash, Pixabay, Openverse, Wikimedia Commons |
| 3 · Search the images on your own site | Site search | Vertex AI Search, Google’s suggested route for up to 50 domains, or an index of your own |
A quick test tells job 1 from job 2: follow the image after the call. If it ends up on a page, in a post, in a slide or in a chat, you are doing job 2 — and a straight swap to another web search API keeps the one problem Google’s results always had.
The licence trap
Google never licensed the images it returned. Its own help page is explicit: “Important: Images might
be subject to copyright.” The Custom Search API did offer a rights filter —
cc_publicdomain, cc_attribute, cc_sharealike,
cc_noncommercial, cc_nonderived — but it works on labels: Google “filters images
by license based on information provided by the sites that host those images”, and adds, “Before you
reuse content, make sure that its license is legitimate and check the exact terms of reuse.”1
Providers of Google results inherit that: same images, same owners, same checks. Some add a legal question of their own. Google sued SerpApi in a federal court in California on 19 December 2025, alleging that it circumvents the protections Google puts on its results pages; we found no ruling as of mid-November 20265.
So if the images end up in front of people, treat the shutdown as a chance to fix the source: pick one that tells you, for every result, what you may do with it and whom to credit.
Your options, side by side
For job 1 — images from the open web
| Option | Whose index | To start | What to know |
|---|---|---|---|
| Google Custom Search JSON API | Closed to new customers | Ends 1 Jan 2027. Until then: 10 results per request, never more than 100 per query | |
| Bing Image Search API | Bing | Retired | Since 11 Aug 2025 |
| Brave Search API | Brave’s own web index, with an image endpoint | Monthly free credit, then pay per request | The only independent index in this table |
| SerpApi | Google Images results, collected by SerpApi | 250 searches a month free; from $25 a month for 1,000 | Defendant in Google’s December 2025 lawsuit |
| SearchApi | Google Images results | 100 free requests; from $40 a month for 10,000 | Billed per successful search |
| DataForSEO | Google Images results | $1 trial credit; $0.60 per 1,000 results pages (standard queue) | $50 minimum top-up; desktop results only |
Prices from each provider’s own pages on 17 November 2026. None of these options licenses the images it finds: they are the web’s images, owned by their authors.
For job 2 — images you can show and publish
| Option | What it searches | Free tier | What it asks of you |
|---|---|---|---|
| Pexafy | 9M+ free photos from 9 libraries — Unsplash, Pexels, Pixabay and more — in one index | Yes 5,000 requests a month, up to 1,200 an hour | One key; each photo keeps its library’s licence; a credit line comes with every result |
| Unsplash API | Unsplash | 50 requests an hour in demo mode, 1,000 after approval | Use its hotlinked image URLs, credit the photographer and Unsplash, call the download endpoint when a photo is used |
| Pixabay API | Pixabay | 100 requests a minute (6,000 an hour) | Cache responses for 24 h; no permanent hotlinking — download images to your server first; show where they come from |
| Pexels API | Pexels | 200 requests an hour, 20,000 a month | Paused no new API keys since late September 2026 — what changed |
| Openverse API | Creative Commons and public-domain works from many sites | Anonymous use, throttled; higher limits once you register a free key | Each work’s own licence and attribution terms |
| Wikimedia Commons API | Commons media files | 10 requests a minute unidentified, 200 with a compliant User-Agent | A descriptive User-Agent (generic ones get a 403); the licence varies file by file |
Read from each API’s documentation on 17 November 2026; Wikimedia calls its 2026 limits “subject to experimentation and change”. For quotas in the same unit and ten criteria per API, see our free stock photo API comparison.
Why Pexafy, for the images you publish
Pexafy is built for job 2: one API over the free-licence photo libraries, searched by meaning. For a team
leaving searchType=image, that means:
-
Every result says what you may do with it. Each photo comes with its library, its
photographer, its
license_typeand a ready-made credit line (attribution.plainandattribution.html). Showing the right credit becomes one line of code instead of a manual check. -
One key, 9 libraries. Unsplash, Pexels, Pixabay and the rest,
deduplicated in a single index of 9M+ photos. Need one library
only? The
sourceparameter does whatsiteSearchused to. - Describe the picture, don’t guess its keywords. Write the scene as a full sentence — up to 500 characters, in any of 100+ languages — and Pexafy ranks by meaning, so detail sharpens the results instead of emptying them. The photo at the top of this page is the first result for exactly that kind of sentence: a developer in a busy open-plan office staring at the monitor, one hand over the mouth. How that differs from keyword search is in semantic image search vs keywords.
-
The filters you used carry over. The twelve colour names of
imgDominantColorwork as they are incolor_name— or pass any hex incolor_hex— andorientationkeeps landscape, portrait or square. - Bigger pages. Up to 100 results per request with cursor pagination, where Google stopped at 10 per request and 100 per query.
- Ready for agents. Search by image — send a photo, get look-alikes from the free libraries — and a hosted MCP server that lets Claude, ChatGPT, Cursor and other agents search and credit photos by themselves. Setup is on our MCP page.
And the bill. Google charged by the thousand once you passed 100 queries a day; Pexafy sells monthly plans:
| Plan | Per month | Requests / month | Requests / hour |
|---|---|---|---|
| Google Custom Search, free quota until 1 Jan 2027 | $0 | ≈3,000 (100 a day) | — |
| Google Custom Search, 100,000 searches until 1 Jan 2027 | ≈$485 | 100,000 | — |
| Pexafy Free | $0 | 5,000 | 1,200 |
| Pexafy Starter | $5 | 25,000 | 1,800 |
| Pexafy Pro | $19 | 250,000 | 3,600 |
| Pexafy Team | $59 | 1,000,000 | 12,000 |
| Pexafy Business | $99 | 2,000,000 | 18,000 |
| Pexafy Enterprise | $249 | 5,000,000 | 30,000 |
Google: $5 per 1,000 queries beyond the free 100 a day, up to 10,000 a day — 97,000 paid queries in a 30-day month for the second row. Not the same product: Google searched the web, Pexafy searches free-licence photos. Pexafy rows are read live from our plan catalogue, and yearly billing costs less — see pricing. Pexafy enforces its limits per minute, so the hourly figure is that limit over sixty minutes.
Move a searchType=image call to Pexafy
1 · Find every call
grep -rnE "customsearch/v1|searchType|GOOGLE_CSE_ID|cse_id" .
Agent frameworks often hide the call behind a “Google search” tool configured with a
GOOGLE_API_KEY and an engine ID, so search your configuration files too.
2 · Get a key
Create a free account, then
create an API key in your dashboard. Keep it on your server,
in an environment variable such as PEXAFY_API_KEY — never in browser code.
3 · Change the request
# Before: Google Custom Search (stops on 1 January 2027)
curl "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$GOOGLE_CSE_ID&searchType=image&q=red+bicycle&num=10&imgDominantColor=red"
# After: Pexafy — describe the picture in a sentence
curl -H "X-Api-Key: $PEXAFY_API_KEY" \
"https://api.pexafy.com/api/v1/search/photos?q=a+red+bicycle+leaning+against+a+brick+wall&per_page=10&color_name=red"
4 · Rename the parameters, then the fields
| Custom Search parameter | Pexafy | Note |
|---|---|---|
key, cx | X-Api-Key header | One key; no engine to configure |
q | q | Up to 500 characters; full sentences work best |
searchType=image | — | The endpoint only returns photos |
num (1–10) | per_page (1–100) | |
start | cursor | Pass back pagination.next_cursor |
imgDominantColor | color_name | The same twelve names; color_hex for any colour |
imgColorType=gray, mono | — | No filter: write “a black and white photo of…” in q |
imgSize | — | Every result has width and height: filter on them |
rights | license_type | Every result is under a free licence; license_type names it |
siteSearch | source | Filter by library: Unsplash, Pexels, Pixabay… |
Custom Search result (items[]) | Pexafy result (data[]) | Note |
|---|---|---|
link | urls.full | The image file; urls.regular (1,280 px wide) for display |
image.thumbnailLink | urls.thumb or urls.small | |
image.contextLink | source_image_url | The photo’s page on its library |
image.width, image.height | width, height | Of the original photo |
title | alt_description | A description of the photo; can be empty |
displayLink | source | “Unsplash”, “Pexels”, “Pixabay”… |
| — | photographer_full_name, license_type, attribution | New: who took it, its licence, the credit to show |
One detail catches people when they port image code: in Google’s results, link is the image
file and image.contextLink the page that hosts it. Swap them and your thumbnails point at web
pages.
5 · Or keep your Custom Search–shaped code as it is
If the rest of your code reads items[].link and image.contextLink, leave it alone.
Put this adapter on your server: it calls Pexafy and returns the Custom Search shape, plus the credit line
Google never gave you.
import os
import requests
PEXAFY = "https://api.pexafy.com/api/v1/search/photos"
FIELDS = "photo_id,urls,width,height,source,source_image_url,alt_description,attribution"
def image_search(q, num=10, dominant_color=None, cursor=None):
"""Drop-in for customsearch/v1?searchType=image: same "items" shape, from Pexafy."""
params = {"q": q, "per_page": num, "fields": FIELDS}
if dominant_color: # imgDominantColor values work as they are
params["color_name"] = dominant_color
if cursor: # replaces start=
params["cursor"] = cursor
r = requests.get(PEXAFY, params=params, timeout=10,
headers={"X-Api-Key": os.environ["PEXAFY_API_KEY"]})
r.raise_for_status()
body = r.json()
return {
"items": [
{
"title": p.get("alt_description") or "",
"link": p["urls"]["full"], # the image file
"displayLink": p["source"], # "Unsplash", "Pexels"…
"image": {
"contextLink": p["source_image_url"], # the photo's page
"thumbnailLink": p["urls"]["thumb"],
"width": p["width"], # size of the original photo
"height": p["height"],
},
"attribution": p["attribution"]["plain"], # new: show it with the image
}
for p in body["data"]
],
"nextCursor": body["pagination"]["next_cursor"], # replaces queries.nextPage
}
The fields parameter keeps responses to what the adapter reads. Every other filter (orientation,
colour by hex, licence, library), search by image and every response field are in the
API documentation. Your Google key keeps
working until 1 January, so run both on your real queries side by side before you switch the default.
Before January 1: a checklist
-
Inventory. Every call to
customsearch/v1, everyGOOGLE_CSE_ID, every agent tool that wraps them. Thegrepabove is a start. - Label each call with its job. Web (job 1), publish (job 2) or own site (job 3). Different jobs, different replacements.
- Swap and compare now. Run the new source next to Google on your real queries while both work, and switch the default once you trust it.
-
Show the credit. If the image is displayed, display
attributionwith it. - Plan for the failure. Google hasn’t documented what the endpoint will return after the date. Treat any error from it as “gone”: log it, fall back, alert — and don’t retry in a loop.
- Clean up. When traffic reaches zero, remove the Google key and the engine ID from your configuration and your secrets.
Google’s image API joins a list that already holds source.unsplash.com, switched off in 2024,
and the Pexels API keys, paused since September — see our
source.unsplash.com post-mortem
and our Pexels API guide.
The lesson is the same each time: a feature that depends on one provider is a single point of failure.
For the images you publish, Pexafy turns it into one key over 9 libraries, with
the licence and the credit in every answer. Get your free key — your
first search can run in the next five minutes, and your Google key still has until 1 January.
References & footnotes
1 Google pages read on 17 November 2026: the
Custom Search JSON API overview
(closure note, end date, “web search or image search”, pricing); the
cse.list
and Search
reference pages (searchType, rights, imgDominantColor, num,
start and the result fields; neither page mentions the end date); and Google Search Help,
Find images you can use & share.
2 Google Programmable Search Engine, email “Updates to our Web Search Products & Programmable Search Engine Capabilities”, 22 January 2026, as forwarded on a public Google Group. The matching blog post is dated 20 January 2026.
3 GitHub, 17 November 2026. Code search for
"searchType=image" customsearch: 3,036 files (GitHub’s own count, which includes copies of the
same file across forks). Read by hand:
CAMEL’s search toolkit
(search_google, search_type="image") and
beets’ fetchart plugin
(GoogleImages source). Issues and pull requests:
LazyLLM #1466
(one of the 30 heads-up issues opened on 5 November by the same account, and the source of the
403 report) ·
langchain-google #2027 ·
llama_index #24126 ·
inspect_ai #6532.
4 Microsoft Learn, Bing Search APIs Retiring on August 11, 2025, published 15 May 2025. Search Engine Journal, Google Documents Partner-Only API For Full-Web Search Results, 11 September 2026.
5 Google v. SerpApi, filed 19 December 2025: IPWatchdog · Search Engine Roundtable.
Third-party pages read on 17 November 2026: Brave Search API · SerpApi pricing · SearchApi pricing · DataForSEO Google Images pricing · Unsplash API docs · Unsplash API guidelines · Pixabay API docs · Pexels API · Openverse API · Wikimedia rate limits · Wikimedia User-Agent policy · Pexafy API & MCP docs. Pexafy plans are read live from the pricing catalogue.
Najczęściej zadawane pytania
Is Google shutting down its image search API?
searchType=image parameter goes with it — the same API returns “either web search or image search results”.What happens to my Custom Search API key on January 1, 2027?
Is there an official Google replacement for image search?
What replaced the Bing Image Search API?
Can I use images I found with Google Images or the Custom Search API?
rights filter relies on licence information “provided by the sites that host those images”, and Google asks you to make sure a licence is legitimate before reuse. For images you will publish, use a source that gives you the licence and the credit with every result.What is the best alternative to Google’s image search API?
How do I migrate a searchType=image call to Pexafy?
https://api.pexafy.com/api/v1/search/photos, send your key in an X-Api-Key header instead of key and cx, and rename a few things: num becomes per_page (up to 100), start becomes cursor, imgDominantColor becomes color_name. In results, items[] becomes data[], link becomes urls.full and image.contextLink becomes source_image_url. The article has both mapping tables and an adapter that returns Custom Search–shaped results.