Google Images Api Example

API Base URL

https://google-images4.p.rapidapi.com

x-rapidapi-host: google-images4.p.rapidapi.com

x-rapidapi-key: YOUR_API_KEY

Google Images API Documentation Overview

The Google Images Search API enables developers to search images programmatically and retrieve JSON results in real time. Use a Google Images API key to access URLs, thumbnails, and metadata for apps or research. This free image search API offers a Google image search API free trial with no credit card required. Our documentation provides a Google images api example, including a Google images api example python script and a Google images api example github repository. Learn to authenticate, send requests, and parse responses to integrate Google image search API functionality into your product quickly.

Google Image Search Overview

1. Get Google Images

Retrieve currently trending search topics within a specified country and time period.

GET/getGoogleImages

Parameters

ParameterTypeRequiredDescription
querystringYesSearch keyword (e.g., Trump)
countintNoNumber of results (Default: 100)

Request Example

bash
curl --request GET \
--url 'https://google-images4.p.rapidapi.com/getGoogleImages?count=2&query=Trump' \
--header 'x-rapidapi-host: google-images4.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_API_KEY'

Response Example

json
{
  "status": "success",
  "query": "trump",
  "results": 2,
  "images": [
    {
      "url": "https://upload.wikimedia.org/...portrait.jpg",
      "width": 960,
      "height": 1200,
      "type": "jpg"
    }
  ]
}

2. Get Google Images with ImageInfo

Retrieve currently trending search topics within a specified country and time period.

GET/getGoogleImages

Parameters

ParameterTypeRequiredDescription
querystringYesSearch keyword (e.g., Trump)
countintNoNumber of results (Default: 100)
imageInfoboolNoGet Image Info, Default: false

Request Example

bash
curl --request GET \
--url 'https://google-images4.p.rapidapi.com/getGoogleImages?count=2&query=Trump&imageInfo=true' \
--header 'x-rapidapi-host: google-images4.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_API_KEY'

Response Example

json
{
  "status": "success",
  "query": "trump",
  "results": 2,
  "images": [
    {
      "url": "https://ichef.bbci.co.uk/ace/standard/1920/cpsprodpb/7910/live/42baebe0-1768-11f1-9120-a910fc22c6ac.png",
      "width": 1920,
      "height": 1080,
      "type": "png",
      "mime": "image/png"
    },
    {
      "url": "https://ichef.bbci.co.uk/ace/standard/1920/cpsprodpb/7910/live/42baebe0-1768-11f1-9120-a910fc22c6ac.png",
      "width": 1920,
      "height": 1080,
      "type": "png",
      "mime": "image/png"
    }
  ]
}

Error Handling & Limits

The API uses standard HTTP status codes. Exceeding the allowed rate limit will result in a429 Too Many Requests response.

  • 200Success
  • 400Invalid Parameters
  • 429Rate Limit Exceeded