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.

Partager
A developer in a busy open-plan office stares at a monitor, one hand over the mouth, while colleagues work at the desks behind.
Photo via blue sky on Unsplash

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:

SourceWhat it saysDate
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:

  1. Agents and LLM tool kits. CAMEL, a multi-agent framework with 18,000 GitHub stars, ships a search_google() tool whose search_type="image" option appends &searchType=image to a customsearch/v1 URL. Every agent that leans on a tool like that loses its eyes on 1 January.
  2. 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.
  3. Chat bots. Several of the most-starred matches are Discord and IRC bots whose image command is a single Custom Search call.
  4. 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 forWhat you need nowWhere 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

OptionWhose indexTo startWhat to know
Google Custom Search JSON API Google 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

OptionWhat it searchesFree tierWhat 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:

  1. Every result says what you may do with it. Each photo comes with its library, its photographer, its license_type and a ready-made credit line (attribution.plain and attribution.html). Showing the right credit becomes one line of code instead of a manual check.
  2. One key, 9 libraries. Unsplash, Pexels, Pixabay and the rest, deduplicated in a single index of 9M+ photos. Need one library only? The source parameter does what siteSearch used to.
  3. 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.
  4. The filters you used carry over. The twelve colour names of imgDominantColor work as they are in color_name — or pass any hex in color_hex — and orientation keeps landscape, portrait or square.
  5. Bigger pages. Up to 100 results per request with cursor pagination, where Google stopped at 10 per request and 100 per query.
  6. 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:

PlanPer monthRequests / monthRequests / 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≈$485100,000—
Pexafy Free$05,0001,200
Pexafy Starter$525,0001,800
Pexafy Pro$19250,0003,600
Pexafy Team$591,000,00012,000
Pexafy Business$992,000,00018,000
Pexafy Enterprise$2495,000,00030,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

The calls, the keys and the engine IDs, in one pass
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 and after — the same image search
# 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 parameterPexafyNote
key, cxX-Api-Key headerOne key; no engine to configure
qqUp to 500 characters; full sentences work best
searchType=image—The endpoint only returns photos
num (1–10)per_page (1–100)
startcursorPass back pagination.next_cursor
imgDominantColorcolor_nameThe 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
rightslicense_typeEvery result is under a free licence; license_type names it
siteSearchsourceFilter by library: Unsplash, Pexels, Pixabay…
Custom Search result (items[])Pexafy result (data[])Note
linkurls.fullThe image file; urls.regular (1,280 px wide) for display
image.thumbnailLinkurls.thumb or urls.small
image.contextLinksource_image_urlThe photo’s page on its library
image.width, image.heightwidth, heightOf the original photo
titlealt_descriptionA description of the photo; can be empty
displayLinksource“Unsplash”, “Pexels”, “Pixabay”…
—photographer_full_name, license_type, attributionNew: 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.

cse_compat.py — Pexafy results in the Custom Search shape (Python 3.9+)
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

  1. Inventory. Every call to customsearch/v1, every GOOGLE_CSE_ID, every agent tool that wraps them. The grep above is a start.
  2. Label each call with its job. Web (job 1), publish (job 2) or own site (job 3). Different jobs, different replacements.
  3. 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.
  4. Show the credit. If the image is displayed, display attribution with it.
  5. 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.
  6. 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.

Foire aux questions

Is Google shutting down its image search API?
Yes. Image search is part of the Custom Search JSON API, which Google has closed to new customers and is discontinuing for everyone else: “Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution.” The 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?
It stops working: Google’s pricing applies “until the service discontinuation on January 1, 2027.” Google hasn’t documented the error the endpoint will return afterwards, so treat any error as “service gone” — log it and fall back instead of retrying. Until then, existing keys keep the same terms: 100 free queries a day, then $5 per 1,000, up to 10,000 a day.
Is there an official Google replacement for image search?
Not a self-serve one. Google points to Vertex AI Search, “a favorable alternative for searching up to 50 domains” — site search, which can return images from the sites you index on its Enterprise edition — and to an interest form for its full-web search, which Search Engine Journal reports is documented as a partner-only API. Neither replaces a public API that searched the whole web for images.
What replaced the Bing Image Search API?
Nothing equivalent. Microsoft retired all Bing Search APIs, image search included, on 11 August 2025, and points customers to Grounding with Bing Search, which feeds public web data into the answers of Azure AI Agents. Microsoft’s notice says nothing about returning image results.
Can I use images I found with Google Images or the Custom Search API?
Not by default. They are the web’s images, owned by their authors — Google’s own help says “Images might be subject to copyright.” Even the 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?
It depends on the job. To find any image on the web, use a web search API: the Brave Search API has its own index, while SerpApi, SearchApi and DataForSEO sell Google Images results. To find images you can publish, Pexafy searches millions of free photos from Unsplash, Pexels, Pixabay and other libraries with one key, by meaning, with a credit line on every result; Unsplash, Pixabay, Openverse and Wikimedia Commons offer single-library APIs.
How do I migrate a searchType=image call to Pexafy?
Point it at 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.

Ne cherchez plus de mots-clés. Décrivez ce que vous avez en tête.

Recherchez parmi 9M+ images libres de droits par le sens — dans n'importe quelle langue, en moins de 100 ms.