# Google Shopping Filters

Returns the filter groups (brand, price, features, stores, rating) Google Shopping shows for a query. Every option carries the rewritten q and the shoprs token: send both to the Google Shopping Search endpoint to get the filtered results. Costs 90 credits per successful request.

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

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Product search query. |
| `gl` | string | No | Two-letter country code. Supported: us, gb, de. Default: us. |
| `hl` | string | No | Two-letter interface language. Default: en. |
| `shoprs` | string | No | Filter token from an earlier call. The applied options are then marked as selected. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/google/shopping/filters?q=iphone+15+case&gl=us&hl=en"
```

## Example response

```json
{
    "search_parameters": {
        "q": "iphone 15 case",
        "gl": "us",
        "hl": "en"
    },
    "filter_groups": [
        {
            "id": "Features",
            "title": "Features",
            "options": [
                {
                    "label": "With Card Holder",
                    "q": "iphone 15 case with card holder",
                    "shoprs": "CAEYASoOaXBob25lIDE1IGNhc2UyIggBEhBXaXRoIENhcmQgSG9sZGVyGAI6CgiNxi0QjsYtMANYmKogYAI",
                    "selected": false
                }
            ]
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid, or the country is not supported for this endpoint. |
| 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)
