# Empik Product Reviews API Documentation

`GET /api/empik/reviews` `GET /api/empik/reviews` returns 30 review rows with numeric scores, ISO-8601 dates and useful or useless votes. It also returns the 1 to 5 histogram, the AI summary, the page count and the allowed sort modes. `page` is zero based. `sortMode` must be one of the published values. An echo that does not match the request is an unbilled error.

## Credits

A successful request costs **1 credit**. Errors and challenges cost nothing. The response shows the charge in `meta.credits_charged`. Clients are never rate limited.

- **Documentation:** [https://scrappa.co/docs/empik-api/empik_reviews](https://scrappa.co/docs/empik-api/empik_reviews)
- **API group:** Empik API
- **Endpoint:** `GET https://scrappa.co/api/empik/reviews`

## 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 |
| --- | --- | --- | --- |
| `id` | string | Yes | Product id from search, autocomplete or ids. |
| `page` | integer | No | Zero-based review page. |
| `sortMode` | string | No | DEFAULT, POPULAR, HIGHEST_RATE, LOWEST_RATE, NEWEST or OLDEST. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/empik/reviews?id=p1102239921"
```

## Example response

```json
{
    "success": true,
    "currency": "PLN",
    "id": "p1102239921",
    "page": 0,
    "returned": 30,
    "reviews": [
        {
            "id": "54834197",
            "date": "2021-01-26T22:25:17",
            "score": 5
        }
    ],
    "meta": {
        "endpoint_family": "empik-reviews",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The public source has no record for that id (`not_found`). Non-billable. |
| 422 | Filter Not Available | A requested filter or page cannot be honoured by the public source (`unsupported_filter`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown, conflicting or unusable. Unknown parameters are rejected. Non-billable. |
| 503 | Upstream Unavailable | The source could not be reached or changed its response shape (`upstream_blocked`, `upstream_unavailable`, `parser_drift`). 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)
