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
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.
Localization
google_domain
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.
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
(default).
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
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 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)",
"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"
},
...
]
}
Results for: Coffee

{
"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",
"menu_items": [
{
"position": 1,
"title": "All",
"link": "https://www.google.com/search?q=Coffee&source=lmns&gl=us&hl=en&sa=X&ved=2ahUKEwjY--3X6JL-AhUjFFkFHdmqACYQ0pQJKAB6BAgBEAI"
},
{
"position": 2,
"title": "Images"
},
{
"position": 3,
"title": "Maps",
"link": "https://maps.google.com/maps?ucbcb=1&uule=w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM&q=McDonald%27s&um=1&ie=UTF-8&sa=X&ved=2ahUKEwjP47z1tsz9AhWgkIkEHbt9CdwQ_AUoAXoECAIQAw"
},
...
]
},
"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>"
},
...
]
}