Shopping Merchant URL Enrichment
Google has removed direct merchant links from organic Shopping HTML — every click in the real Shopping UI now routes through a JavaScript handler. The/v1/google/shopping/product/click endpoint materializes the direct merchant URL for any product title on demand.
How It Works
- Call
/v1/google/shopping/search?q=laptop— you get product listings with title, price, source merchant, rating, thumbnail, and a per-productclick_link. - Call the product’s
click_link(or construct/v1/google/shopping/product/click?title=...&source=...) — the endpoint uses Google’s “I’m Feeling Lucky” redirect (btnI=1), scoped to the card’ssourcemerchant via asite:operator, to return the direct product page URL.
source-scoped site: query guarantees the resolved URL matches the exact merchant whose price was shown in the card, not a generic top organic match.
Two-Step Example
Response Shape
| Field | Description |
|---|---|
product_id | Stable MD5 hash of (title, source, price) — echoed back so you can correlate with the original search result. |
title | The product title you passed in. |
merchant_url | The direct merchant product page URL, or null if no redirect was produced. |
merchant_domain | The host portion of merchant_url. |
source_query | The query that was passed to Google’s “I’m Feeling Lucky” redirect — useful for debugging. |
Supported Merchants
The endpoint maps common source names to canonical domains for accuratesite: scoping. Supported out of the box:
- Marketplaces: Walmart, Best Buy, Amazon (incl. “Amazon.com - Seller”), Target, eBay, Newegg, Costco, Home Depot, Lowe’s, Staples, Office Depot, Micro Center, Adorama, B&H Photo-Video-Pro Audio
- Brand stores: HP, Dell, Lenovo, Apple, Razer, Asus, Acer, HyperX, MSI, Samsung
site: scope) which still resolves a valid merchant URL — just not necessarily the one whose price was shown.
Pricing
1 credit per call — the endpoint uses a lightweight curl_cffi request, not a browser. Enriching 50 products from a Shopping search adds just 50 credits on top of the original 2-credit search.Why This Exists
Google’s organic Shopping HTML doesn’t contain merchant URLs at all — clicking a product card opens a JavaScript modal that fetches merchant info only when you actually click “Visit site”. Attempting to capture that flow in a single synchronous scrape is impractical (~60-90s per query for 50 products). Instead, the ScrapeBadger Shopping click endpoint exposes merchant URL resolution as a per-product on-demand call, mirroring thescrapingdog_immersive_product_link pattern — you only pay for enrichment when you actually need the link.
