Google Images API Documentation

API Base URL

https://api.cognifyapi.com

Authentication header: x-cognifyapi-key

API key: YOUR_COGNIFY_API_KEY

Overview

Search Google Images and retrieve image URLs, dimensions, and format metadata.

All requests use HTTPS and require the x-cognifyapi-key header. Replace the placeholder with your key from the CognifyAPI Studio. For interactive examples, visit the interactive Google Images API page.

1. Google Images Search

Search Google Images and optionally include image metadata.

GET/google-images?query=electric%20cars&count=10&imageInfo=true

Query parameters

ParameterExample value
queryelectric cars
count10
imageInfotrue

Request example

bash
curl --request GET \
  --url 'https://api.cognifyapi.com/google-images?query=electric%20cars&count=10&imageInfo=true' \
  --header 'x-cognifyapi-key: YOUR_COGNIFY_API_KEY'

Response Example

json
{
  "status": "success",
  "query": "electric cars",
  "results": 1,
  "images": [
    {
      "url": "https://images.squarespace-cdn.com/content/v1/6151d38ea56f9d31cf76ec07/5c36bef0-361b-43f4-8bb0-c0cdb49d98e4/688005_20250225_Polestar_4_Long_range_Single_motor_in_Electron.jpg",
      "width": 2500,
      "height": 1667,
      "type": "jpg",
      "mime": "image/jpeg"
    }
  ]
}

Authentication

Include your API key in every request using the x-cognifyapi-key request header.

Errors and limits

Check the HTTP status and response body when a request fails. Invalid parameters can return a 400 response; exceeding your plan's rate limit can return 429. Review your plan and usage in CognifyAPI Studio.