> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xapichina.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Filters and pagination

> Search Che168 listings with supported filters and CNY or EUR budgets.

## Discover valid values

`GET /v1/filters?lang=en` is public and lists manufacturers, fuel types, transmissions, body styles, and sort options. Use [model discovery](/makes-and-models) before narrowing a search to a model.

## Supported search parameters

| Parameter | Behavior |
| - | - |
| `brand` | Chinese or supported English manufacturer name, catalog ID, or pinyin |
| `model` | Chinese or supported English model name or keyword |
| `q` | Raw Che168 keyword; use structured filters when possible |
| `age_min`, `age_max` | Vehicle age in years, from 0 to 100; supplied `age_max` must be positive |
| `mileage_min`, `mileage_max` | Kilometers, in multiples of 10,000; supplied `mileage_max` must be positive |
| `price_min`, `price_max` | Nonnegative price bounds in the selected currency |
| `currency` | `cny` by default; `eur` converts budget bounds to source-price steps |
| `fuel_type` | Comma-separated `gasoline`, `diesel`, `hybrid`, `new_energy` |
| `transmission` | `manual` or `automatic` |
| `body_style` | One supported value from `/v1/filters` |
| `sort` | `default`, `price_asc`, `price_desc`, `newest`, `youngest`, `mileage_asc` |
| `page` | Search page, from 1 to 1000 |
| `lang` | `en` by default, or `zh`; applies to search output |

For each range, the minimum must not exceed the maximum. Unsupported filter values or granularity return `422`.

## CNY budgets

CNY price bounds must be multiples of 10,000:

```bash theme={"system"}
curl --fail-with-body \
  "https://api.xapichina.com/v1/search?brand=BMW&price_min=100000&price_max=200000&currency=cny&sort=price_asc" \
  -H "X-API-Key: $XAPICHINA_API_KEY"
```

## EUR budgets

With `currency=eur`, the API converts the minimum upward and the maximum downward to Che168's 10,000-CNY filter steps. This can exclude listings near the edges of your requested EUR budget. An interval with no supported steps returns no matches.

```bash theme={"system"}
curl --fail-with-body \
  "https://api.xapichina.com/v1/search?brand=BMW&currency=eur&price_min=15000&price_max=30000" \
  -H "X-API-Key: $XAPICHINA_API_KEY"
```

`currency` controls filtering. Listings still return `price_cny` and a nullable `price_eur`.

## Pagination

Search has a fixed page size of 24. The response supplies `total_count`, `page`, `limit`, `results`, and `next_page`. Request the returned `next_page` until it is `null`, keeping the same filters on each request. Do not send Korea's search `limit`, `year_from`, or `year_to` parameters.

Inventory can change between requests; deduplicate stored results by listing ID. Each successful page request consumes one data request.

## Count matches

`GET /v1/search/count` accepts the same structured filters and returns `{"count": ...}`. It does not accept search `page` or `lang` and counts as a separate data request.

```bash theme={"system"}
curl --fail-with-body \
  "https://api.xapichina.com/v1/search/count?brand=BMW&currency=cny&price_max=200000" \
  -H "X-API-Key: $XAPICHINA_API_KEY"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.