# Universal.at Product Search API Documentation

Scrappa's `GET /api/universal-at/search` returns Universal.at products for a search query as structured JSON. A page holds 12 products.

## What you get

Each item has `id` (`styleId`), `sku`, `article_number`, `title`, `brand`, `category`, `selling_points`, `url`, `price`, `original_price`, `price_difference`, `discount_percentage`, `currency`, `price_from`, `rating`, `review_count`, `availability` and a full-size `image`. Use `styleId` unchanged with the product endpoint. `total` is the number of matches.

## Prices and stock

Gateway prices are integer cents and are divided by 100 once, so `103108` becomes `1031.08` EUR. A discount adds `original_price` and `priceDifference` as `price_difference`. `discount_percentage` is the percent computed from those two public prices when both support it, or the upstream percent when supplied. A rating of 0 becomes `null`. Stock is the availability text the shop shows.

## Filters and pages

`sort` is `relevance` (default), `price-asc` or `price-desc`. `page` starts at 1. `filter_id` and `filter_values` take a filter group id and value ids from the full search; only matching items are returned. An optional `brand` is checked on every item as well. `total` and `has_more` use the upstream count before this local brand check, so a locally emptied page can still have more pages. An empty query is rejected.

## Credits

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

- **Documentation:** [https://scrappa.co/docs/universal-at-api/universal_at_search](https://scrappa.co/docs/universal-at-api/universal_at_search)
- **API group:** Universal.at API
- **Endpoint:** `GET https://scrappa.co/api/universal-at/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 iphone. |
| `sort` | string | No | relevance (default), price-asc or price-desc. |
| `page` | integer | No | Result page of 12 items. |
| `filter_id` | string | No | Filter group id from the full search, for example filter_manufacturer. |
| `filter_values` | array | No | One or more filter value ids from the full search. |
| `brand` | string | No | Brand name checked on every returned item. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/universal-at/search?query=iphone&sort=price-asc&page=1"
```

## Example response

```json
{
    "success": true,
    "query": "iphone",
    "items": [
        {
            "position": 1,
            "id": "AKLBB2029112026",
            "style_id": "AKLBB2029112026",
            "sku": "2340273220-0-2029112026",
            "article_number": "23402732",
            "title": "Smartphone \u00bbiPhone 17\u00ab Lavendel",
            "brand": "Apple",
            "category": "Technik",
            "selling_points": [
                "6,3 Zoll Display",
                "Ceramic Shield 2"
            ],
            "url": "/p/AKLBB2029112026?sku=2340273220-0",
            "price": 1031.08,
            "original_price": 1099,
            "price_difference": 67.92,
            "discount_percentage": 6.18,
            "currency": "EUR",
            "price_from": true,
            "rating": 4.3,
            "review_count": 4,
            "availability": "vorr\u00e4tig - kommt in 4 bis 6 Werktagen",
            "image": "https://bilder.universal.at/i/empiriecom/826fea89c3154df9201ad925433381dd.jpg"
        }
    ],
    "total": 494,
    "page": 1,
    "page_size": 12,
    "has_more": true,
    "sort": "relevance",
    "sorting_orders": [],
    "availableFilters": [],
    "categories": [],
    "applied_filters": [],
    "filtered_out": 0,
    "meta": {
        "endpoint_family": "universal-at-search",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Universal.at could not be reached in time. Retryable and never billed. Clients are never rate limited. |
| 503 | Unexpected Answer Shape | Universal.at answered with an unknown shape. Not retryable and never billed: a retry of the same call cannot change the shape. |

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