> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/api-targets/es/search-engines/google/shopping.md).

# Shopping

Mira cómo extraer Google Shopping en dos pasos: generar tokens desde la búsqueda y luego extraer información detallada del producto.

Las fuentes de Google Shopping están diseñadas para recopilar datos de SERP y de listados de productos a través de `google_shopping_search` y `google_shopping_product` fuentes, respectivamente. La extracción de datos es un proceso de dos pasos que se muestra a continuación.

### **Paso 1: Generar el token**

Primero, debes enviar una solicitud a la `google_shopping_search` [source](/api-targets/es/search-engines/google/shopping/shopping-search.md). Este paso es esencial porque genera el **token de producto**, que se requiere para recopilar datos de productos más adelante. A continuación se muestra una carga JSON básica para `google_shopping_search` solicitud:

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

{% hint style="warning" %}
**Importante:** Solo los trabajos parseados y renderizados devolverán tokens de producto.
{% endhint %}

Una vez completado el trabajo, encontrarás el token en la respuesta, en la `organic` sección:

```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=",
```

Cada token de producto recopilado en los resultados analizados representa un único resultado orgánico.

{% hint style="info" %}
**Nota:** Sin un token generado, no es posible recuperar información del producto o de precios.
{% endhint %}

### **Paso 2: Usar el token en la solicitud del producto**

Para empezar a recopilar datos de productos, usa el token generado en tu solicitud a la `google_shopping_product` [source](/api-targets/es/search-engines/google/shopping/shopping-product.md):

```json

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

{% hint style="warning" %}
**Importante:** Si se usa un token inválido o generado incorrectamente, el trabajo fallará.
{% endhint %}

Al usar parámetros de localización para `google_shopping_product` y `google_shopping_search` fuentes, asegúrate de usar las mismas configuraciones regionales (ninguna si no están definidas). Un desajuste regional entre las fuentes puede dar lugar a datos incompletos o inexactos.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/api-targets/es/search-engines/google/shopping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
