Google Image Search API: CSE searchType=image JSON
Pricing
from $4.00 / 1,000 image search queries
Google Image Search API: CSE searchType=image JSON
Image queries and size, type, color or CC filters in, Google CSE searchType=image JSON out. Change one base URL before Jan 1, 2027. $0.004 per page.
Pricing
from $4.00 / 1,000 image search queries
Rating
0.0
(0)
Developer
Creator Fusion
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
12 days ago
Last modified
Categories
Features
Share
This Google Image Search API answers your existing Google Custom Search JSON API searchType=image calls with Google Custom Search image JSON (link, mime, image{contextLink, width, height, thumbnailLink}), with size, type, color and Creative Commons filters: Google shuts down the Custom Search JSON API on January 1, 2027, and here you change one base URL and keep your parser.
Use it as a live Standby API or as a batch run that writes one dataset row per image, billed per query page of up to 10 images.
Who it's for
- Developers migrating off the Custom Search JSON API
searchType=image, which stops on January 1, 2027: change the base URL, keep your parser. - Dataset builders who need thousands of image URLs with source pages as a CSV.
- AI agents (MCP) and no-code flows (n8n, Make, Zapier) that need image URLs for a topic.
Change one base URL
Migration diff for an existing CSE client:
- https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=ENGINE_ID&q=red+apple&searchType=image+ https://apricot-blackberry--google-image-search-api.apify.actor/customsearch/v1?token=APIFY_TOKEN&q=red+apple&searchType=image
Copy the exact Standby URL from the Actor's API tab in Apify Console. Results come from Google Images on google.com, not from your Programmable Search Engine, so the images and their order can differ from what your CSE returned.
Sample output
One dataset row per image (batch mode). A real row from the offline smoke run (test/smoke-input.json):
{"status": "ok","query": "golden retriever puppy","rank": 1,"page": 1,"title": "Golden Retriever: Pros, Cons & Diet Guide | Ollie","link": "https://blog.ollie.com/wp-content/uploads/250506_Livingroom_SHOT-10_0173_FR-scaled.jpg","displayLink": "blog.ollie.com","contextLink": "https://blog.ollie.com/breed-deets-golden-retriever/","mime": "image/jpeg","fileFormat": "image/jpeg","image": {"contextLink": "https://blog.ollie.com/breed-deets-golden-retriever/","height": 1707,"width": 2560,"byteSize": null,"thumbnailLink": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSe1mLcW_M8xRI0J5UcnG6soPw9kd8XQOgz7Y4sOLFZoA&s=10","thumbnailHeight": 452,"thumbnailWidth": 678},"appliedFilters": ["imgSize=large","safe=active"],"appliedFiltersText": "imgSize=large | safe=active","ignoredFilters": [],"fetchedAt": "2026-11-06T15:14:46.151Z"}
contextLink at the top level repeats image.contextLink for spreadsheet users. Failed queries produce {"status":"error","query":"...","input":{"query":"..."},"error":{"code":"...","message":"..."}} rows and are never charged. A query that Google answers with no images produces one {"status":"empty","message":"..."} row (charged as one image-query).
Output fields
| Field | Type | Description |
|---|---|---|
status | string | ok, empty or error |
query | string | The search term from queries |
rank, page | integer | Position of the image; page of 10 (each page is one image-query) |
title | string | Title of the source page |
link | string | Direct image URL |
displayLink | string | Host of the source page |
contextLink | string | Source page URL (same as image.contextLink) |
mime, fileFormat | string or null | From the image URL extension |
image | object | contextLink, width, height, byteSize (always null), thumbnailLink, thumbnailWidth, thumbnailHeight |
appliedFilters, ignoredFilters | string[] | Filters applied / set but not applied |
appliedFiltersText | string | appliedFilters joined with | |
fetchedAt | string | ISO 8601 fetch time |
error.code, error.message | string | Error rows only |
Dataset views: overview (status, query, rank, thumbnail, title, image URL, source page, width, height, error code) and flat (scalar columns only, with the applied filters as one text column, ready for Sheets). Download as JSON, CSV, Excel or HTML.
Pricing
Pay per event, one flat price on every Apify plan.
| Event | Price (all tiers) | When it fires |
|---|---|---|
image-query | $0.004 | Once per successfully parsed result page of up to 10 images (batch or Standby) |
- You are billed per query page, not per image: 25 images = 3
image-queryevents ($0.012); a Standby request withnum=10= 1 event ($0.004). - Not charged: invalid input, CAPTCHA or upstream failures, layout/parse errors.
- The run stops cleanly when your maximum charge is reached (batch:
BUDGET_EXHAUSTEDrows; Standby: HTTP 429). - Platform usage (compute and proxy) may be billed in addition to events.
Worked examples:
- 50 product queries, 10 images each: 50 pages = 50 x $0.004 = $0.20.
- Image dataset, 200 queries, 50 images each: 5 pages per query = 1,000 pages = $4.00.
- 5,000 Standby requests with
num=10: 5,000 pages = $20.00.
Input
Batch mode. Only queries is required; every other field has a default, so an agent can call with one field: {"queries":["red sneakers product photo"]}.
| Field | Type | Default | Notes |
|---|---|---|---|
queries (required) | string[] 1-500 | none (prefill ["golden retriever puppy"]) | Image search terms |
maxImagesPerQuery | integer 1-100 | 10 | Every 10 images = 1 image-query |
imgSize | enum | none | see table below |
imgType | enum | none | clipart, face, lineart, stock, photo, animated |
imgColorType | enum | none | color, gray, mono, trans |
imgDominantColor | enum | none | black, blue, brown, gray, green, orange, pink, purple, red, teal, white, yellow |
rights | enum[] | [] | cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived |
safe | active / off | active | SafeSearch, passed to Google |
gl | string | us | Two-letter country code |
hl | string | en | Interface language |
fileType | enum | none | jpg, png, gif, bmp, svg, webp, ico |
siteSearch | string | empty | Restrict to one domain, e.g. unsplash.com |
There are no secret fields and no proxy settings to configure.
Example:
{"queries": ["golden retriever puppy", "red sneakers product photo"],"maxImagesPerQuery": 20,"imgSize": "large","imgType": "photo","safe": "active"}
Public-domain dataset example:
{"queries": ["vintage map of texas"],"maxImagesPerQuery": 50,"rights": ["cc_publicdomain"],"fileType": "jpg"}
Filter values and what is applied
| Parameter | Values | Upstream behavior |
|---|---|---|
imgSize | huge, icon, large, medium, small, xlarge, xxlarge | icon, medium and large map one to one. small maps to medium; xlarge, xxlarge and huge map to large (approximate). |
imgType | clipart, face, lineart, stock, photo, animated | One to one. |
imgColorType | color, gray, mono, trans | mono is applied as grayscale. Ignored when imgDominantColor is set (listed in ignoredFilters). |
imgDominantColor | 12 colors | One to one. |
rights | 5 cc_* values | Google Images has a single Creative Commons filter; any value applies it. |
fileType | 7 formats | Applied as a file type filter. |
Invalid enum values return HTTP 400 (Standby) or fail the run before anything is charged (batch) with the list of valid values. Every response and row reports what was used: cfMeta.appliedFilters, cfMeta.ignoredFilters, cfMeta.approximatedFilters (Standby) and appliedFilters / ignoredFilters (rows). Unrecognized request parameters are listed in the X-CF-Ignored-Params response header.
Use with AI agents (MCP)
Add this server to Claude, Cursor or any MCP client:
https://mcp.apify.com?tools=apricot_blackberry/google-image-search-api
Example call-actor input:
{"actor": "apricot_blackberry/google-image-search-api","input": {"queries": ["red sneakers product photo"],"maxImagesPerQuery": 10},"callOptions": {"maxTotalChargeUsd": 1}}
Then read the run's default dataset (one row per image). Always set maxTotalChargeUsd as a run option (never inside input); at $0.004 per page of 10 images, maxTotalChargeUsd: 1 covers 250 pages.
API
Run it synchronously and get the dataset items back (maxTotalChargeUsd is a query parameter, not input):
curl -X POST "https://api.apify.com/v2/acts/apricot_blackberry~google-image-search-api/run-sync-get-dataset-items?maxTotalChargeUsd=1" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"queries":["red sneakers product photo"],"maxImagesPerQuery":10}'
JavaScript (apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('apricot_blackberry/google-image-search-api').call({ queries: ['red sneakers product photo'], maxImagesPerQuery: 10 },{ maxTotalChargeUsd: 1 },);const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.map((r) => `${r.link} from ${r.contextLink}`));
Python (apify-client):
import osfrom decimal import Decimalfrom apify_client import ApifyClientclient = ApifyClient(token=os.environ["APIFY_TOKEN"])run = client.actor("apricot_blackberry/google-image-search-api").call(run_input={"queries": ["red sneakers product photo"], "maxImagesPerQuery": 10},max_total_charge_usd=Decimal("1"),)for row in client.dataset(run["defaultDatasetId"]).list_items().items:print(row["link"], row["contextLink"])
For CSV, read https://api.apify.com/v2/datasets/<datasetId>/items?view=flat&format=csv.
Standby API
Drop-in for Google Custom Search searchType=image. Base URL https://apricot-blackberry--google-image-search-api.apify.actor (copy the exact URL from the Actor's API tab).
curl -H "Authorization: Bearer $APIFY_TOKEN" \"https://apricot-blackberry--google-image-search-api.apify.actor/customsearch/v1?q=red+apple&searchType=image&num=10&imgSize=large"
- Authenticate with
Authorization: Bearer <Apify API token>or?token=<Apify API token>. Each successful request is oneimage-queryevent ($0.004). - Required:
q,searchType=image. WithoutsearchType=imageyou get HTTP 400 pointing toapricot_blackberry/google-cse-dropinfor web results. - Supported:
num1-10,start(start + num - 1 <= 100),safe,gl,hl,imgSize,imgType,imgColorType,imgDominantColor,rights(comma separated),fileType,siteSearch,siteSearchFilter,dateRestrict,exactTerms,excludeTerms,orTerms,hq,lr,cr,filter.cxis accepted and echoed;keyis ignored. Other parameters are echoed or ignored and named inX-CF-Ignored-Params. - Response: the CSE
Searchshape (kind,queries.request[0].searchType = "image",searchInformation,items[]withlink,mime,fileFormat,image{}) plus acfMetaobject. - Errors: Google-style
{"error":{"code","message","errors":[…],"status"}}with 400, 404, 429 (budget), 503 (upstream blocked or unparseable page,reason: parseError, not charged) and 500. - Latency: typically 4-8 s; when Google's search proxy is under heavy load, 20-45 s. Requests time out at 60 s (then
503, not charged). Set your HTTP client timeout to at least 65 s. GET /answers the readiness probe.
n8n, Make and Zapier
In Zapier use "Webhooks by Zapier", GET: URL https://apricot-blackberry--google-image-search-api.apify.actor/customsearch/v1, query string params q, searchType=image, num=10, and header Authorization: Bearer <your Apify token>. Use items from the response in later steps. In n8n or Make use an HTTP Request node with the same URL and query parameters, or the Apify "Run Actor" node with the batch input above.
FAQ
Is this a Google Custom Search image search (searchType=image) replacement? Yes. The Standby endpoint answers customsearch/v1?searchType=image with the same JSON shape; change the base URL and swap key= for your Apify token.
Is it priced per image? No. It is priced per query page of up to 10 images, $0.004 per page.
Are the images free to use? Not necessarily. The rights filter is a hint passed to Google. Always verify the license at the source page (contextLink) before using an image.
Are results identical to my CSE image search? No. They are Google Images results from google.com, so images and order can differ from what your engine returned.
Is byteSize returned? It is null for now. mime and fileFormat come from the image URL extension and are null when the URL has none.
Does it download images? No. It returns image URLs and source pages only.
Limits
- Filter codes are UNVERIFIED. The mapping from CSE filters to Google Images URL filter codes (size, type, color, dominant color, Creative Commons, file type) follows public knowledge and could not be tested live while building. Check
appliedFiltersand spot-check results before relying on a filter. Approximated filters are listed incfMeta.approximatedFilters. - Paging beyond the first upstream page (about 50 images) is UNVERIFIED. Requests for
startormaxImagesPerQuerybeyond that fetch a further page; if Google does not return new images, you get what was found. - Google caps image results;
start + num - 1must be 100 or less. - Width and height come from Google and can be
nullfor some tiles. - No Google Lens or reverse image search; no web results (use
apricot_blackberry/google-cse-dropin). - A Google layout change that yields no parseable images returns 503
parseError(Standby) or an error row (batch) and is not charged. - Batch runs accept up to 500 queries and 100 images per query.
- The Actor returns image URLs and source pages that Google shows publicly; it does not download images or collect personal data.
Support
Built by Creator Fusion LLC (Creator Fusion Labs). Questions and bug reports: contact@creatorfusion.net, or open an issue on the Actor's Issues tab.
If this Actor saved you time, please leave a review on its Apify Store page. Honest reviews, good or bad, are how other people decide whether to trust it, and we read every one. Found a problem? Open an issue on the Issues tab and we will fix it.
