# Darty Suggestions API Documentation

`GET /api/darty/suggest` returns product suggestions with the public `id` and `handle`. Use those ids unchanged with the product detail route. Prices are numbers in EUR.

## Credits

A successful request with results costs **1 credit**. Errors, challenges and empty results cost nothing.

- **Documentation:** [https://scrappa.co/docs/darty-api/darty_suggest](https://scrappa.co/docs/darty-api/darty_suggest)
- **API group:** Darty API
- **Endpoint:** `GET https://scrappa.co/api/darty/suggest`

## 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. |
| `limit` | integer | No | Suggestions to return. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/darty/suggest?query=televisao"
```

## Example response

```json
{
    "success": true,
    "site": "darty-pt",
    "query": "televisao",
    "total": 1,
    "items": [
        {
            "id": "12345678",
            "handle": "tv-lg-oled-55",
            "sku": "SKU-1234",
            "title": "TV OLED 55 pouces",
            "price": 899.99,
            "currency": "EUR",
            "url": "https://darty.pt/products/tv-lg-oled-55",
            "image": "https://cdn.shopify.com/s/files/1/example/tv.jpg"
        }
    ],
    "meta": {
        "endpoint_family": "darty-suggest",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Parameter Not Available | A parameter has no verified recipe. It is rejected before any lookup (`unsupported_filter`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Storefront Unavailable | The storefront could not be reached or answered with a challenge. 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)
