Google Images Related Content API

Our Google Images Related Content API allows you to scrape results from the Google Images page. The API is accessed through the following endpoint: /search?engine=google_images_related_content.

A user may query the following: https://serpapi.com/search?engine=google_images_related_content utilizing a GET request. Head to the playground for a live and interactive demo.

API Parameters

Search Query

Advanced Filters

q

Optional

Parameter defines the search query. To get the most precise results it is recommended to use the same query you used in the original Google Images search.

Localization

hl

Optional

Parameter defines the language to use for the Google Images search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French) Head to the Google languages for a full list of supported Google languages.

gl

Optional

Parameter defines the country to use for the Google Images search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France). Head to the Google countries page for a full list of supported Google countries.

Serpapi Parameters

engine

Required

Set parameter to google_images_related_content to use the Google Images Related Content API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Images Related Content results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for Related Content and Related Searches.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

This API does not have the HTML response, just a text. search_metadata.prettify_html_file contains prettified version of the result. It is displayed in the playground.
HTML output is useful to debug JSON results or support features not supported yet by SerpApi. HTML output gives you the raw HTML results from Google.

API Examples

JSON structure overview

{
  ...
  "related_content": [
    {
      "position": "Integer - Image index",
      "title": "String - Short Image Description",
      "source": "String - Original Domain Name",
      "source_icon": "String - Icon URL of the source website containing the image",
      "link": "String - Link to the page providing the image",
      "original": "String - Original Image URL (full resolution)",
      "original_width": "Integer - Original Image width",
      "original_height": "Integer - Original Image height",
      "thumbnail": "String - URL to the image thumbnail",
      "thumbnail_width": "Integer - Thumbnail Image width",
      "thumbnail_height": "Integer - Thumbnail Image height",
      "is_product": "Boolean - Is the link to the page providing the image containing a product",
      "rating": "Float - Rating of the item in the image",
      "reviews": "Integer - Number of reviews of the item in the image",
      "description": "String - Description of the item in the image",
      "in_stock": "Boolean - Is product in stock",
      "related_content_id": "String - Unique ID for retrieving the Related Content of an image",
      "serpapi_related_content_link": "String - Link to SerpApi to fetch the Related Content of an image",
    },
    ...
  ],
  "related_searches": [
    {
      "position": "Integer - Query index",
      "query": "String - Related searches query",
      "link": "String - Google Images search link original",
      "serpapi_link": "String - Link to SerpApi to fetch the related images searches",
      "thumbnail": "String - URL to the image thumbnail"
    },
    ...
  ],
  "see_more_link": "String - Link to the Google Images search",
  "serpapi_see_more_link": "String - SerpApi link to the Google Images search"
}

Results for: image of an iPhone

These results appear when you click an image on Google Images website. They contain related content of that image.

Results for: image of an iPhone

JSON Example

{
  "search_metadata": {
    "id": "644bab2dde98340723972102",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/160fdeb6c59e73b7/644bab2dde98340723972102.json",
    "created_at": "2023-04-28 11:17:01 UTC",
    "processed_at": "2023-04-28 11:17:02 UTC",
    "google_images_related_content_url": "https://www.google.com/_/VisualFrontendUi/data/batchexecute?hl=en&gl=us",
    "raw_html_file": "https://serpapi.com/searches/160fdeb6c59e73b7/644bab2dde98340723972102.html",
    "prettify_html_file": "https://serpapi.com/searches/160fdeb6c59e73b7/644bab2dde98340723972102.prettify",
    "total_time_taken": 1.75
  },
  "search_parameters": {
    "engine": "google_images_related_content",
    "hl": "en",
    "gl": "us",
    "q": "iphone",
    "related_content_id": "aTRyME11VEdtXzBCZ01cIixcImxhZk91bWZ2ZkQxQnpN"
  },
  "related_content": [
    {
      "position": 1,
      "title": "Newest Apple iPhone 13 mini review – Yodoit",
      "source": "Yodoit",
      "source_icon": "<URL to image>",
      "link": "https://www.yodoit.com/es/blogs/news/new-apple-iphone-13-mini-review",
      "original": "<URL to image>",
      "original_width": 869,
      "original_height": 645,
      "thumbnail": "<URL to image>",
      "thumbnail_width": 261,
      "thumbnail_height": 193,
      "related_content_id": "Wld5bWhqN053VG85SE1cIixcIjQ4Wjl4akpyZXdiV2JN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=Wld5bWhqN053VG85SE1cIixcIjQ4Wjl4akpyZXdiV2JN&engine=google_images_related_content&gl=us&hl=en&q=iphone"
    },
    {
      "position": 2,
      "title": "Apple iPhone 13 Mini (512 GB) - Green : Amazon.in: Electronics",
      "source": "Amazon.in",
      "source_icon": "<URL to image>",
      "link": "https://www.amazon.in/Apple-iPhone-13-Mini-512/dp/B09V44HD84",
      "original": "<URL to image>",
      "original_width": 522,
      "original_height": 522,
      "thumbnail": "<URL to image>",
      "thumbnail_width": 225,
      "thumbnail_height": 225,
      "is_product": true,
      "rating": 4.5,
      "reviews": 1696,
      "description": "iPhone 13 mini. The most advanced dual-camera system ever on iPhone.  Lightning-fast A15 Bionic chip. A leap in battery life. Durable design. And  a ...",
      "in_stock": true,
      "related_content_id": "NGpTWUZpeTdsbXpCOU1cIixcIlZvNEdZNkJXamMxOGRN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=NGpTWUZpeTdsbXpCOU1cIixcIlZvNEdZNkJXamMxOGRN&engine=google_images_related_content&gl=us&hl=en&q=iphone"
    },
    {
      "position": 3,
      "title": "Apple iPhone 13 512GB Północ (Midnight) | | cena, raty - sklep  Komputronik.pl",
      "source": "Komputronik",
      "source_icon": "<URL to image>",
      "link": "https://www.komputronik.pl/product/734178/apple-iphone-13-512gb-polnoc-midnight-.html",
      "original": "<URL to image>",
      "original_width": 1107,
      "original_height": 1500,
      "thumbnail": "<URL to image>",
      "thumbnail_width": 193,
      "thumbnail_height": 261,
      "related_content_id": "Unc3cWF3V2hxbmNEc01cIixcIlhHTDV1TzVnMjVPUktN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=Unc3cWF3V2hxbmNEc01cIixcIlhHTDV1TzVnMjVPUktN&engine=google_images_related_content&gl=us&hl=en&q=iphone"
    },
    ...
  ],
  "related_searches": [
    {
      "position": 1,
      "query": "iphone 13",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=iphone+13",
      "link": "https://www.google.com/search?q=iphone+13&tbm=isch&hl=en&gl=us",
      "thumbnail": "<URL to image>"
    },
    {
      "position": 2,
      "query": "iphone 13 mini size",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=iphone+13+mini+size",
      "link": "https://www.google.com/search?q=iphone+13+mini+size&tbm=isch&hl=en&gl=us",
      "thumbnail": "<URL to image>"
    },
    {
      "position": 3,
      "query": "iphone 14",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=iphone+14",
      "link": "https://www.google.com/search?q=iphone+14&tbm=isch&hl=en&gl=us",
      "thumbnail": "<URL to image>"
    },
    ...
  ],
  "see_more_link": "https://www.google.com/search?q=iphone&tbm=isch&hl=en&gl=us&tbs=rimg:CYuK9DLkxpv9YZWnzrpn73w9sgIOCgIIABAAKAE6BAgBEAHAAgA",
  "serpapi_see_more_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=iphone&tbs=rimg%3ACYuK9DLkxpv9YZWnzrpn73w9sgIOCgIIABAAKAE6BAgBEAHAAgA"
}