Google Images API

Our Google Images API allows you to scrape results from the Google Images page. The API is accessed through the following endpoint: /search?engine=google_images. A user may query the following: https://serpapi.com/search?engine=google_images utilizing a GET request. Head to the playground for a live and interactive demo.

If you are interested in the reverse image search - head to our Reverse Image API.

API Parameters

Search Query

q

Required

Parameter defines the query you want to search. You can use anything that you would use in a regular Google Images search. e.g. inurl:, site:, intitle:.

Geographic Location

location

Optional

Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control. The location and uule parameters can't be used together. It is recommended to specify location at the city level in order to simulate a real user’s search. If location is omitted, the search may take on the location of the proxy.

uule

Optional

Parameter is the Google encoded location you want to use for the search.

uule and location parameters can't be used together.

Localization

google_domain

Optional

Parameter defines the Google domain to use. It defaults to google.com. Head to the Google domains for a full list of supported Google domains.

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 for a full list of supported Google countries.

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.

Advanced Filters

chips

Optional

Parameter enables to filter image search. It's a string provided by Google as suggested search, like: red apple. Chips are provided under the section: suggested_searches when ijn = 0. Both chips value and link to SerpApi is provided for each suggested search.

tbs

Optional

(to be searched) parameter defines advanced search parameters that aren't possible in the regular query field.

safe

Optional

Parameter defines the level of filtering for adult content. It can be set to active or off, by default Google will blur explicit content.

nfpr

Optional

Parameter defines the exclusion of results from an auto-corrected query when the original query is spelled wrong. It can be set to 1 to exclude these results, or 0 to include them (default). Note that this parameter may not prevent Google from returning results for an auto-corrected query if no other results are available.

filter

Optional

Parameter defines if the filters for 'Similar Results' and 'Omitted Results' are on or off. It can be set to 1 (default) to enable these filters, or 0 to disable these filters.

Pagination

ijn

Optional

Parameter defines the page number for Google Images. There are 100 images per page. This parameter is equivalent to start (offset) = ijn * 100.

Serpapi Parameters

engine

Required

Set parameter to google_images to use the Google Images API engine.

device

Optional

Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Images 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 Suggested Searches, Images Results, Shopping Results 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

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

{
  ...
  "shopping_results": [
    {
      "position": "Integer - Item position",
      "title": "String - Item title",
      "price": "String - Item price",
      "extracted_price": "Float - Item price as a float",
      "link": "String - Link to the Google item page",
      "source": "String - Product source name",
      "thumbnail": "String - Base64 data or URL"
    },
    ...
  ],
  "images_results": [
    {
      "position": "Integer - Image index",
      "thumbnail": "String - Google Thumbnail URL (cache)",
      "license_details_url": "String - License details URL",
      "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",
      "original": "String - Original Image URL (full resolution)",
      "original_width": "Integer - Original Image width",
      "original_height": "Integer - Original Image height",
      "title": "String - Short Image Description",
      "tag": "String - Optional tag of the image",
      "link": "String - Link to the page providing the image",
      "source": "String - Original Domain Name",
      "is_product": "Boolean - Is the link to the page providing the image containing a product",
      "in_stock": "Boolean - Is product in stock"
    },
    ...
  ],
  "suggested_searches": [
    {
      "name": "String - Suggested searches name",
      "link": "String - Google search link original",
      "chips": "String - Google chips parameter value",
      "serpapi_link": "String - Link to SerpApi to fetch the suggested searches",
      "thumbnail": "String - URL or base64 encoded image thumbnail displayed by Google"
    },
    ...
  ],
  "related_searches": [
    {
      "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 or base64 encoded image thumbnail displayed by Google"
    },
    ...
  ],
  "serpapi_pagination": {
    "current": "Integer - Index of the current page",
    "next": "String - SerpApi link for paginating to the next page of results",
    "previous": "String - SerpApi link for paginating to the previous page of results"
  },
}

Results for: Coffee

Results for: Coffee

JSON Example

{
  "search_metadata": {
    "id": "642d73b7de9834017010c43c",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/7a8e9eb0cab36efa/642d73b7de9834017010c43c.json",
    "created_at": "2023-04-05 13:12:23 UTC",
    "processed_at": "2023-04-05 13:12:23 UTC",
    "google_images_url": "https://www.google.com/search?q=Coffee&oq=Coffee&uule=w+CAIQICIdQXVzdGluLFRYLFRleGFzLFVuaXRlZCBTdGF0ZXM&hl=en&gl=us&tbm=isch",
    "raw_html_file": "https://serpapi.com/searches/7a8e9eb0cab36efa/642d73b7de9834017010c43c.html",
    "total_time_taken": 1.9
  },
  "search_parameters": {
    "engine": "google_images",
    "q": "Coffee",
    "location_requested": "Austin, TX, Texas, United States",
    "location_used": "Austin,TX,Texas,United States",
    "google_domain": "google.com",
    "hl": "en",
    "gl": "us",
    "device": "desktop"
  },
  "search_information": {
    "image_results_state": "Results for exact spelling"
  },
  "suggested_searches": [
    {
      "name": "cup",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:cup:Zha3cvLlu_4%3D&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQ4lYoAHoECAEQKQ",
      "chips": "q:coffee,g_1:cup:Zha3cvLlu_4%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Acup%3AZha3cvLlu_4%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=Coffee",
      "thumbnail": "<URL to image>"
    },
    {
      "name": "wallpaper",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:wallpaper:SNsa4kO1QeY%3D&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQ4lYoAXoECAEQKw",
      "chips": "q:coffee,g_1:wallpaper:SNsa4kO1QeY%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Awallpaper%3ASNsa4kO1QeY%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=Coffee",
      "thumbnail": "<URL to image>"
    },
    {
      "name": "cafe",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:cafe:Z3V9iDLlllY%3D&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQ4lYoAnoECAEQLQ",
      "chips": "q:coffee,g_1:cafe:Z3V9iDLlllY%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Acafe%3AZ3V9iDLlllY%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=Coffee",
      "thumbnail": "<URL to image>"
    },
    ...
  ],
  "images_results": [
    {
      "position": 1,
      "thumbnail": "<URL to image>",
      "related_content_id": "Y0hoQW1Kcnc4RXRiV01cIixcIlU2b0pNbkYtZWVWVEFN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=Y0hoQW1Kcnc4RXRiV01cIixcIlU2b0pNbkYtZWVWVEFN&engine=google_images_related_content&gl=us&hl=en&q=Coffee",
      "source": "Wikipedia",
      "title": "Coffee - Wikipedia",
      "link": "https://en.wikipedia.org/wiki/Coffee",
      "original": "https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg",
      "original_width": 3200,
      "original_height": 2000,
      "is_product": false
    },
    {
      "position": 2,
      "thumbnail": "<URL to image>",
      "related_content_id": "OU0xWDJFRHhzWU5UWk1cIixcIk8wcDJtOEhfdDdFNm5N",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=OU0xWDJFRHhzWU5UWk1cIixcIk8wcDJtOEhfdDdFNm5N&engine=google_images_related_content&gl=us&hl=en&q=Coffee",
      "source": "Tasting Table",
      "title": "31 Coffee Brands, Ranked From Worst To Best",
      "link": "https://www.tastingtable.com/718678/coffee-brands-ranked-from-worst-to-best/",
      "original": "https://www.tastingtable.com/img/gallery/coffee-brands-ranked-from-worst-to-best/l-intro-1645231221.jpg",
      "original_width": 1600,
      "original_height": 900,
      "is_product": false
    },
    {
      "position": 3,
      "thumbnail": "<URL to image>",
      "related_content_id": "OXB5UmV6N0EwMXlMZU1cIixcIkN2M1hDN0lVanNiZ0pN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?related_content_id=OXB5UmV6N0EwMXlMZU1cIixcIkN2M1hDN0lVanNiZ0pN&engine=google_images_related_content&gl=us&hl=en&q=Coffee",
      "source": "CNN",
      "title": "Is coffee healthy? | CNN",
      "link": "https://www.cnn.com/2017/09/29/health/coffee-healthy-food-drayer/index.html",
      "original": "https://media.cnn.com/api/v1/images/stellar/prod/150929101049-black-coffee-stock.jpg?q=x_3,y_1231,h_1684,w_2993,c_crop/h_720,w_1280",
      "original_width": 1280,
      "original_height": 720,
      "is_product": false
    },
    ...
  ],
  "related_searches": [
    {
      "link": "https://www.google.com/search?q=cup+coffee&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQrNwCKAB6BQgBEJ0C",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=cup+coffee",
      "query": "cup coffee",
      "highlighted_words": [
        "cup"
      ],
      "thumbnail": "<URL to image>"
    },
    {
      "link": "https://www.google.com/search?q=wallpaper+coffee&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQrNwCKAB6BQgBEJ8C",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=wallpaper+coffee",
      "query": "wallpaper coffee",
      "highlighted_words": [
        "wallpaper"
      ],
      "thumbnail": "<URL to image>"
    },
    {
      "link": "https://www.google.com/search?q=cafe+coffee&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQrNwCKAB6BQgBEKEC",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&location=Austin%2C+TX%2C+Texas%2C+United+States&q=cafe+coffee",
      "query": "cafe coffee",
      "highlighted_words": [
        "cafe"
      ],
      "thumbnail": "<URL to image>"
    },
    ...
  ],
  "serpapi_pagination":
  {
    "current": 0,
    "next": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&ijn=1&q=Coffee"
  }
}

Results for: Coffee with tbs = il:cl (Creative Commons licenses)

Available license options:
- il:cl (Creative Commons licenses)
- il:ol (Commercial & other licenses)

Results for: Coffee with tbs = il:cl (Creative Commons licenses)

JSON Example

{
  "search_metadata": {
    "id": "6514965731dcccae74622850",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/d2c5115e33603d69/6514965731dcccae74622850.json",
    "created_at": "2023-09-27 20:53:43 UTC",
    "processed_at": "2023-09-27 20:53:44 UTC",
    "google_images_url": "https://www.google.com/search?q=Coffee&oq=Coffee&hl=en&gl=us&tbm=isch&tbs=il:cl",
    "raw_html_file": "https://serpapi.com/searches/d2c5115e33603d69/6514965731dcccae74622850.html",
    "total_time_taken": 2.36
  },
  "search_parameters": {
    "engine": "google_images",
    "q": "Coffee",
    "google_domain": "google.com",
    "hl": "en",
    "gl": "us",
    "device": "desktop",
    "tbs": "il:cl"
  },
  "search_information": {
    "image_results_state": "Results for exact spelling"
  },
  "suggested_searches": [
    {
      "name": "cup",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:cup:IMvs4y4LC4c%3D&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQ4lYoAHoECAEQMw",
      "chips": "q:coffee,g_1:cup:IMvs4y4LC4c%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Acup%3AIMvs4y4LC4c%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=Coffee&tbs=il%3Acl",
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/9df12b771985dc2bd31ef9483a0caed0666c49108c1659415eb79e20e0613c1c.png"
    },
    {
      "name": "wallpaper",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:wallpaper:ZxXEaBIJwWU%3D&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQ4lYoAXoECAEQNQ",
      "chips": "q:coffee,g_1:wallpaper:ZxXEaBIJwWU%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Awallpaper%3AZxXEaBIJwWU%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=Coffee&tbs=il%3Acl",
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/9df12b771985dc2bd31ef9483a0caed06104578962cee23f74d258f5e3c25987.jpeg"
    },
    {
      "name": "cafe",
      "link": "https://www.google.com/search?q=Coffee&tbm=isch&hl=en&gl=us&chips=q:coffee,g_1:cafe:Z3V9iDLlllY%3D&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQ4lYoAnoECAEQNw",
      "chips": "q:coffee,g_1:cafe:Z3V9iDLlllY%3D",
      "serpapi_link": "https://serpapi.com/search.json?chips=q%3Acoffee%2Cg_1%3Acafe%3AZ3V9iDLlllY%253D&device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=Coffee&tbs=il%3Acl",
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/9df12b771985dc2bd31ef9483a0caed01c1995bf441f98ee79f37abb4427a988.jpeg"
    },
    ...
  ],
  "images_results": [
    {
      "position": 1,
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e9171df88270dd2cac5c6017773f36f41e54f6aa6313fe18589b.jpeg",
      "license_details_url": "http://creativecommons.org/licenses/by-nc-nd/3.0/",
      "related_content_id": "aGhXQ0pydURmT1RDVk1cIixcIjJ0MWRnQVNod2tGQXZN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?engine=google_images_related_content&gl=us&hl=en&q=Coffee&related_content_id=aGhXQ0pydURmT1RDVk1cIixcIjJ0MWRnQVNod2tGQXZN",
      "source": "CoffeeGeek",
      "source_logo": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e9171df88270dd2cac5c6cfadf99a83e80c87d123e407365ccb5.png",
      "title": "How to Make an Americano » CoffeeGeek",
      "link": "https://www.coffeegeek.com/guides/americano/",
      "tag": "Licensable",
      "original": "https://www.coffeegeek.com/wp-content/uploads/2019/09/americano-1.jpg",
      "original_width": 2400,
      "original_height": 1600,
      "is_product": false
    },
    {
      "position": 2,
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e9178e97ff06db616132d774233dbcc5cd9aa782e55e545ec9c8.jpeg",
      "license_details_url": "http://creativecommons.org/licenses/by-nc-nd/3.0/",
      "related_content_id": "ajZHWkNWY2NIX2RmUU1cIixcIlcxdG5tRDRaNE1QakdN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?engine=google_images_related_content&gl=us&hl=en&q=Coffee&related_content_id=ajZHWkNWY2NIX2RmUU1cIixcIlcxdG5tRDRaNE1QakdN",
      "source": "www.coffeegeek.com",
      "source_logo": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e9178e97ff06db6161325b358c47eb5245fb3a41c59c8db75369.png",
      "title": "CoffeeGeek » The worlds most read coffee and espresso resource",
      "link": "https://www.coffeegeek.com/",
      "tag": "Licensable",
      "original": "https://www.coffeegeek.com/wp-content/uploads/2019/09/espressoilly-1.jpg",
      "original_width": 1500,
      "original_height": 1041,
      "is_product": false
    },
    {
      "position": 3,
      "thumbnail": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e917873f28f310a251cf5db215622c0f5fa35225e52ab3c65ab4.jpeg",
      "license_details_url": "http://creativecommons.org/publicdomain/zero/1.0/deed.en",
      "related_content_id": "OExfbFFrakFyQUh3UE1cIixcIkFWbWhwbHFGVnQydHBN",
      "serpapi_related_content_link": "https://serpapi.com/search.json?engine=google_images_related_content&gl=us&hl=en&q=Coffee&related_content_id=OExfbFFrakFyQUh3UE1cIixcIkFWbWhwbHFGVnQydHBN",
      "source": "Wikimedia Commons",
      "source_logo": "https://serpapi.com/searches/6514965731dcccae74622850/images/246079d42202e917873f28f310a251cf2c36f25d8915279bb188592f4958049c.png",
      "title": "File:Coffee with milk (563800).jpg - Wikimedia Commons",
      "link": "https://commons.wikimedia.org/wiki/File:Coffee_with_milk_%28563800%29.jpg",
      "tag": "Licensable",
      "original": "https://upload.wikimedia.org/wikipedia/commons/4/41/Coffee_with_milk_%28563800%29.jpg",
      "original_width": 2720,
      "original_height": 4080,
      "is_product": false
    },
    ...
  ],
  "related_searches": [
    {
      "link": "https://www.google.com/search?q=starbucks+coffee&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQrNwCKAB6BQgBELwB",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=starbucks+coffee&tbs=il%3Acl",
      "query": "starbucks coffee",
      "highlighted_words": [
        "starbucks"
      ],
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ9vTkVOmK5C6RLw1Xz6kXkW062F2h5D5nhTt4hrTomzBIfGxvJbsmizPo&usqp=CAU"
    },
    {
      "link": "https://www.google.com/search?q=coffee+cup&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQrNwCKAB6BQgBEL4B",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=coffee+cup&tbs=il%3Acl",
      "query": "coffee cup",
      "highlighted_words": [
        "cup"
      ],
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHoy2YiQsoU1Tlw6Yuk8XxlCk6dxdLSm6LfbrEXzGjgYPeyVetVtZ6cvA&usqp=CAU"
    },
    {
      "link": "https://www.google.com/search?q=iced+coffee&tbm=isch&hl=en&gl=us&sa=X&ved=2ahUKEwjTx_6Z1suBAxVyuIkEHT34DqwQrNwCKAB6BQgBEMAB",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_images&gl=us&google_domain=google.com&hl=en&q=iced+coffee&tbs=il%3Acl",
      "query": "iced coffee",
      "highlighted_words": [
        "iced"
      ],
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcStmDf8Mx7rgn2K27_HLZQ_VhhO-QypBSYNEyIqWRlMp7uEqH9EEdMKAJc&usqp=CAU"
    },
    ...
  ],
  "serpapi_pagination":
  {
    "current": 0,
    "next": "https://serpapi.com/search.json?device=desktop&engine=google&gl=us&google_domain=google.com&hl=en&ijn=1&q=Coffee"
  }
}