Google Shopping Results API

/ Home / Google Search API / Shopping Results

To scrape Google shopping results with SerpApi, create a search with tbm parameter set to shop. (I.e., tbm=shop) The Google Shopping Results API allows a user to scrape the results of a Google Shopping search. The user must utilize the tbm parameter and set the corresponding value to shop (e.g.: tbm=shop). A user may utilize the standard parameters available. Searches for results outside the U.S. should refrain from utilizing the location parameter and only utilize our Localization parameters when seeking country-specific results: google_domain, gl, hl, and lr.

Google shopping supports list and grid layouts. To force a specific layout, tbs parameter can be used. To force list layout, set tbs=vw:l. To force grid layout, set tbs=vw:g.

SerpApi Shopping Results JSON

{
  ...
  "filters": [
    {
      "type": "String - Block title",
      "options": [
        {
          "text": "String - Filter name",
          "tbs": "String - tbs value"
        },
        ...
      ]
    },
    ...
  ],
  "shopping_results": [
    {
      "position": "Integer - Item position",
      "title": "String - Item title",
      "link": "String - Link to the Google item page",
      "product_id": "String - Unique Google product identifier",
      "serpapi_product_api": "String - SerpApi URL to fetch more information about this specific product",
      "price": "String - Item price",
      "extracted_price": "Float - Item price as a float"
      "rating": "Float - Item rating",
      "reviews": "String - Item review count",
      "snippet": "String - Item description",
      "extensions": "String - Item tags/extensions",
      "thumbnail": "Image - Base64 data or URL"
    },
  ...
}

Shopping Results for "TV"

Shopping Results for "TV"

JSON Example

{
  ...
  "shopping_results": [
    {
      "position": 1,
      "title": "LG CX Series OLED65CXPUA - 65" OLED Smart TV - 4K UltraHD",
      "link": "https://www.google.com/shopping/product/2137849703372219393?ie=UTF-8&uule=w+CAIQICInRGFsbGFzLUZ0LiBXb3J0aCxUWCxUZXhhcyxVbml0ZWQgU3RhdGVz&oq=tv&hl=en&q=tv&gl=us&prds=eto:12286545446661993535_0&sa=X&ved=0ahUKEwiqrsn87_rsAhVileAKHQ41A5QQ8wIItwY",
      "product_id": "2137849703372219393",
      "serpapi_product_api": "https://serpapi.com/search.json?device=desktop&engine=google_product&gl=us&google_domain=google.com&hl=en&location=dallas&product_id=2137849703372219393",
      "source": "Best Buy",
      "price": "$1,899.99",
      "extracted_price": 1899.99,
      "rating": 4.8,
      "reviews": 2464,
      "snippet": "Bring home the world's #1 selling OLED TV. Only OLED pixels emit their own light, allowing for perfect black, intense color ...",
      "extensions": [
        "January 2020",
        "LG",
        "65″",
        "Smart TV",
        "OLED",
        "4K",
        "57.1 in wide",
        "1.8 in deep",
        "Flat",
        "HDR"
      ],
      "thumbnail": "data:image/webp;base64,UklGRlQwAABXRUJQVlA4IEgAzAADQ..."
    },
    {
      "position": 2,
      "title": "LG CX Series OLED48CXPUB - 48" OLED Smart TV - 4K UltraHD",
      "link": "https://www.google.com/shopping/product/13327562245893406619?ie=UTF-8&uule=w+CAIQICInRGFsbGFzLUZ0LiBXb3J0aCxUWCxUZXhhcyxVbml0ZWQgU3RhdGVz&oq=tv&hl=en&q=tv&gl=us&prds=eto:772993368744162845_0&sa=X&ved=0ahUKEwiqrsn87_rsAhVileAKHQ41A5QQ8wII0QY",
      "product_id": "13327562245893406619",
      "serpapi_product_api": "https://serpapi.com/search.json?device=desktop&engine=google_product&gl=us&google_domain=google.com&hl=en&location=dallas&product_id=13327562245893406619",
      "source": "Best Buy",
      "price": "$1,499.99",
      "extracted_price": 1499.99,
      "rating": 4.8,
      "reviews": 2464,
      "snippet": "Once you've seen LG OLED TV with your own eyes, you'll understand. It's stunning picture that redefines quality. Millions of ...",
      "extensions": [
        "January 2020",
        "LG",
        "48″",
        "Smart TV",
        "OLED",
        "4K",
        "42.1 in wide",
        "1.8 in deep",
        "32.8 lb",
        "Flat"
      ],
      "thumbnail": "data:image/webp;base64,UklGRlwzAABXRUJQVlA4IFAzAADQh..."
    },
    {
      "position": 3,
      "title": "LG CX Series OLED48CXPUB - 48" OLED Smart TV - 4K UltraHD",
      "link": "https://www.google.com/shopping/product/4295864931837274271?ie=UTF-8&uule=w+CAIQICInRGFsbGFzLUZ0LiBXb3J0aCxUWCxUZXhhcyxVbml0ZWQgU3RhdGVz&oq=tv&hl=en&q=tv&gl=us&prds=eto:3509031369685920288_0&sa=X&ved=0ahUKEwiqrsn87_rsAhVileAKHQ41A5QQ8wII6QY",
      "product_id": "4295864931837274271",
      "serpapi_product_api": "https://serpapi.com/search.json?device=desktop&engine=google_product&gl=us&google_domain=google.com&hl=en&location=dallas&product_id=4295864931837274271",
      "source": "Walmart",
      "price": "$1,496.99",
      "extracted_price": 1496.99,
      "rating": 4.8,
      "reviews": 2464,
      "snippet": "Once you've seen LG OLED TV with your own eyes, you'll understand. It's stunning picture that redefines quality. Millions of ...",
      "extensions": [
        "January 2020",
        "LG",
        "48″",
        "Smart TV",
        "OLED",
        "4K",
        "42.1 in wide",
        "Flat",
        "HDR",
        "High Definition"
      ],
      "thumbnail": "data:image/webp;base64,UklGRjIxAABXRUJQVlA4IO2v4NjBSm..."
    },
    ...
  ...
}

Shopping Results filters with tbs values

To apply filters for the Google Shopping search, you would need to update the tbs parameter with the appropriate value. SerpApi is able to extract and make sense of this type of data.
e.g. To select "Buy on Google" option, you need to pass vw:l,mr:1,cat:404,root_cat:529656,buy:g,ss:67,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D value to tbs parameter.
e.g. To select multiple filter options, tbs parameter has to be constructed in the next sequence: value + : + value.

Shopping Results filters with tbs values

JSON Example

{
  ...
  "filters": [
    {
      "type": "Show only",
      "options": [
        {
          "text": "Buy on Google",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,buy:g,ss:67,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "New items",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,new:1,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        }
      ]
    },
    {
      "type": "Price",
      "options": [
        {
          "text": "Up to $400",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,price:1,ppr_max:400,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "$400 – $900",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,price:1,ppr_min:400,ppr_max:900,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "$900 – $1,500",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,price:1,ppr_min:900,ppr_max:1500,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "Over $1,500",
          "tbs": "vw:l,mr:1,cat:404,root_cat:529656,price:1,ppr_min:1500,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        }
      ]
    },
    {
      "type": "Category",
      "options": [
        {
          "text": "TVs",
          "tbs": "vw:l,mr:1,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        }
      ]
    },
    {
      "type": "Brand",
      "options": [
        {
          "text": "Samsung",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C709001,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "LG",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C708995,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "TCL",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C761941,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "VIZIO",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C709009,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "Sony",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C709004,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "Hisense",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C1000526,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        },
        {
          "text": "RCA",
          "tbs": "vw:l,mr:1,root_cat:529656,cat:404,pdtr0:708987%7C709000,init_ar:SgVKAwiUA0oHsgQECPipIA%3D%3D"
        }
      ]
    },
    ...
  ],
  ...
}