> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Shopping API

> Extract Google Shopping product listings and details by keyword, country, language, count, and date range

`POST /v1/data/google/shopping/run`

**Pricing:** $0.003 per result ($3.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string` *required*

Google Shopping search query to run.

**maxResults** `integer`

Number of products to return. Use 0 for all.

**dateRange** `string` (default: anytime)

Limit results to recently-listed products.

Allowed values: `anytime` (Any time), `qdr:h` (Past hour), `qdr:d` (Past 24 hours), `qdr:w` (Past week), `qdr:m` (Past month).

**country** `string` (default: us)

Country to search Google Shopping from.

58 allowed values, for example `us` (United States), `gb` (United Kingdom), `ca` (Canada), `au` (Australia), `nz` (New Zealand), `in` (India), `sg` (Singapore), `jp` (Japan), `kr` (South Korea), `hk` (Hong Kong). Fetch the full list with `GET /v1/data/google/shopping?expand=options`.

**language** `string` (default: en)

Language for results.

32 allowed values, for example `en` (English), `es` (Spanish), `fr` (French), `de` (German), `it` (Italian), `pt` (Portuguese), `nl` (Dutch), `sv` (Swedish), `no` (Norwegian), `da` (Danish). Fetch the full list with `GET /v1/data/google/shopping?expand=options`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/google/shopping/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": "PlayStation 5",
    "country": "us",
    "language": "en",
    "maxResults": 10,
    "dateRange": "anytime"
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/google/shopping/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": "PlayStation 5",
    "country": "us",
    "language": "en",
    "maxResults": 10,
    "dateRange": "anytime"
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/google/shopping/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": "PlayStation 5",
  "country": "us",
  "language": "en",
  "maxResults": 10,
  "dateRange": "anytime"
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one result, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `title` | Title | text |
| `merchant` | Merchant | text |
| `price` | Price | currency |
| `priceValue` | Price Value | number |
| `rating` | Rating | rating |
| `reviewCount` | Review Count | number |
| `position` | Position | number |
| `productId` | Product ID | text |
| `image` | Image | url |
| `productUrl` | Product URL | url |
| `searchQuery` | Search Query | text |
| `currency` | Currency | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "google/shopping",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "rating": 4.4,
      "productId": "16190674337627920569",
      "reviewCount": 1100,
      "priceValue": 304.58,
      "merchant": "Walmart",
      "position": 1,
      "title": "Sony PlayStation 5 Video Game Console, Size: 667.2GB",
      "productUrl": "https://www.google.com/search?ibp=oshop&q=PlayStation+5&prds=productid%3A16190674337627920569",
      "image": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcRtW2oSDiJZw8b1l0vWBWrQd0XMV3JWukq0uDMiCZyrk0wFhWta287346idCvC-iTQJizGHa-C6fYnFir-NsNdoL3uDi1kjwQLsqF7...",
      "price": "$304.58"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.