# Shopping

Google Shopping sources are designed to to gather SERP and product listing data through `google_shopping_search` and `google_shopping_product` sources respectively. The data extraction is a two-step process displayed below.

### **Step 1: Generate the Token**

First, you need to submit a request to the `google_shopping_search` [source](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/google/shopping/shopping-search). This step is essential because it generates the **product token**, which is required to collect product data later. Below is a basic JSON payload for `google_shopping_search` request:

```json
{
  "source": "google_shopping_search",
  "query": "google_pixel",
  "render": "html",
  "parse": true
}
```

{% hint style="warning" %}
**Important:** Only rendered parsed jobs will return product tokens.
{% endhint %}

Once the job is completed, you’ll find the token in the response, under the `organic` section:

```json
{
    "results": [
        {
            "content": {
                "url": "https://www.google.com/search?q=google_pixel&gl=us&hl=en&udm=28&sei=1uDkaLnMNPCNxc8P67XmqQg",
                "page": 1,
                "results": {
                    "paid": [],
                    "organic": [
                        {
                            "pos": 1,
                            "url": "https://www.google.com/shopping/product/547163035992318172?q=google_pixel&gl=us&hl=en&udm=28&sei=1uDkaLnMNPCNxc8P67XmqQg&gl=US",
                            "type": "grid",
                            "price": 899,
                            "title": "Google Pixel 9 Pro XL",
                            "token": "eyJjYXRhbG9naWQiOiAiNTQ3MTYzMDM1OTkyMzE4MTcyIiwgImdwY2lkIjogIjQ0MjYwMDg2MDY1MDIwNTc4NTkiLCAiaW1hZ2VEb2NpZCI6ICIxMjMwMTAyNDkzMzk0Mjg2MjY4IiwgIm1pZCI6ICI1NzY0NjI3ODc4NTM5Njc1NDAiLCAicHZvIjogIjIzIiwgInB2dCI6ICJoZyIsICJyZHMiOiAiUENfNDQyNjAwODYwNjUwMjA1Nzg1OXxQUk9EX1BDXzQ0MjYwMDg2MDY1MDIwNTc4NTkiLCAicXVlcnkiOiAiZ29vZ2xlX3BpeGVsIn0=",
```

Each collected product token in parsed results represents a single organic result.

{% hint style="info" %}
**Note:** Without a generated token, it’s not possible to retrieve product or pricing information.
{% endhint %}

### **Step 2: Use the Token in the Product Request**

To start collecting product data, use the generated token in your request to the `google_shopping_product` [source](https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/google/shopping/shopping-product):

```json

{
  "source": "google_shopping_product",
  "query": "eyJjYXRhbG9naWQiOiAiNTQ3MTYzMDM1OTkyMzE4MTcyIiwgImdwY2lkIjogIjQ0MjYwMDg2MDY1MDIwNTc4NTkiLCAiaW1hZ2VEb2NpZCI6ICIxMjMwMTAyNDkzMzk0Mjg2MjY4IiwgIm1pZCI6ICI1NzY0NjI3ODc4NTM5Njc1NDAiLCAicHZvIjogIjIzIiwgInB2dCI6ICJoZyIsICJyZHMiOiAiUENfNDQyNjAwODYwNjUwMjA1Nzg1OXxQUk9EX1BDXzQ0MjYwMDg2MDY1MDIwNTc4NTkiLCAicXVlcnkiOiAiZ29vZ2xlX3BpeGVsIn0=",
  "parse": true
}
```

{% hint style="warning" %}
**Important:** If an invalid or incorrectly generated token is used, the job will fail.
{% endhint %}

When using localization parameters for `google_shopping_product` and `google_shopping_search` sources, make sure to use the same locales (none if not defined). Regional misalignment between the sources may result in incomplete or inaccurate data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/google/shopping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
