{
  "markdown": "# 🛍️ Google Shopping API: Products, Prices, and Deals in Clean JSON\n\n> The efficient, reliable, and developer-friendly way to use the Google Shopping API.\n\n**Actor page:** [apify.com/johnvc/google-shopping-api-google-shopping-products-prices-deals](https://apify.com/johnvc/google-shopping-api-google-shopping-products-prices-deals?fpr=9n7kx3)\n**Input schema:** [apify.com/johnvc/google-shopping-api-google-shopping-products-prices-deals/input-schema](https://apify.com/johnvc/google-shopping-api-google-shopping-products-prices-deals/input-schema?fpr=9n7kx3)\n\nThe Google Shopping API returns Google Shopping product listings for a query as clean, structured JSON: title, merchant source, current and original price, rating, review count, sale tag, delivery terms, and a product ID. Filter by price band, sort order, free shipping, and on-sale status, and localize by country, language, and Google domain. Built for price comparison, deal tracking, competitive monitoring, and AI agent workflows.\n\n## Video Walkthrough\n\n[![Watch the walkthrough](https://img.youtube.com/vi/jREWahDGhJM/maxresdefault.jpg)](https://www.youtube.com/watch?v=jREWahDGhJM)\n\n## Quick Start\n\n### Prerequisites\n- Python 3.11 or higher\n- An Apify account and API key ([get a free key here](https://apify.com?fpr=9n7kx3))\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/johnisanerd/Apify-Google-Shopping-API.git\n   cd Apify-Google-Shopping-API\n   ```\n\n2. **Install dependencies with UV**\n   ```bash\n   # Install UV if you do not have it:\n   curl -LsSf https://astral.sh/uv/install.sh | sh\n\n   # Install project dependencies:\n   uv sync\n   ```\n\n3. **Configure your API key**\n   ```bash\n   cp .env.example .env\n   # Edit .env and add your Apify API key\n   # Get your free API key at: https://apify.com?fpr=9n7kx3\n   ```\n\n4. **Run the example**\n   ```bash\n   uv run python google-shopping-api-example.py\n   ```\n\n### Alternative: set the API key directly\n```bash\nexport APIFY_API_TOKEN=\"your_api_key_here\"\nuv run python google-shopping-api-example.py\n```\n\n## Why Use This Google Shopping API?\n\n**Prices across merchants.** Get the products Google Shopping shows for a query, each with its merchant source, current price, and original price when discounted.\n\n**Built-in deal signals.** Sale tags (for example `16% OFF`), original prices, and an on-sale filter make deal tracking straightforward.\n\n**Ratings and delivery.** Each listing carries a rating, review count, and delivery terms, so you can rank on more than price.\n\n**Flexible filtering.** Narrow by `min_price` and `max_price`, sort by price, and restrict to free shipping or on-sale items.\n\n**Localized.** Target by `location`, country (`gl`), language (`hl`), and Google domain, and emulate desktop, tablet, or mobile.\n\n**Predictable, pay-per-use pricing.** Billing is per page processed (about 40 products each), with a small per-run fee.\n\n## Features\n\n### Core Capabilities\n- Product search with price-band, sort, free-shipping, and on-sale filters\n- Merchant source, current and original price, and sale tag per product\n- Ratings, review counts, and delivery terms\n- Localization by location, country, language, and Google domain\n- Pagination with a configurable page cap\n\n### Data Quality\n- One item per page, each with a `shopping_results` array\n- Formatted `price` plus numeric `extracted_price`\n- Sale fields (`old_price`, `tag`) when a product is discounted\n- The available refinement `filters` returned per page\n\n## Usage Examples\n\n### Basic search\n```json\n{\n  \"q\": \"wireless headphones\",\n  \"max_pages\": 1\n}\n```\n\n### Price band, on sale, sorted low to high\n```json\n{\n  \"q\": \"4k monitor\",\n  \"min_price\": 200,\n  \"max_price\": 500,\n  \"on_sale\": true,\n  \"sort_by\": 1\n}\n```\n\n## Input Parameters\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `q` | `str` | Yes | - | Product or keyword to search, e.g. `wireless headphones`. |\n| `location` | `str` | No | - | Geographic location, e.g. `Austin, Texas, United States`. |\n| `gl` | `str` | No | - | Country code, e.g. `us`, `uk`, `de`. |\n| `hl` | `str` | No | - | Language code, e.g. `en`, `es`. |\n| `google_domain` | `str` | No | `google.com` | Google domain, e.g. `google.co.uk`. |\n| `device` | `str` | No | `desktop` | `desktop`, `tablet`, or `mobile`. |\n| `min_price` | `number` | No | - | Only products above this price. |\n| `max_price` | `number` | No | - | Only products below this price. |\n| `sort_by` | `int` | No | - | `1` price low to high, `2` high to low; blank = relevance. |\n| `free_shipping` | `bool` | No | `false` | Only products with free shipping. |\n| `on_sale` | `bool` | No | `false` | Only products on sale or discounted. |\n| `max_pages` | `int` | No | `1` | Pages to fetch (~40 products each); `0` = unlimited. Each page is billed. |\n\n## Output Format\n\nA real result for `wireless headphones` (one item per page; `shopping_results` is trimmed to a single product, and `filters` lists the available refinements).\n\n```json\n{\n  \"search_parameters\": { \"q\": \"wireless headphones\", \"device\": \"desktop\", \"max_pages\": 1 },\n  \"search_metadata\": { \"results_count\": 40, \"pages_processed\": 1, \"max_pages_set\": 1, \"pagination_limit_reached\": true },\n  \"page_number\": 1,\n  \"shopping_results\": [\n    {\n      \"position\": 1,\n      \"title\": \"JLab Studio 2 Wireless Headphones\",\n      \"product_id\": \"13340055750063076763\",\n      \"source\": \"Target\",\n      \"price\": \"$24.99\",\n      \"extracted_price\": 24.99,\n      \"old_price\": \"$30\",\n      \"rating\": 4.6,\n      \"reviews\": 727,\n      \"tag\": \"16% OFF\",\n      \"delivery\": \"Free delivery on $35+\"\n    }\n  ],\n  \"filters\": [ { \"input_type\": \"link_with_icon\", \"options\": [ \"...\" ] } ]\n}\n```\n\nEach page item echoes the `search_parameters`, reports `search_metadata` (result count and pages processed), and lists every product in `shopping_results` with its position, title, merchant `source`, formatted and numeric price, optional sale fields (`old_price`, `tag`), rating, reviews, delivery terms, and `product_id`. The `filters` array returns the refinements Google offers for the query.\n\n---\n\n## Use as an MCP tool\n\nYou can load the Google Shopping API as an MCP tool so assistants call it for you. The MCP server URL preloads just this one Actor:\n\n```\nhttps://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\n```\n\nAuthenticate with OAuth in the browser when offered, or with your Apify API token (the same `APIFY_API_TOKEN` used by the Python example). Get a token at https://console.apify.com/settings/integrations and a free Apify account at https://apify.com?fpr=9n7kx3 .\n\n## Install in Claude Cowork Desktop\n\n![Install in Claude Cowork Desktop](https://raw.githubusercontent.com/johnisanerd/ApifyPublicData/main/assets/guides/install_mcp_into_claude_desktop.png)\n\nCowork is the desktop app's automation mode. To give it the Google Shopping API as a tool, add the Apify MCP server as a connector.\n\n1. Open the Claude desktop app and go to **Settings → Connectors** (or **Settings → Developer → Edit Config** to edit `claude_desktop_config.json` directly).\n   - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n2. Add the Apify MCP server, preloaded with only this Actor:\n\n```json\n{\n  \"mcpServers\": {\n    \"apify\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mcp-remote\",\n        \"https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\"\n      ]\n    }\n  }\n}\n```\n\n3. Restart the app. When Cowork first calls the tool, complete the OAuth prompt in your browser, or add your Apify API token in the connector settings to skip OAuth.\n4. In a Cowork chat, confirm the tool is available and ask it to run the Google Shopping API.\n\nDownload the desktop app and start a free trial: https://claude.ai/referral/uIlpa7nPLg\nMore help: https://docs.apify.com/platform/integrations/claude-desktop\n\n## Install in Claude Code\n\n![Install in Claude Code](https://raw.githubusercontent.com/johnisanerd/ApifyPublicData/main/assets/guides/install_mcp_into_claude_code.png)\n\nClaude Code is the command-line tool. Add the Actor's MCP server with one command:\n\n```bash\nclaude mcp add --transport http apify \\\n  \"https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\"\n```\n\nTo use a token instead of browser OAuth:\n\n```bash\nclaude mcp add --transport http apify \\\n  \"https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\" \\\n  --header \"Authorization: Bearer YOUR_APIFY_TOKEN\"\n```\n\nThen verify with `claude mcp list`, or run `/mcp` inside a session. Ask Claude Code to call the Google Shopping API.\n\nTry Claude Code free: https://claude.ai/referral/uIlpa7nPLg\nClaude Code MCP docs: https://code.claude.com/docs/en/mcp\n\n## Install in Claude (website)\n\n![Install in Claude (website)](https://raw.githubusercontent.com/johnisanerd/ApifyPublicData/main/assets/guides/install_mcp_into_claude_ai.png)\n\nOn claude.ai you add Apify as a connector, then enable just this Actor's tool.\n\n1. Go to **Settings → Connectors → Browse connectors** and search for **Apify MCP server**. Install it (enable or update if prompted).\n2. When connecting, authenticate with your Apify API token, and enable the tool `johnvc/google-shopping-api-google-shopping-products-prices-deals`.\n3. In any chat, open **+ → Connectors** and turn on **Apify**.\n4. Alternatively, choose **Add custom connector** and paste the full MCP URL `https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals`, using OAuth when prompted.\n5. Ask Claude to run the Google Shopping API.\n\nOpen Claude on the web: https://claude.ai/referral/uIlpa7nPLg\n\n## Install in Cursor\n\n![Install in Cursor](https://raw.githubusercontent.com/johnisanerd/ApifyPublicData/main/assets/guides/install_mcp_into_cursor.png)\n\nCursor reads MCP servers from a project file at `.cursor/mcp.json`.\n\n1. In your project, create `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"apify\": {\n      \"url\": \"https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\"\n    }\n  }\n}\n```\n\n2. If you prefer token auth over browser OAuth, add a header:\n\n```json\n{\n  \"mcpServers\": {\n    \"apify\": {\n      \"url\": \"https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals\",\n      \"headers\": { \"Authorization\": \"Bearer YOUR_APIFY_TOKEN\" }\n    }\n  }\n}\n```\n\n3. Open **Cursor → Settings → MCP** and confirm the **apify** server is connected (green dot).\n4. In Composer or Chat, ask Cursor to call the Google Shopping API.\n\nNew to Cursor? Get it here: https://cursor.com/referral?code=XQP4VBLI3NNX\n\n## Install in ChatGPT\n\n![Install in ChatGPT](https://raw.githubusercontent.com/johnisanerd/ApifyPublicData/main/assets/guides/install_mcp_into_ChatGPT.png)\n\nChatGPT connects to the Apify MCP server through Developer mode (available on ChatGPT Pro, Plus, Business, Enterprise, and Education plans).\n\n1. Click your profile icon, then go to **Settings > Apps**. If you do not see a **Create app** button, open **Advanced settings** and enable **Developer mode**.\n2. Click **Create app** and fill out the form:\n   - **Name:** Apify\n   - **MCP Server URL:** `https://mcp.apify.com/?tools=actors,docs,johnvc/google-shopping-api-google-shopping-products-prices-deals`\n   - **Authentication:** OAuth\n3. Click **Create** and authorize the connection with Apify.\n4. To use the app in a conversation, click **+** in the chat, choose **Developer mode**, and select **Apify**.\n\nMore help: https://docs.apify.com/platform/integrations/mcp\n\n---\n\n[**Made with care**](https://apify.com/johnvc?fpr=9n7kx3)\n\n*Use the Google Shopping API to power price comparison, deal tracking, and competitive monitoring with reliable, structured results.*\n\n## Featured Tasks\n\nReady-to-run examples on the Apify Store.\n\n- [Export Google Shopping Products to CSV](https://apify.com/johnvc/google-shopping-api-google-shopping-products-prices-deals/examples/export-google-shopping-products-to-csv?fpr=9n7kx3)\n\nLast Updated: 2026.09.07\n",
  "bytes": 12243,
  "sha": "857b78f3bb06526018e77fe5b4b72ed0ca7aded3ce71c493cb5cd0cee8599a25",
  "repo_slug": "johnisanerd/apify-google-shopping-api",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_johnisanerd_google_shopping_03cca440/readme"
}