# XXL Sport Search API Documentation

<p><strong>XXL Sport Search API Documentation</strong> Search the public XXL Sport catalog for Sweden by Swedish query words or a category code from the site. Filter by price range, sort and page. Price is checked on each returned item, so a page can be short. Every product has a style key, a group id, a numeric price with currency, per-size prices and full-size image URLs. The style key works unchanged in the product route and the group id in the reviews route. One search costs 1 credit. Empty and failed requests are not billed. Not affiliated with XXL Sport.</p>

- **Documentation:** [https://scrappa.co/docs/xxl-api/xxl_search](https://scrappa.co/docs/xxl-api/xxl_search)
- **API group:** XXL Sport API
- **Endpoint:** `GET https://scrappa.co/api/xxl/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 |
| --- | --- | --- | --- |
| `market` | string | No | SE only. NO and FI return 422 until their production soak passes. |
| `query` | string | No | Swedish search words. Use this or category. |
| `category` | string | No | Numeric category code from XXL Sport. Take categoryCodes from this response or from a product. Use this or query. |
| `min_price` | number | No | Lowest price in SEK. Checked on returned items. |
| `max_price` | number | No | Highest price in SEK. Checked on returned items. |
| `sort` | string | No | RELEVANCE (default), PRICE_ASCENDING, PRICE_DESCENDING, RATING, DISCOUNT or NEWEST_FIRST. |
| `page` | integer | No | 1-based page, up to 10. |
| `limit` | integer | No | Products per page, up to 60, default 60. |

## Example response

```json
{
    "data": {
        "sort": "RELEVANCE",
        "query": "l\u00f6parskor",
        "facets": [],
        "currency": "SEK",
        "products": [
            {
                "id": "1240207_1_Style",
                "url": "https://www.xxl.se/p/example-1240207_1_Style",
                "brand": "Example",
                "price": 8999,
                "title": "Running shoe",
                "rating": 4.7,
                "groupId": "1240207",
                "inStock": true,
                "currency": "SEK",
                "discount": 10,
                "imageUrl": "https://example.com/image.jpg",
                "styleKey": "1240207_1_Style",
                "variants": [
                    {
                        "size": "40.5",
                        "label": "40.5",
                        "price": 1679,
                        "inStock": true,
                        "currency": "SEK",
                        "stockNumber": 24,
                        "originalPrice": 2399
                    }
                ],
                "imageUrls": [
                    "https://example.com/image.jpg"
                ],
                "originalPrice": 9999
            }
        ],
        "totalHits": 704,
        "pagination": {
            "has_more": true,
            "per_page": 60,
            "total_items": 704,
            "total_pages": 12,
            "current_page": 1
        },
        "categoryCodes": [
            {
                "code": "140202",
                "name": "Running",
                "facetId": "custom.categoryBreadcrumbCodes",
                "hitCount": 222
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. Not billable. |
| 502 | Upstream Unavailable | The source did not answer or sent unreadable data. Not billable. |

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