API reference · Search engines
Google Images Search
Google Image Search API: search Google Images by keyword, country and language, and get each image's title, image URL, thumbnail, source page and domain as JSON. Returned links do not grant image usage rights.
Example
curl -X POST 'https://api.serpbase.dev/google/image/search' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"query":"red pandas"}'{
"status": 0,
"credits_charged": 1,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_images_search",
"query": "red pandas",
"images": [
{
"display_link": "en.wikipedia.org",
"display_url": "en.wikipedia.org",
"domain": "en.wikipedia.org",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/f/fd/Red_Panda%2C_Gentle_Tree-Dweller_of_the_Himalaya…",
"link": "https://en.wikipedia.org/wiki/Red_panda",
"position": 1,
"rank": 1,
"source": "Wikipedia",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTNeizrqHVhTRtzGZT4s3Pnmc_FSNTmyKg45Jj_Fn8k8A&s=10",
"thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTNeizrqHVhTRtzGZT4s3Pnmc_FSNTmyKg45Jj_Fn8k8A&s=10",
"title": "Red panda - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Red_panda"
},
{
"display_link": "kids.nationalgeographic.com",
"display_url": "kids.nationalgeographic.com",
"domain": "kids.nationalgeographic.com",
"image_url": "https://i.natgeofe.com/k/63b1a8a7-0081-493e-8b53-81d01261ab5d/red-panda-full-body_16x9.jpg",
"link": "https://kids.nationalgeographic.com/animals/mammals/facts/red-panda",
"position": 2,
"rank": 2,
"source": "National Geographic Kids",
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSCqYcPPXKAmx1AUafJcJFQ3vJ9RQmG_9xH0vqAXEocBg&s=10",
"thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSCqYcPPXKAmx1AUafJcJFQ3vJ9RQmG_9xH0vqAXEocBg&s=10",
"title": "Red Panda | National Geographic Kids",
"url": "https://kids.nationalgeographic.com/animals/mammals/facts/red-panda"
}
],
"page": 1,
"search_type": "images"
}Parameters
qrequiredhlMore
Defaults to en.
glMore
Defaults to us.
pageMore
Defaults to 1.
formatMore
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
timeoutMore
Optional; without it the platform spends up to 30 seconds. With it, retries on other routes start earlier so an answer can still arrive inside your budget, and when the budget runs out the request ends with status 1504 and is not charged, instead of being cut off by your HTTP client. Keep your client's own timeout above this value.
querySome Google Images payload shapes expose rank/link but not every normalized alias. Treat url, display_url, source_url, position, and thumbnail as optional.
What comes back
Fields that are not on the page for a given request are left out rather than sent empty.
querystringrequired
Normalized query from the request.
pagenumberrequired
Current 1-based page number.
imagesImageResult[]When image results are parsed.
Google Images results.
ImageResult Result item schema
ranknumberrequired
1-based place of the item within its own module (the 3rd organic result has rank 3).
positionnumber (integer)On every item and module of Google web search except the plain-text lists related_searches and people_also_search_for; elsewhere when available.
Where the item's module sits on the results page: its block number from the top (1 = first). Each organic result is one block and every other module one block, so all items of a module share its number. Use rank for the order within a module. On products that show a single list, position equals rank.
titlestringWhen image title or alt text is parsed.
Result title.
linkstringrequired
Primary link returned by the parser.
urlstringPresent for normalized result links.
Canonical target URL, usually the same value as link.
source_urlstringOnly when Google redirect/source URL is observed.
Original Google URL kept for debugging and provenance.
display_urlstringWhen Google display text or a domain can be derived.
Display URL or source domain.
image_urlstringrequired
Full image URL.
thumbnail_urlstringWhen Google exposes a thumbnail.
Thumbnail URL.
thumbnailstringAlias for thumbnail_url when available.
Normalized thumbnail alias.
sourcestringWhen source text is parsed.
Image source label.
domainstringWhen source page domain can be derived.
Source page domain.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry