Google Images API via SerpApi

To get Google Images results from SerpApi, create a search with:

required tbm parameter must be set to isch. (I.e., tbm=isch)

optional ijn parameter defines the page number to get. It must be an integer greater than or equal to 0.

The images are fetched by batch of 100 images per searches. In order to retrieve the first 300 images, 3 searches would be needed.

As an example, to get the first 300 images for the search "Apple":
  1. https://serpapi.com/search.json?q=Apple&tbm=isch&ijn=0
  2. https://serpapi.com/search.json?q=Apple&tbm=isch&ijn=1
  3. https://serpapi.com/search.json?q=Apple&tbm=isch&ijn=2

SerpApi JSON structure:

{
  ...
   "images_results": [
    {
      "position": Integer,
      "thumbnail": String - Google Thumbnail URL (cache)
      "original": String - Original Image URL (full resolution)
      "title": String - Short Image Description
      "source": String - Original Domain Name 
    },
    ...
  ]
  ...
}

Example: images results for "apple"

Trump News

JSON response

{
  ...
  "images_results": [
    {
      "position": 1,
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSYfgh6R22EUz-8EUwh-e68sSEFOHWXeZHuysRW_DPkhahMgdwJ",
      "original": "https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png?201606271147",
      "title": "Buy AirPods - Apple",
      "source": "apple.com"
    },
    {
      "position": 2,
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSMzLN9iUjPiaNdA8w7NtzSTuJI0UPbDFOQKh3IXF6buUYmkaNr",
      "original": "https://as-images.apple.com/is/image/AppleInc/aos/published/images/o/g/og/default/og-default?wid=1200&hei=630&fmt=jpeg&qlt=95&op_usm=0.5,0.5&.v=1525370171638",
      "title": "Buy Mac Accessories - Apple",
      "source": "apple.com"
    },
    {
      "position": 3,
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrdINKE0Mf9NtmvZqt8GWSwDXjvtFGrRyy1SsO9l-zFyFLoMWg",
      "original": "https://www.apple.com/ac/structured-data/images/open_graph_logo.png?201809210816",
      "title": "Apple",
      "source": "apple.com"
    },
  ...
}

Advanced Filter Search

Google Images provides a way to filter by size, image type, and more. This information is encoded in the tbs parameter. E.g., tbs=itp:photos,isz:l selects only large photos.

SerpApi search examples:

To build your own tbs parameter, you can use the regular Google Images and copy the value of the field tbs from the url:

Tbs Image Filter Example

  1. Enable Tools dropdown on the right
  2. Select the image filters you want to use
Your browser URL should contains somthing like: ...&tbs=itp:photos,isz:l.... You can use this value directly on SerpApi.