# Google Shopping Merchant URLs

Returns the direct merchant URL of the offers of one Google Shopping product. An offer is resolved only when Google names its merchant page; otherwise it is unresolved with an error code. URLs are never guessed. Costs 45 credits per successful request.

- **Documentation:** [https://scrappa.co/docs/google-shopping-api/google_shopping_merchant_urls](https://scrappa.co/docs/google-shopping-api/google_shopping_merchant_urls)
- **API group:** Google Shopping API
- **Endpoint:** `GET https://scrappa.co/api/google/shopping/merchant-urls`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `product_id` | string | No | Product id as returned in product_id by Google Shopping Search. Send exactly one id. |
| `catalog_id` | string | No | Google catalog id of the product (alternative to product_id). |
| `gpcid` | string | No | Google product category id (alternative to product_id). |
| `headline_offer_docid` | string | No | Headline offer id (alternative to product_id). |
| `offer_ids` | string | No | Comma separated offer ids (offers[].offer_id of the Google Shopping Product endpoint), up to 25. Default: the first 25 offers. |
| `gl` | string | No | Two-letter country code. Supported: us, gb. Default: us. |
| `hl` | string | No | Two-letter interface language. Default: en. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/google/shopping/merchant-urls?product_id=10650881791843186003&gl=us&hl=en"
```

## Example response

```json
{
    "search_parameters": {
        "product_id": "10650881791843186003",
        "gl": "us",
        "hl": "en"
    },
    "merchant_urls": [
        {
            "offer_id": "9014140178022547679",
            "store": "eBay",
            "price": "$349.99",
            "status": "resolved",
            "merchant_url": "https://www.ebay.com/itm/940019065820",
            "error_code": null
        },
        {
            "offer_id": "10050238505178525784",
            "store": "Example Shop",
            "price": "$359.00",
            "status": "unresolved",
            "merchant_url": null,
            "error_code": "redirect_not_direct"
        }
    ],
    "summary": {
        "requested": 2,
        "resolved": 1,
        "unresolved": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid, or the country is not supported for this endpoint. |
| 404 | Product Not Found | Google shows no product with offers for this id. Failed requests are not billable. |
| 503 | Google Shopping Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
