# Gear4music Product Search API Documentation

Scrappa's `GET /api/gear4music/search` returns Gear4music (gear4music.com) products for a query or base category as JSON. Each item has `id`, `product_id`, `title`, `brand`, `price`, `original_price`, `discount_percent`, `currency`, `rating`, `review_count`, `in_stock`, `image`, `url` and `position`. Prices are GBP numbers and ids are returned unchanged from the source. Price, sort and page filters are not supported and return 422 before any lookup. An empty result is a valid, non-billable success.
## Credits

A successful request costs **1 credit**. Public access is included. Errors, blocks and empty results cost nothing. The charge is shown in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/gear4music-api/gear4music_search](https://scrappa.co/docs/gear4music-api/gear4music_search)
- **API group:** Gear4music API
- **Endpoint:** `GET https://scrappa.co/api/gear4music/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, for example fender. Use this or category. |
| `category` | string | Yes | Category path such as Guitars.html. Use this or query. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "query": "fender",
    "category": null,
    "items": [
        {
            "position": 1,
            "id": "/Manufacturer/Fender.html",
            "product_id": "20985",
            "title": "Shure SM7B Dynamic Studio Microphone",
            "brand": "Shure",
            "url": "https://www.gear4music.com/Manufacturer/Fender.html",
            "price": 333,
            "currency": "GBP",
            "original_price": 399,
            "discount_percent": 17,
            "rating": 4.8,
            "review_count": 214,
            "in_stock": true,
            "image": "https://r2.gear4music.com/media/47/477892/1200/preview.jpg"
        }
    ],
    "page": 1,
    "meta": {
        "endpoint_family": "gear4music-search",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or unusable. Unsupported filters are rejected before any upstream call. Non-billable. |
| 503 | Upstream Unavailable | Gear4music could not be reached or answered with a block or an unexpected page. 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)
