Skip to main content

ChinaCarAPI: Python client for Chinese car data (Dongchedi API, Che168 API)

Official Python client for ChinaCarAPI, a REST China car API for the Chinese used-car market. One API for Dongchedi (懂车帝) and Che168 (车168, Autohome): 400,000+ listings with price, mileage, first registration, seller, photos, inspection reports (accident, flood, fire, EV battery), price history and export status. Delivered in English, with the original Chinese kept alongside.

Built for car exporters, importers, dealers and marketplaces that need reliable Chinese car data without scrapers, captchas, proxies or Chinese-language parsing.

A ChinaCarAPI key is required. The API and its data are a paid service. This client only works with a key from chinacarapi.com (5-day trial available). EnCarAPI keys with the China add-on work as well.

Install

pip install chinacarapi

Requires Python 3.8+.

This package is the China entry point of encarapi, the official client for Korean and Chinese used car data. Need both markets? Use EnCarAPI(key) with client.korea and client.china (exported here as well).

Quick start

from chinacarapi import ChinaCarAPI

# Get your key at https://chinacarapi.com
client = ChinaCarAPI("YOUR_API_KEY")  # or set CHINACARAPI_KEY

# Export-ready BYDs, cheapest first, from both marketplaces (duplicates merged)
page = client.catalog(make="BYD", export_ready=True, sort="price_asc", limit=25)

# Full record: price history, photos, seller, alsoListedOn (same car on the other marketplace)
car = client.vehicle(page["results"][0]["id"])

# Inspection report: accident, flood and fire checklist, battery data for EVs
report = client.inspection(page["results"][0]["id"])

Without a valid key every call raises a ChinaCarAPIError pointing to chinacarapi.com. There is no free data in this package, only a clean client for the paid API.

API

Method Endpoint Description
client.catalog(**filters) GET /api/catalog Search and filter listings (Dongchedi + Che168)
client.vehicle(id) GET /api/vehicle/:id Full record of one car
client.vehicle_by_url(url) GET /api/vehicle/by-url Same record by Che168/Dongchedi listing link (desktop, mobile or app)
client.inspection(id) GET /api/inspection/:id Inspection report
client.specs(trim_id, **params) GET /api/specs/:trimId Autohome trim sheet of a Che168 car (cc, kW, hp, torque, emission standard, weights, EV battery)
client.spec_fields(**params) GET /api/specs/fields Label, unit and group for every key of a record's specs object; lang="ru" or "zh" for Russian or Chinese
client.bulk(ids) POST /api/vehicle/bulk Up to 500 records per call
client.changes(since=... | cursor=...) GET /api/catalog/changes Change feed: new cars, price changes, removals
client.export_csv(**params) GET /api/catalog/export Full catalog as CSV text
client.export_to_file(path, **params) GET /api/catalog/export Full catalog streamed to a file (not held in memory): {"path", "bytes", "generated_at"}
client.enums(**params) GET /api/enums Makes, fuels, cities, sources with counts
client.models(make) GET /api/models Models of one make

Catalog filters: source (dongchedi, che168), duplicates=include, make, model, year_min/year_max, reg_year_min/reg_year_max, price_min/price_max (CNY), mileage_max, power_min/power_max (hp), city, fuel, has_report, export_ready (China's 180-day rule for used-car exports), updated_since, sort, page, limit, lang.

Languages: lang="zh" returns the original Chinese values, lang="ru" Russian values for the fixed fields (fuel, transmission, drivetrain, colours, seller type, condition, vehicle class), city names and equipment names; make, model and trim names stay Latin. Works on catalog, vehicle, vehicle_by_url, bulk and specs. enums(lang="ru") adds nameRu to fuels and cities, export_csv(lang="ru") and export_to_file(path, lang="ru") return the label columns in Russian. With lang="ru" the text values of specs are Russian as well (energy type, transmission, drive, aspiration, body type, emission standard, warranties, motor and battery type); a value without a Russian term stays English. spec_fields(lang=...) returns the label, unit and group of every specs key in English, Russian or Chinese.

Full reference (OpenAPI 3.1, 13 languages): chinacarapi.com/documentation

Keeping a local copy

Export to a file, start the change feed at the export's timestamp, then keep the cursor (Business/Scale):

# 1) Baseline, streamed to disk; generated_at = the export's x-generated-at header
export = client.export_to_file("china-catalog.csv")   # {"path", "bytes", "generated_at"}
import_csv(export["path"])                             # your import: upsert by source + id

# 2) First sync from the export's timestamp (not the time of your download)
for change in client.iterate_changes(since=export["generated_at"]):
    # change["type"]: "new" | "price" | "removed" | "relisted"; apply idempotently
    ...
save_cursor(client.last_cursor)

# 3) Then every few minutes from the saved cursor
for change in client.iterate_changes(cursor=load_cursor()):
    ...
save_cursor(client.last_cursor)

generated_at lies a few minutes before the file's data snapshot, so the first feed page can repeat a few events that are already in the file: apply them as upserts.

Why ChinaCarAPI?

  • Dongchedi API and Che168 API in one: the same car listed on both is merged and linked.
  • English output: official English make and model names, translated trims and inspection findings.
  • Export status: ready-made filter for China's 180-day rule on used-car exports.
  • Plans from €99/month, 5-day trial for €9.99. EnCarAPI (Korea) customers add China from €39/month.

Korean car data: see EnCarAPI and its Python client.

License

MIT for this client. The data is only available through a ChinaCarAPI subscription.

Metadata

Release files for chinacarapi 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chinacarapi 1.3.0
File Size Uploaded Provenance Actions
chinacarapi-1.3.0.tar.gz 5.0 kB Without provenance Details for chinacarapi-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chinacarapi 1.3.0
File Interpreter ABI Platform Actions
chinacarapi-1.3.0-py3-none-any.whl Python 3 none any Details for chinacarapi-1.3.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / chinacarapi-1.3.0.tar.gz

Download URL chinacarapi-1.3.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5c781271c001df0a881c7eaa9927ced31994e81a8f3b1457eef59f12416de9c
BLAKE2b-256 checksum
How to use checksums
0d33ac6122d8e56ac0cd9116c56f3262761fdc21d5ddd802552d60d76ed33dea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / chinacarapi-1.3.0-py3-none-any.whl

Download URL chinacarapi-1.3.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4882ce99aa159594118dc0a8bf5c25034c93d1bd2526d6676a3837b6607da04
BLAKE2b-256 checksum
How to use checksums
54c39b9f650b69d4facc48c872ad386a5095e6788aa8f86f966bb26fc435621d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for chinacarapi 1.3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page