Google Product API

/search?engine=google_product API endpoint allows you to fetch the results from Google product pages via our SerpApi service. Head to the playground for a live and interactive demo. You can query https://serpapi.com/search?engine=google_product&product_id={product_id} using a GET request.

API Parameters

Search Query

product_id

Required

Parameter defines the product to get results for. Normally found from shopping results for supported products (e.g., https://www.google.com/shopping/product/{product_id}).

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. location and uule parameters can't be used together.

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

gl

Optional

Parameter defines the country to use for the Google 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.

hl

Optional

Parameter defines the language to use for the Google Product 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 page for a full list of supported Google languages.

Pagination

start

Optional

Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.) This parameter works only for Google Online Sellers and Reviews.

page

Optional

Parameter defines the page number for Google Online Sellers and Reviews. There are 10 results per page. This parameter is equivalent to start (offset) = page * 10. This parameter works only for Google Online Sellers and Reviews.

Search Type

offers

Optional

Parameter for fetching offers results. Replaces former sellers=online results. It can be set to 1 or true

specs

Optional

Parameter for fetching specs results. It can be set to 1 or true

reviews

Optional

Parameter for fetching reviews results. It can be set to 1 or true.

Advanced Filters

filter

Optional

Parameter defines filters and sorting for reviews and offers results.

Offers filters:
freeship:1 Show only products with free shipping
ucond:1 Show only used products
scoring:p Sort by base price
scoring:tp Sort by total price
scoring:cpd Sort by current promotion deals (special offers)
scoring:mrd Sort by sellers rating

Reviews filters:
rsort:0 Sort by relevance
rsort:1 Sort by date
pub:{source} {source} is where the review originated, e.g. Best Buy
rnum:{number} Number of results (100 is max). rnum takes the precedence over the start and page parameters
rpt:{number} Encoded pagination offset (check serpapi_pagination.next for the value)

Serpapi Parameters

engine

Required

Set parameter to google_product to use the Google Product 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 (currently using iPhones).

no_cache

Optional

Parameter will force SerpApi to fetch the Google Product 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 product page, reviews results, specs results, and online sellers.

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

Example with product_id: 4172129135583325756

Example with product_id: 4172129135583325756

JSON Example

{
  "search_metadata": {
    "id": "5fa3ae1d59603d0d50c2d9e9",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/4d7bfc62909c1a7c/5fa3ae1d59603d0d50c2d9e9.json",
    "created_at": "2020-11-05 07:47:41 UTC",
    "processed_at": "2020-11-05 07:47:41 UTC",
    "google_product_url": "https://www.google.com/shopping/product/4172129135583325756?sourceid=chrome&ie=UTF-8",
    "raw_html_file": "https://serpapi.com/searches/4d7bfc62909c1a7c/5fa3ae1d59603d0d50c2d9e9.html",
    "total_time_taken": 5.45
  },
  "search_parameters": {
    "engine": "google_product",
    "product_id": "4172129135583325756",
    "google_domain": "google.com",
    "device": "desktop"
  },
  "product_results": {
    "product_id": 4172129135583325756,
    "title": "Apple iPhone 12 Pro - 128 GB - Silver - AT&T",
    "reviews": 38,
    "rating": 4.0,
    "extensions": [
      "Apple",
      "iPhone",
      "iPhone 12 Pro",
      "iOS",
      "6.1″",
      "Facial Recognition",
      "12 MP front camera",
      "Smartphone",
      "With Wireless Charging",
      "AT&T"
    ],
    "description": "5G goes Pro. A14 Bionic rockets past every other smartphone chip. The iPhone 12 Pro features a 6.1” Super Retina XDR display, LiDAR scanner for ultrafast and accurate depth maps of whatever space you're in and MagSafe wireless charging. The Pro camera system takes low-light photography to the next level with Night mode available in both the Wide and Ultra Wide cameras, so it’s better than ever at capturing incredible low-light shots. And Ceramic Shield delivers four times better drop performance.",
    "media": [
      {
        "type": "image",
        "link": "https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcQDYCaTc2z4hzdpIqZCvrAGiA9sgQvxZRR3DFSMFLGcvLkhOy1cwl9RGgrX-marXY5s0L_M9YZb4nHqmAglcK5HTk7go-g2fBlf3G0YSZWyM6L5Fgoz5tk&usqp=CAY"
      },
      {
        "type": "image",
        "link": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcS1MdeEFTGSg_6a6-AzxfAeTt9wzQwe0oM-qVtNhxz8pQPAxE8DDHvyzm4OIl7xfXi4faOpyIWDwCJXzo79L9iFbzVXEaN6Xw&usqp=CAY"
      },
      {
        "type": "image",
        "link": "https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcSBnkSVPLstQi4uo5Oknme6Byxp_u0Xx_lcJnkf2xBtQfAmr5qhck6_fe1i1EXjSTEGAhyC4fg-K2jB7qg8Yir4HdF4DcE&usqp=CAY"
      },
      {
        "type": "image",
        "link": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcS1MdeEFTGSg_6a6-AzxfAeTt9wzQwe0oM-qVtNhxz8pQPAxE8DDHvyzm4OIl7xfXi4faOpyIWDwCJXzo79L9iFbzVXEaN6Xw&usqp=CAY"
      }
    ]
  },
  "sellers_results": {
    "online_sellers": [
      {
        "position": 1,
        "name": "Apple",
        "link": "https://www.google.com/aclk?sa=L&ai=DChcSEwihuKX-9OrsAhXKH60GHYRVBZ0YABAEGgJwdg&sig=AOD64_3VdWeKHq7e7U4SviawipclloDDWQ&ctype=5&q=&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQ2ikIUQ&adurl=",
        "base_price": "$0.00 now+$33.30 for 30 mo",
        "additional_price": {
          "tax": "$0.00",
          "shipping": "$97.40"
        },
        "total_price": "$1,096.40"
      },
      {
        "position": 2,
        "name": "AT&T",
        "link": "https://www.google.com/aclk?sa=L&ai=DChcSEwihuKX-9OrsAhXKH60GHYRVBZ0YABADGgJwdg&sig=AOD64_3wqm0fYbvGjatj7HjNSbOWmfnhOQ&ctype=5&q=&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQ2ikIVw&adurl=",
        "base_price": "$0.00 now+$33.34 for 30 mo",
        "additional_price": {
          "tax": "$0.00",
          "shipping": "$97.52"
        },
        "total_price": "$1,097.72"
      },
      {
        "position": 3,
        "name": "Cricket Wireless",
        "link": "https://www.google.com/aclk?sa=L&ai=DChcSEwihuKX-9OrsAhXKH60GHYRVBZ0YABAFGgJwdg&sig=AOD64_0ULpgj5hDAvS62YN05SNHCFiMT6g&ctype=5&q=&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQ2ikIXQ&adurl=",
        "base_price": "$899.99",
        "additional_price": {
          "tax": "$0.00",
          "shipping": "$87.75"
        },
        "total_price": "$987.74"
      }
    ]
  },
  "related_products": {
    "different_brand": [
      {
        "title": "Apple iPhone 11 Pro Max 512gb ...",
        "link": "https://www.google.com/shopping/product/1020244195224082533?sourceid=chrome&ie=UTF-8&prds=epd:4230129420555329768,oid:4230129420555329768&sa=X&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQrhIIZg",
        "price": "$4,500.00",
        "rating": 4.5,
        "reviews": 30,
        "extensions": [
          "More Storage",
          "More SIM Slots",
          "Older Broadband Generation",
          "Unlocked",
          "2688 x 1242"
        ]
      },
      {
        "title": "Apple iPhone 12 - 128 GB ...",
        "link": "https://www.google.com/shopping/product/12268963920491633248?sourceid=chrome&ie=UTF-8&prds=epd:15517668619462736101,oid:15517668619462736101&sa=X&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQrhIIag",
        "price": "$35.37",
        "rating": 4.5,
        "reviews": 56,
        "extensions": [
          "Sprint",
          "Black",
          "Dual Lens",
          "With OLED Display",
          "Available Nearby"
        ]
      },
      {
        "title": "Apple iPhone 12 - 256 GB ...",
        "link": "https://www.google.com/shopping/product/17249827133838496377?sourceid=chrome&ie=UTF-8&prds=epd:9804832657962368550,oid:9804832657962368550&sa=X&ved=0ahUKEwivnaP-9OrsAhWpHjQIHem9DHAQrhIIbg",
        "price": "$39.54",
        "rating": 4.5,
        "reviews": 56,
        "extensions": [
          "Sprint",
          "Black",
          "Dual Lens",
          "With OLED Display",
          "Available Nearby"
        ]
      },
      ...
    ]
  },
  "specs_results": {
    "universal_product_identifiers": {
      "brand": "Apple",
      "part_number": "MGJN3LL/A",
      "gtin": "00194252036181"
    }
  },
  "reviews_results": {
    "ratings": [
      {
        "stars": 1,
        "amount": 7
      },
      {
        "stars": 2,
        "amount": 1
      },
      {
        "stars": 3,
        "amount": 1
      },
      {
        "stars": 4,
        "amount": 2
      },
      {
        "stars": 5,
        "amount": 27
      }
    ],
    "reviews": [
      {
        "position": 1,
        "title": "Let’s talk about this great 5G!! No more 3G support!!",
        "date": "October 24, 2020",
        "rating": 1,
        "source": "Corey · Review provided by vzw.com",
        "content": "I purchased a IPhone 12 Pro to replace my IPhone X, the phone still worked but it’s three years old and figured it was a good time to upgrade. Overall the new one is exactly the same as the X with a better camera. Oh let’s not forget the IPhone 12 pro has the blazing fast 5G we all have to have because our phones just aren’t fast enough! Unfortunately getting the 5G has come at a huge cost the iPhone 12 will not run on 3G so you better check your coverage maps and make sure the areas you need your phone support 5G or LTE. In the future this may not be a big deal but right now I can tell you 3G is still very important in areas of Las Vegas!! I guess if you are planning on staying in the city and don’t plan on doing any exploring outside of the city the lack of 5G will not be a problem for you. I will be taking my IPhone 12 and X out this weekend to do some side by side comparison to see how much service area I have lost. Also at my house I am at 1 Bar in 5G or LTE."
      }
    ]
  },
  "product_variations": [
    {
      "thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcRRHuZzJFr0Cgk1lTV2RWPBuOA2xrvkDQPqC3NYnOhJ1wHMfs4TbsDojI62H8kppx8CcaETvZJ1cLTqh6Gv_I6_6evFuIEeUvfAbfj2iDNHH1gf9Y8hMLU&usqp=CAY"
    },
    {
      "link": "https://www.google.com/shopping/product/6365527044486619718?hl=en&gl=us&prds=opd:11579479524734831751,rsk:PC_15321614589434804038&sa=X&ved=0ahUKEwi5uYLv7bv5AhVIBzQIHeoaAqoQlIUHCDEoAQ",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_product&gl=us&google_domain=google.com&hl=en&product_id=6365527044486619718",
      "thumbnail": "https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcSur_JWdJlOrgxT8Jb-QaNlalV2FCsIlA47tw6UjyncUD0LXT62oBhsUQax7zq6Y3kPw51EyFURNb037ftJBU7qbS86irdBRtrgIMVqk_Tr5NHQmlaiDbE&usqp=CAY"
    },
    {
      "link": "https://www.google.com/shopping/product/14610189294058381957?hl=en&gl=us&prds=opd:11579479524734831751,rsk:PC_15321614589434804038&sa=X&ved=0ahUKEwi5uYLv7bv5AhVIBzQIHeoaAqoQlIUHCDIoAg",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_product&gl=us&google_domain=google.com&hl=en&product_id=14610189294058381957",
      "thumbnail": "https://encrypted-tbn2.gstatic.com/shopping?q=tbn:ANd9GcQow-v145FgFDRUgtmNl46V0Gks-XOUsNH_lrsIehUIkBP6nx--b8f-AjmZz_e9fwTW1CmQNaFNfGHJrIVJuCVxaosOayopJPs8TjT1gyoH8laCThmSmg&usqp=CAY"
    },
    ...
  ]
}