# Darty Collections API Documentation

`GET /api/darty/collections` lists public collections with their `id` and `handle`. Add `handle` to read the products of one collection. Collection products come from the same public product search index as the search route, filtered by the collection id; this keeps the route stable. `page` and `limit` use the site own paging. A handle with no collection or no products returns an empty `items` list, a `no_results` reason and 0 credits. Handles feed the product detail route unchanged. Prices are numbers in EUR and `specs` is an object.

## Credits

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

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

## 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 |
| --- | --- | --- | --- |
| `handle` | string | No | Collection handle. Omit to list collections. |
| `page` | integer | No | Result page, 1-50. |
| `limit` | integer | No | Entries to return, up to 250. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/darty/collections?limit=20"
```

## Example response

```json
{
    "success": true,
    "site": "darty-pt",
    "handle": "",
    "total": 1,
    "items": [
        {
            "id": "98765432",
            "handle": "tvs",
            "title": "TVs",
            "url": "https://darty.pt/collections/tvs",
            "image": null
        }
    ],
    "meta": {
        "endpoint_family": "darty-collections",
        "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)
