# Trip.com Hotel Filters API Documentation

<p><strong>Trip.com Hotel Filters API Documentation</strong> List the filters and sorts that the hotel search accepts for one city and stay. Each filter has the name of the search parameter and its options with the label of the site in the chosen locale. Use the values as parameters of the hotel search: stars, guest_score_min, free_cancellation, breakfast and sort. The list has ids and labels only. Trip.com gives no hotel count per filter and no district or zone ids. Cost: 1 credit. A failed request is not billed.</p>

- **Documentation:** [https://scrappa.co/docs/tripcom-api/tripcom_hotels_filters](https://scrappa.co/docs/tripcom-api/tripcom_hotels_filters)
- **API group:** Trip.com API
- **Endpoint:** `GET https://scrappa.co/api/tripcom/hotels/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 |
| --- | --- | --- | --- |
| `city_id` | string | Yes | Trip.com city id from the suggest endpoint. Example: 192 for Paris. |
| `check_in` | string | Yes | Check-in date, YYYY-MM-DD, today or later. Example: 2027-03-14. |
| `check_out` | string | Yes | Check-out date, YYYY-MM-DD, after check-in, at most 30 nights. Example: 2027-03-16. |
| `currency` | string | No | Price currency: USD, EUR, GBP, JPY or KRW. Defaults to USD. Every price in the answer has this currency. |
| `locale` | string | No | Site language: en, en-gb, de, fr, ja, ko or zh-hk. Defaults to en. |

## Example response

```json
{
    "data": {
        "count": 5,
        "locale": "en",
        "city_id": "192",
        "filters": [
            {
                "options": [
                    {
                        "label": "5",
                        "value": 5
                    },
                    {
                        "label": "4",
                        "value": 4
                    },
                    {
                        "label": "3",
                        "value": 3
                    },
                    {
                        "label": "2",
                        "value": 2
                    },
                    {
                        "label": "1",
                        "value": 1
                    }
                ],
                "multiple": true,
                "parameter": "stars"
            },
            {
                "options": [
                    {
                        "label": "Great 9+",
                        "value": 9
                    },
                    {
                        "label": "Very Good 8+",
                        "value": 8
                    },
                    {
                        "label": "Good 7+",
                        "value": 7
                    },
                    {
                        "label": "Pleasant 6+",
                        "value": 6
                    }
                ],
                "multiple": false,
                "parameter": "guest_score_min"
            },
            {
                "options": [
                    {
                        "label": "Free cancellation",
                        "value": true
                    }
                ],
                "multiple": false,
                "parameter": "free_cancellation"
            },
            {
                "options": [
                    {
                        "label": "Breakfast included",
                        "value": true
                    }
                ],
                "multiple": false,
                "parameter": "breakfast"
            },
            {
                "options": [
                    {
                        "label": "Trip.com recommended",
                        "value": "popularity"
                    },
                    {
                        "label": "Price (low to high)",
                        "value": "price_asc"
                    },
                    {
                        "label": "Price (high to low)",
                        "value": "price_desc"
                    },
                    {
                        "label": "Top reviewed",
                        "value": "top_reviewed"
                    },
                    {
                        "label": "Star rating",
                        "value": "stars"
                    },
                    {
                        "label": "Distance",
                        "value": "distance"
                    }
                ],
                "multiple": false,
                "parameter": "sort"
            }
        ],
        "check_in": "2027-03-14",
        "currency": "USD",
        "check_out": "2027-03-16"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "hotel_filters"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 502 | Unexpected Upstream Answer | Trip.com answered with a page or payload Scrappa cannot read. This response is not billable. Retry later. |
| 503 | Upstream Unavailable | Trip.com did not answer after one retry. This response is not billable. Retry later. |

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