che168-api — Che168 API client for Python
che168-api gives you Chinese used-car listings from Che168 as clean JSON through the apiauto.space
REST API, without writing or maintaining a scraper. Search by make, model, year, price and mileage, page
through the whole catalog, fetch one listing by its number and follow a feed of new cars, cars taken off sale
and price changes.
It is a thin layer over the general apiauto-space client with
the market preset to cn, plus types for the Che168-only fields. It comes from the apiauto.space team;
the project is not affiliated with Che168 or Autohome.
- Sync
ClientandAsyncClient, retries on 429 and 5xx, one exception class per API error car("59997075")takes the Che168 listing number as well as the record idChe168Rawtypes for the Che168-only fields incar["raw"]- Python 3.10+,
py.typed, checked withmypy --strict
Install
pip install che168-api
The module you import is che168_api.
Get a key
Open the Telegram bot @apiautospace_bot and take a free demo key: one day, 100 data requests, up to 20 cars per request. Paid plans are on the pricing page.
Save the key in the APIAUTO_KEY environment variable — the client reads it from there:
export APIAUTO_KEY="your-key"
Keep the key on your server: the API does not accept browser requests.
Quick start
import che168_api
with che168_api.Client() as client: # reads APIAUTO_KEY
page = client.cars(brand="BYD", year_min=2020, limit=20)
for car in page["items"]:
print(car["id"], car["title"], car["price"]["amount"], car["price"]["currency"])
one = client.car("59997075") # a listing number or "che168:59997075"
print(one["listing_url"], one["photos"][:1])
A record looks like this (shortened; real values from the catalog):
{
"id": "che168:59997075",
"market": "cn",
"source": "che168",
"source_id": "59997075",
"title": "2023 Lincoln Navigator",
"brand": "Lincoln",
"model": "Navigator",
"year": 2023,
"mileage_km": 80000,
"fuel": "gasoline",
"transmission": "automatic",
"body_type": "suv",
"price": {
"amount": "136000.00",
"currency": "CNY"
},
"price_usd": "20298.27",
"location": {
"country": "CN",
"region": null,
"city": "Shenzhen"
},
"listing_url": "https://www.che168.com/dealer/534107/59997075.html",
"is_active": true,
"first_seen_at": "2026-09-22T16:29:11.202005Z",
"photos": [
"https://api.apiauto.space/img/che168:59997075/1.jpg?exp=...&sig=..."
],
"raw": {
"che168_infoid": "59997075",
"power_hp": 261,
"drive": "awd",
"first_registration": "2023-09-01",
"imported": false
}
}
Every record has the same keys as in the other apiauto.space markets; a value the source does not provide is
None. Prices are decimal strings in CNY, price_usd is converted at the ECB daily rate.
Methods
| Method | What it does | Quota |
|---|---|---|
cars(**filters) |
One page of Che168 cars: brand, model, year_min, year_max, price_min, price_max, mileage_max, fuel, body_type, sort, limit, cursor |
Cars returned |
iter_cars(max_items=None, **filters) |
Every matching car, page after page | Cars returned |
car(listing) |
One car by listing number or id, including cars taken off sale in the last 14 days | 1 record |
changes(since, type=None) / iter_changes(...) |
Feed of added, disappeared, price_drop, price_up events |
Events returned |
brands() / models(brand) |
Makes and models with car counts | Free |
status() |
Plan access, data age and the number of active cars of the market | Free |
usage() |
Your plan, its term and the quota spent | Free |
The general client is at client.core for anything else. Errors are the apiauto exceptions, re-exported
here: QuotaExceededError, RateLimitError, NotFoundError, AuthenticationError and the rest.
Che168-only fields
from che168_api import raw
extra = raw(car) # typed as Che168Raw
print(extra.get("source_values"))
Che168Raw lists the keys with comments; every key is optional, so read them with .get.
Links
- Che168 API on apiauto.space and the API documentation
apiauto-space: the general client for all markets- Clients for the other sources:
encar-api-client,copart-api,iaai-api - Examples in curl, Python, JavaScript and PHP
- The JavaScript version of this client:
che168-apion npm
License
MIT. Che168 is a trademark of its owner; it is named here only to say which listings the client returns.
Metadata
Release files for che168-api 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| che168_api-0.1.0.tar.gz | 9.9 kB | With provenance | Details for che168_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| che168_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for che168_api-0.1.0-py3-none-any.whl |
Total release size: 19.1 kB
Release files / che168_api-0.1.0.tar.gz
| Download URL | che168_api-0.1.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0166dc895f31f16a0c5928ccb432456b0591037be54c8b64058e5b3aa154c3d
|
|
BLAKE2b-256 checksum How to use checksums |
31abd10ec7d6d81c8b226349bb624ebaaf277b7d14cb567b68f192bed7e80dd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logRelease files / che168_api-0.1.0-py3-none-any.whl
| Download URL | che168_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ade0bf9abdb80b744c87c79753dcd2ed6b2412ddfb6e7fb4b005f5b0b62690fa
|
|
BLAKE2b-256 checksum How to use checksums |
2387cb744e1117a3d216c2b63749f4ae6957595d0489eaf13f90e48dc8096106
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logSecurity for che168-api 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for che168_api-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.