# Trendyol Filters API Documentation

<p><strong>Trendyol Filters API</strong> returns the filter values of a search: brands with ids and counts, colors, genders, categories, price steps, rating steps, sizes and attribute filters such as material or collar. Use the brand and category ids in the Trendyol Search API.</p><p>The lists belong to the search text and are cached for six hours. Sizes are listed for information: the search has no size filter.</p><p>Costs 1 credit per successful request. Empty results and failed requests are free.</p>

- **Documentation:** [https://scrappa.co/docs/trendyol-api/trendyol_filters](https://scrappa.co/docs/trendyol-api/trendyol_filters)
- **API group:** Trendyol API
- **Endpoint:** `GET https://scrappa.co/api/trendyol/filters`

## 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 text, 1 to 120 characters, for example elbise. |

## Example response

```json
{
    "data": {
        "query": "elbise",
        "sizes": [
            {
                "id": "group-xs",
                "name": "XS",
                "count": 22252
            },
            {
                "id": "group-s",
                "name": "S",
                "count": 132776
            },
            {
                "id": "group-m",
                "name": "M",
                "count": 130109
            }
        ],
        "brands": [
            {
                "id": "41",
                "name": "MANGO",
                "count": 1159
            },
            {
                "id": "147",
                "name": "Stradivarius",
                "count": 77
            },
            {
                "id": "38",
                "name": "Koton",
                "count": 4147
            }
        ],
        "colors": [
            {
                "id": "1",
                "name": "Alt\u0131n",
                "count": 2341
            },
            {
                "id": "2",
                "name": "Bej",
                "count": 16923
            },
            {
                "id": "3",
                "name": "Beyaz",
                "count": 22173
            }
        ],
        "genders": [
            {
                "id": "1",
                "name": "Kad\u0131n",
                "count": 430537
            },
            {
                "id": "2",
                "name": "Erkek",
                "count": 527
            },
            {
                "id": "3",
                "name": "\u00c7ocuk",
                "count": 53632
            }
        ],
        "ratings": [
            {
                "id": "4.5",
                "name": "4.5 Y\u0131ld\u0131z Ve \u00dczeri",
                "count": 53325
            },
            {
                "id": "4",
                "name": "4 Y\u0131ld\u0131z Ve \u00dczeri",
                "count": 27166
            },
            {
                "id": "3",
                "name": "3 Y\u0131ld\u0131z Ve \u00dczeri",
                "count": 23275
            },
            {
                "id": "2",
                "name": "2 Y\u0131ld\u0131z Ve \u00dczeri",
                "count": 6070
            },
            {
                "id": "1",
                "name": "1 Y\u0131ld\u0131z Ve \u00dczeri",
                "count": 6977
            }
        ],
        "attributes": [
            {
                "name": "Materyal",
                "values": [
                    {
                        "id": "212262",
                        "name": "%100 Pamuk",
                        "count": 12080
                    },
                    {
                        "id": "1225813",
                        "name": "%100 Viskoz",
                        "count": 318
                    },
                    {
                        "id": "1178534",
                        "name": "3 \u0130plik \u015eardonlu",
                        "count": 424
                    }
                ]
            }
        ],
        "categories": [
            {
                "id": "56",
                "name": "Elbise",
                "count": 491989
            }
        ],
        "price_ranges": [
            {
                "id": "0-600",
                "name": "0 TL - 600 TL",
                "count": 0
            },
            {
                "id": "600-1250",
                "name": "600 TL - 1250 TL",
                "count": 0
            },
            {
                "id": "1250-1750",
                "name": "1250 TL - 1750 TL",
                "count": 0
            },
            {
                "id": "1750-2500",
                "name": "1750 TL - 2500 TL",
                "count": 0
            },
            {
                "id": "2500-7000",
                "name": "2500 TL - 7000 TL",
                "count": 0
            },
            {
                "id": "7000-900000",
                "name": "7000 TL - 900000 TL",
                "count": 0
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "filters"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 503 | Upstream Unavailable | Trendyol could not be reached after several tries. This response is not billable. Retry shortly. |

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