Skip to content

Google Images API

Reverse-image-friendly visual search - query Google Images and receive structured image results.

Endpoint

POST https://serpforai.dev/api/v1/search
GET  https://serpforai.dev/api/v1/search

Authentication is a bearer header carrying your API key:

Authorization: Bearer <userKey>

Set t: "google_images". This is one of five Google vertical engines available on this API - see also Google Shopping, Google Videos, Google Short Videos and Google News. For general web search use the SERP API.

Request parameters

POST requests send JSON; GET requests send the same fields as query parameters.

FieldTypeRequiredDefaultDescription
sstringyes-The search keyword
tstringyes-Must be google_images
dnumberno5000Maximum time the API may spend, in milliseconds
countrystringno-ISO 3166-1 alpha-2 country code (e.g. us)
htmlnumberno01 includes the raw result-page HTML alongside data, 0 omits it

There is no p (page) parameter for this engine.

Response

{
  "code": 0,
  "msg": "",
  "data": {
    "id": "q_...",
    "images_results": [
      {
        "position": 1,
        "title": "...",
        "link": "https://...",
        "thumbnail": "https://...",
        "source": "...",
        "original": "https://...",
        "original_width": 1200,
        "original_height": 800,
        "is_product": false
      }
    ],
    "suggestedSearches": [
      { "name": "...", "link": "https://...", "q": "..." }
    ]
  }
}
FieldDescription
code0 means success; anything else is a failure
msgHuman readable failure reason, empty on success
data.idOpaque search-session id
data.images_results[]Image rows - position, title, link, thumbnail, source, original, original_width, original_height, is_product
data.suggestedSearches[]Related search suggestions - { name, link, q }

Unlike bing/google, data here is an object, not a bare array - read data.images_results, not data directly.

Example

curl -X POST https://serpforai.dev/api/v1/search \
  -H "Authorization: Bearer $SERPFORAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"s":"vintage camera","t":"google_images","country":"us"}'
import httpx

response = httpx.post(
    "https://serpforai.dev/api/v1/search",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"s": "vintage camera", "t": "google_images", "country": "us"},
    timeout=30,
)
payload = response.json()
for row in payload["data"]["images_results"]:
    print(row["title"], row["original"])