# Shopping Product

The `google_shopping_product` source retrieves detailed product information (title, description, pricing, sellers, related items, reviews, etc.) from Google Shopping using a **product token** acquired from `google_shopping_search` [source](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/google/shopping/shopping-search).

## **Request samples**

In the code example below, we make a request to retrieve the product page for a Google Shopping product using a valid token.

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
       "source": "google_shopping_product",
       "query": "<PRODUCT_TOKEN>",
       "render": "html",
       "parse": true
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint


# Structure payload.
payload = {
    "source": "google_shopping_product",
    "query": "[product_token_string]",
    "render": "html",
    "parse": True
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Print prettified response to stdout.
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "google_shopping_product",
    query: "[product_token_string]",
    render: "html",
    parse: true
};

const options = {
    hostname: "realtime.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="HTTP" %}

```http
https://realtime.oxylabs.io/v1/queries?source=google_shopping_product&query=[product_token_string]&parse=true&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'google_shopping_product',
    'query' => '[product_token_string]',
    'render' => 'html',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");

$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "USERNAME"
	const Password = "PASSWORD"

	payload := map[string]interface{}{
		"source": "google_shopping_product",
		"query": "[product_token_string]",
		"render": "html",
		"parse": true,
	}

	jsonValue, _ := json.Marshal(payload)

	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://realtime.oxylabs.io/v1/queries",
		bytes.NewBuffer(jsonValue),
	)

	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)

	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "google_shopping_product",
                query = "[product_token_string]",
                render = "html",
                parse = true
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "google_shopping_product");
        jsonObject.put("query", "[product_token_string]");
        jsonObject.put("render", "html");
        jsonObject.put("parse", true);

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "google_shopping_product",
    "query": "[product_token_string]",
    "render": "html",
    "parse": true
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Important:** The `query` parameter must contain a valid token generated through the `google_shopping_search` [source](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/google/shopping/shopping-search).
{% endhint %}

We use synchronous [**Realtime**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/realtime) integration method in our examples. If you would like to use [**Proxy Endpoint**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/proxy-endpoint) or asynchronous [**Push-Pull**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods/push-pull) integration, refer to the [**integration methods**](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/integration-methods) section.

## Request parameter values

### Generic

Basic setup and customization options for scraping Google Shopping product pages.

<table><thead><tr><th width="222">Parameter</th><th width="330.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>Sets the scraper.</td><td><code>google_shopping_product</code></td></tr><tr><td><mark style="background-color:green;"><strong><code>query</code></strong></mark></td><td>The product token from <code>google_shopping_search</code></td><td>-</td></tr><tr><td><code>render</code></td><td>Enables JavaScript rendering when set to <code>html</code>. <strong>Required</strong> to receive additional pricing results from "More stores" section.  <a href="../../../features/js-rendering-and-browser-control/javascript-rendering"><strong>More info</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>parse</code></td><td>Returns parsed data when set to <code>true</code>. Explore output <a href="#output-data-dictionary"><strong>data dictionary</strong></a>.</td><td><code>false</code></td></tr><tr><td><code>callback_url</code></td><td>URL to your callback endpoint. <a href="../../../../integration-methods/push-pull#callback"><strong>More info</strong></a>.</td><td>-</td></tr><tr><td><code>user_agent_type</code></td><td>Device type and browser. The full list can be found <a href="../../../features/http-context-and-job-management/user-agent-type"><strong>here</strong></a>.</td><td><code>desktop</code></td></tr></tbody></table>

&#x20;   \- mandatory parameter

### Localization

Adapt results to specific geographical locations, domains, and languages.

<table><thead><tr><th width="218">Parameter</th><th width="336.3333333333333">Description</th><th>Default Value</th></tr></thead><tbody><tr><td><code>geo_location</code></td><td>The geographical location that the result should be adapted for. Using this parameter correctly is extremely important to get the right data. For more information, read about our suggested <code>geo_location</code> parameter structures <a href="../../../../features/localization/serp-localization#google"><strong>here</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>locale</code></td><td><code>Accept-Language</code> header value for interface language changes. <a href="../../../../features/localization/domain-locale-results-language#locale-1"><strong>More info</strong></a>.</td><td>-</td></tr><tr><td><code>context</code>:<br><code>results_language</code></td><td>Results language. List of supported Google languages can be found <a href="../../../../features/localization/domain-locale-results-language#results-language"><strong>here</strong></a>.</td><td>-</td></tr></tbody></table>

{% hint style="warning" %}
**Note:** make sure your localization parameters for `google_shopping_product` and `google_shopping_search` sources are the same (none if not defined). Regional misalignment between the sources may result in incomplete or inaccurate data.
{% endhint %}

## Structured data

Below you can find a **structured output example** for `google_shopping_product`.

{% file src="<https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FpVvZOSKeXd1vqwj0rLIS%2Fgoogle_shopping_product-output.json?alt=media&token=beb45d8e-8b23-4dd3-a833-2e007a61cd76>" %}

## Output data dictionary

**HTML sample**

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2Fr8YmqvFmrdisQ3i0FaiV%2FScreenshot%202025-10-15%20at%2014.57.20.png?alt=media&#x26;token=90e6aca3-0345-4eb2-ad5f-2c4a80881997" alt=""><figcaption></figcaption></figure>

#### JSON structure

The table below presents a detailed list of each product page element we parse, along with its description and data type. The table also includes some metadata.

<table><thead><tr><th width="247.11328125">Key</th><th width="384">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>url</code></td><td>The URL to the Google Shopping product page.</td><td>string</td></tr><tr><td><code>title</code> (optional) </td><td>The title of the product listing.</td><td>string</td></tr><tr><td><code>description</code></td><td>A detailed description of the product.</td><td>string</td></tr><tr><td><code>images</code></td><td>An object containing images of the product.</td><td>object</td></tr><tr><td><code>images.full_size</code></td><td>An array of URLs for full-sized images of the product.</td><td>array</td></tr><tr><td><code>images.thumbnails</code></td><td>An array of URLs for thumbnail images of the product.</td><td>array</td></tr><tr><td><code>pricing</code></td><td>An array containing all online pricing information.</td><td>array</td></tr><tr><td><code>reviews</code></td><td>An object containing review information. (US only)</td><td>object</td></tr><tr><td><code>variants</code></td><td>An array of objects containing product variants. (colors, sizes, etc.)</td><td>array</td></tr><tr><td><code>related_items</code></td><td>An array of objects containing related items.</td><td>array</td></tr><tr><td><code>specifications</code></td><td>An array of objects containing product specifications.</td><td>array</td></tr><tr><td><code>parse_status_code</code></td><td>The status code of the parsing job. You can see the parser status codes described <a href="https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/shopping/broken-reference/README.md"><strong>here</strong></a>.</td><td>integer</td></tr><tr><td><code>created_at</code></td><td>The timestamp when the scraping job was created.</td><td>timestamp</td></tr><tr><td><code>updated_at</code></td><td>The timestamp when the scraping job was finished.</td><td>timestamp</td></tr><tr><td><code>status_code</code></td><td>The status code of the scraping job. You can see the scraper status codes described <a href="https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/google/shopping/broken-reference/README.md"><strong>here</strong></a>.</td><td>integer</td></tr><tr><td><code>job_id</code></td><td>The ID of the job associated with the scraping job.</td><td>string</td></tr></tbody></table>

{% hint style="info" %}
In the following sections, parsed JSON code snippets are shortened where more than one item for the result type is available.
{% endhint %}

### Pricing

An object containing pricing information for the product.

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FZMNrYSwZCXOdyur8JQKT%2FScreenshot%202025-10-15%20at%2014.58.23.png?alt=media&#x26;token=50d5c815-14ad-4755-a1a0-006b965f6584" alt=""><figcaption></figcaption></figure>

```json
...
   "pricing": {
    "online": [
        {
          "price": 559,
          "seller": "Walmart - Seller",
          "details": "Pny GeForce RTX 4070 GPU 12gb Xlr8 Gaming Verto Epic-x RGB Triple Fan Dlss 3 Graphics Card",
          "currency": "USD",
          "condition": "New",
          "seller_link": "https://www.walmart.com/ip/PNY-GeForce-RTX-4070-GPU-12GB-XLR8-Gaming-VERTO-EPIC-X-RGB-Triple-Fan-DLSS-3-Graphics-Card/1396859462?wmlspartner=wlpa&selectedSellerId=101035116&selectedOfferId=159733DADC653E1891C050148D16D747&conditionGroupCode=1",
          "price_shipping": 22.05
        },
...
    ]
},
...
```

<table><thead><tr><th width="231">Key (pricing[])</th><th width="375">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>online</code></td><td>An array of objects containing details of pricing for the product.</td><td>array</td></tr><tr><td><code>online.price</code></td><td>The price of the product in the specified currency.</td><td>float</td></tr><tr><td><code>online.seller</code></td><td>The name of the seller or merchant offering the product.</td><td>string</td></tr><tr><td><code>online.details</code></td><td>Additional details about the product, purchase, such as delivery and return policies.</td><td>string</td></tr><tr><td><code>online.currency</code></td><td>The currency code for the product price.</td><td>string</td></tr><tr><td><code>online.condition</code></td><td>The condition of the product.</td><td>string</td></tr><tr><td><code>online.price_tax</code></td><td>The amount of tax applied to the product price.</td><td>float</td></tr><tr><td><code>online.price_total</code> (optional)</td><td>The total price of the product, including tax.</td><td>float</td></tr><tr><td><code>online.seller_link</code></td><td>The URL to the seller's page for the product.</td><td>string</td></tr><tr><td><code>online.price_shipping</code></td><td>The shipping cost for the product.</td><td>float</td></tr></tbody></table>

### Reviews

An object containing reviews and ratings information for the product.

{% hint style="info" %}
At the moment, reviews are only available in the US locale.
{% endhint %}

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FgyqhIgk2YjtfkwjVUhcC%2Fgoogle_shopping_product-reviews.png?alt=media&#x26;token=0e26f7cb-e953-416f-bac7-3fc491888735" alt=""><figcaption></figcaption></figure>

```json
...       
       "reviews": {
    "rating": 4.7,
    "top_review": {
        "text": "My computer is a Dell Optiplex 9020, i7-4770, 32mb, 500gb SSD. The 3 fan card is a long, and the hard drive cage had to be removed to fit in the Optiplex case. The power supply was upgraded to 750 watts which required an adapter for the Dell motherboard. With those modifications out of the way, installation of the card was drama free, but you have use Google to find the driver in the Nvidia website. I am using this GPU for 3D animation in Blender. I am very pleased with the speed of the rendering with ray tracing in EEVEE and Cycles. As this is an old computer, the computer's CPU never runs at 100%, and I haven't been able to max out this card's capacity yet. I don't hear the fans running but I have never put a high load enough on it yet, I guess. It does have a little electronic buzz when it is rendering.\u00a0Less",
        "author": "walmart.com Shopper",
        "rating": 5,
        "source": "Reviewed on walmart.com"
      },
      "rating_stars": 4.7,
      "reviews_count": 51,
      "reviews_by_stars": {
        "1": {
          "reviews_count": 2
        },
        "2": {
          "reviews_count": 0
        },
        "3": {
          "reviews_count": 2
        },
        "4": {
          "reviews_count": 3
        },
        "5": {
          "reviews_count": 44
        }
    },
},
...
```

<table><thead><tr><th width="253">Key(reviews[])</th><th width="375">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>rating</code></td><td>The average rating of the product, typically out of 5.</td><td>float</td></tr><tr><td><code>top_review</code> (optional)</td><td>An object containing details of the top review for the product.</td><td>object</td></tr><tr><td><code>top_review.text</code> (optional)</td><td>The text content of the top review</td><td>string</td></tr><tr><td><code>top_review.title</code> (optional)</td><td>The title of the top review.</td><td>string</td></tr><tr><td><code>top_review.author</code> (optional)</td><td>The author of the top review.</td><td>string</td></tr><tr><td><code>top_review.rating</code> (optional)</td><td>The rating given by the top review's author, typically out of 5.</td><td>float</td></tr><tr><td><code>top_review.source</code> (optional)</td><td>The source or website where the top review was posted.</td><td>string</td></tr><tr><td><code>rating_stars</code></td><td>The average rating of the product, typically out of 5 stars.</td><td>float</td></tr><tr><td><code>reviews_count</code> (optional)</td><td>The total number of reviews for the product.</td><td>integer</td></tr><tr><td><code>reviews_by_stars</code></td><td>An object containing the count of reviews for each star rating.</td><td>object</td></tr><tr><td><code>reviews_by_stars.url</code> (optional)</td><td>An object containing details of X-star reviews.</td><td>string</td></tr><tr><td><code>reviews_by_stars.reviews_count</code></td><td>The count of X-star reviews.</td><td>integer</td></tr></tbody></table>

### Related Items (More options)

An array of objects containing related items for the target product.

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FafwjKpnk3srO4MRVlOUM%2FScreenshot%202025-10-15%20at%2015.05.40.png?alt=media&#x26;token=ea5d9aee-b0c2-434c-a2f9-784a6aa6e039" alt=""><figcaption></figcaption></figure>

```json
...             
   "related_items": [
      {
        "items": [
          {
            "url": "/search?ibp=oshop&prds=catalogid:1368129371371338580,gpcid:14975392695437189622,headlineOfferDocid:2388507960063782588,imageDocid:1618178582933849531,productid:7780474142858650836,pvo:2,pvt:hg,rds:PC_14975392695437189622%7CPROD_PC_14975392695437189622&q=nvidia+rtx&gl=us&hl=en&pvorigin=2",
            "image": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcScO-LIdlqj1WjcLznMECFXNo4qbZ1TRbkfHdDsDPoIYxx7S9TjKhnQX7Ah6QsKI-zPBKFrC54H0wGZC60Q_NdRebesvYUXwRhQFuZRwvtWmx4_0xoxbylM",
            "price": 639.99,
            "title": "NVIDIA GeForce RTX 5070 12GB GDDR7 Graphics Card",
            "currency": "USD",
            "reviews_count": 228
          },
...
        ],
        "title": "More options"
     }
],
...
```

<table><thead><tr><th width="265">Key(related_items[])</th><th width="350">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>items</code></td><td>An array of objects containing details of each related item.</td><td>array</td></tr><tr><td><code>items.url</code></td><td>The URL to the related product page.</td><td>string</td></tr><tr><td><code>items.image</code></td><td>The URL of the related product's image.</td><td>string</td></tr><tr><td><code>items.price</code></td><td>The price of the related product in the specified currency.</td><td>float</td></tr><tr><td><code>items.title</code> (optional)</td><td>The title of the related product listing.</td><td>string</td></tr><tr><td><code>items.rating</code> (optional)</td><td>The average user rating of the related product, typically out of 5.</td><td>integer</td></tr><tr><td><code>items.store</code> (optional)</td><td>The name of the store or merchant offering the related product.</td><td>string</td></tr><tr><td><code>items.currency</code></td><td>The currency code for the product price.</td><td>string</td></tr><tr><td><code>items.reviews_count</code></td><td>The total number of reviews for the related product.</td><td>integer</td></tr><tr><td><code>title</code></td><td>The title or heading for the related items section</td><td>string</td></tr></tbody></table>

### Specifications

An array of objects containing specification details for the product.

<figure><img src="https://63892162-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FMO6FZmfJaA14oURI4tLg%2Fgoogle_shopping_product-specifications.png?alt=media&#x26;token=d5b38612-b109-42b1-a09c-6751dc0553be" alt=""><figcaption></figcaption></figure>

```json
...
"specifications": [
    {
        "items": [
          {
            "title": "Manufacturer",
            "value": "PNY"
          },
          {
            "title": "Output",
            "value": "HDMI, DisplayPort"
          },
          {
            "title": "Interface",
            "value": "PCI Express"
          },
          {
            "title": "Brand",
            "value": "PNY"
          },
...
        ],
        "section_title": "attributes"
      }
],
...
```

<table><thead><tr><th width="220">Key (specifications[])</th><th width="367">Description</th><th>Type</th></tr></thead><tbody><tr><td><code>items</code></td><td>An array of objects containing individual specification details.</td><td>array</td></tr><tr><td><code>items.title</code></td><td>The title of the specification.</td><td>string</td></tr><tr><td><code>items.value</code></td><td>The value of the specification.</td><td>string</td></tr><tr><td><code>section_title</code></td><td>The title or heading for the section of specifications.</td><td>string</td></tr></tbody></table>
