# GAMMA Product Search API Documentation

`GET /api/gamma/search?query=...` returns GAMMA products as structured JSON. Each item has `object_id`, `ean`, `brand`, `specs`, numeric `rating`, boolean `available_online`, `stock_quantity`, `store_uid_availability` and full-size `images`. Category uses the slug path from the sitemap. Brand and price filters are pinned to the public keys. Page 1 is the default. Hits carry no price; read a numeric EUR price from `/product` with the `object_id`. Sorting supports `rd` only, and that order is page-local.

## Credits

A successful request costs **1 credit**. Errors and empty results cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/gamma-api/gamma_search](https://scrappa.co/docs/gamma-api/gamma_search)
- **API group:** GAMMA API
- **Endpoint:** `GET https://scrappa.co/api/gamma/search`

## 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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Search words, such as boor. |
| `category` | string | No | Slug path from the sitemap. |
| `brand` | string | No | Brand name from a live hit. |
| `price_min` | number | No | Minimum price in EUR. |
| `price_max` | number | No | Maximum price in EUR. |
| `sort` | string | No | rd only: page-local best-rated order. Other values return 422. |
| `page` | integer | No | Result page, default 1. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/gamma/search?query=boor"
```

## Example response

```json
{
    "success": true,
    "site": "nl",
    "query": "boor",
    "result_count": 1,
    "items": [
        {
            "object_id": "B478898",
            "product_id": "478898",
            "brand": "Bosch Professional",
            "name": "Bosch Professional metaalborenset",
            "rating": 4.6,
            "review_count": 20,
            "available_online": true,
            "stock_quantity": 8
        }
    ],
    "page": 1,
    "pages_count": 279,
    "total_count": 837,
    "meta": {
        "endpoint_family": "gamma-search",
        "billable": true,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or malformed. Unknown parameters are rejected. Non-billable. |
| 503 | Upstream Unavailable | The upstream could not be reached or changed its public shape. Retryable and never billed. Clients are never rate limited. |

## 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)
