EnCarAPI: Python client for Korean and Chinese used car data
Official Python client for EnCarAPI, the REST Encar API and Korean Car API. One package for:
- Korea: Encar.com, KB Chachacha (
source="kbc") and K Car (source="kcar"), with photos, specs, options, inspection reports, accident and ownership records, condition reports, price history, a change feed and full catalog export. - China: Dongchedi and Che168 in English via ChinaCarAPI (separate key or the China add-on for EnCarAPI keys).
Built for car exporters, dealers and marketplaces that need reliable used car data without scraping, proxies or geo-blocks.
An API key is required. The data is a paid service. Get a key (5-day trial) at encarapi.com.
Install
pip install encarapi
Requires Python 3.8+ and requests.
Quick start
from encarapi import EnCarAPI
client = EnCarAPI("YOUR_API_KEY") # or set ENCARAPI_KEY
# Search Korean listings with flat English filters
cars = client.korea.catalog(
manufacturer="Hyundai",
max_mileage=60000,
frame_clean=True, # accident-free chassis only
lang="en",
count=True,
)
print(cars["Count"], cars["SearchResults"][0])
# Full detail, inspection report and insurance record for one car
detail = client.korea.vehicle("12345678")
inspection = client.korea.inspection("12345678")
record = client.korea.record("12345678")
# KB Chachacha and K Car listings, or all three marketplaces deduplicated
kbc = client.korea.catalog(source="kbc", limit=20)
everything = client.korea.catalog(source="all", count=True)
# Chinese listings (Dongchedi + Che168)
byd = client.china.catalog(make="BYD", export_ready=True, limit=25)
Keep a local copy in sync (Business / Scale)
csv_text = client.korea.export_csv() # 1) baseline
for change in client.korea.iterate_changes(cursor=saved_cursor or 0): # 2) deltas
# change["type"]: "added" | "updated" | "reappeared" | "removed"
...
save_cursor(client.korea.last_cursor)
The China API works the same way (client.china); its events are
{"id", "source", "vehicleId", "type": "new" | "price" | "removed" | "relisted", "oldPrice", "newPrice", "at"}:
for change in client.china.iterate_changes(cursor=saved_cursor or 0):
# change["type"]: "new" | "price" | "removed" | "relisted"
...
save_cursor(client.china.last_cursor)
Korea API (client.korea)
| Method | Endpoint | Notes |
|---|---|---|
catalog(**params) |
GET /api/catalog |
Search & list. source: encar (default), kbc, kcar, all |
iterate_catalog(**params) |
GET /api/catalog |
Generator over all pages |
iterate_catalog_by_id(**params) |
GET /api/catalog?sort=id |
Complete, stable traversal (keyset cursor, nothing repeated or skipped) |
leasing(**params) |
GET /api/catalog/leasing |
Lease takeovers and rentals |
iterate_leasing_by_id(**params) |
GET /api/catalog/leasing?sort=id |
Complete, stable traversal of lease/rental listings |
vehicle_by_vin(vin) |
GET /api/vehicle/by-vin/{vin} |
All listings of one VIN incl. removed ones (Business/Scale) |
trucks(**params) |
GET /api/catalog/trucks |
Trucks, buses and special vehicles (Business/Scale) |
truck(id) |
GET /api/catalog/trucks/{id} |
One truck with detail, inspection report, cargo box, VIN and plate |
truck_enums() |
GET /api/catalog/trucks/enums |
Truck filter values with counts |
trucks_csv() |
GET /api/catalog/trucks/export |
Full truck inventory CSV (Business/Scale) |
iterate_trucks_by_id(**params) |
GET /api/catalog/trucks?sort=id |
Complete, stable traversal of the truck catalog |
equipment(**params) |
GET /api/catalog/equipment |
Used excavators (Business/Scale) |
equipment_enums() |
GET /api/catalog/equipment/enums |
Equipment filter values with counts |
equipment_csv() |
GET /api/catalog/equipment/export |
Full equipment inventory CSV (Business/Scale) |
iterate_equipment_by_id(**params) |
GET /api/catalog/equipment?sort=id |
Complete, stable traversal of the equipment catalog |
nav(**params) |
GET /api/nav |
Filter facets with counts |
enums(**params) |
GET /api/enums |
Valid values for the flat filters |
model_search(search, **params) |
GET /api/model-search |
Model autocomplete |
vehicle(id) |
GET /api/vehicle/{id} |
Ids: Encar id, kbc:<id>, kcar:<id> |
inspection(id) |
GET /api/inspection/{id} |
Official inspection report |
record(id) |
GET /api/record/{id} |
Accident & ownership record |
refresh(id) |
POST /api/vehicle/{id}/refresh |
On-demand refresh (daily quota) |
price_check(id) |
GET /api/price-check/{id} |
Market estimate (beta, Scale) |
bulk_vehicles(ids) / bulk_inspections(ids) / bulk_records(ids) |
POST /api/.../bulk |
Up to 500 ids (Business/Scale) |
inspection_versions(id) / record_versions(id) |
GET /api/.../versions |
Report history (Business/Scale) |
changes(**params) / iterate_changes(**params) |
GET /api/catalog/changes |
Incremental sync (Business/Scale) |
export_csv(**params) |
GET /api/catalog/export |
Full catalog CSV (Business/Scale); sell_type="lease,rental" for lease/rental |
makes_csv() / models_csv() / badges_csv() |
GET /api/taxonomy/*.csv |
Reference data |
China API (client.china)
| Method | Endpoint | Notes |
|---|---|---|
catalog(**params) |
GET /api/catalog |
make, price_min/max (CNY), export_ready, sort, ... |
iterate_catalog(**params) |
GET /api/catalog |
Generator over all pages (up to the 10,000-result depth limit) |
vehicle(id) |
GET /api/vehicle/{id} |
Price history, photos, seller, export status |
inspection(id) |
GET /api/inspection/{id} |
Accident, flood and fire checks, EV battery data |
specs(trim_id) |
GET /api/specs/{trimId} |
Autohome trim sheet of a Che168 car: cc, kW, hp, torque, emission standard, weights, EV battery |
bulk_vehicles(ids) |
POST /api/vehicle/bulk |
Up to 500 ids |
changes(**params) / iterate_changes(**params) |
GET /api/catalog/changes |
Change feed (Business/Scale) |
export_csv() |
GET /api/catalog/export |
Full catalog CSV |
enums() / models(make) |
GET /api/enums, /api/models |
Filter values, models per make |
China only? from encarapi import ChinaCarAPI (also available as the
chinacarapi package).
Errors
Every failed request raises EnCarAPIError with status and the raw body. A 403 on a
plan-gated endpoint includes an upgrade hint from the API.
from encarapi import EnCarAPIError
try:
client.korea.changes(cursor=0)
except EnCarAPIError as e:
if e.status == 403:
print("Plan does not include this endpoint:", e.body)
Links
- Website and pricing: encarapi.com
- Documentation: encarapi.com/documentation
- OpenAPI reference: https://api.encarapi.com/reference
- China data: chinacarapi.com
- Node.js client: https://github.com/ThatMojo/encarapi-node
EnCarAPI is an independent service and not affiliated with Encar, KB Chachacha, K Car, Dongchedi or Che168.
License
MIT
Metadata
Release files for encarapi 1.4.1
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 | |
|---|---|---|---|---|
| encarapi-1.4.1.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| encarapi-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.5 kB
Release files / encarapi-1.4.1.tar.gz
| Download URL | encarapi-1.4.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbdd70afe1005935005ebf89815a68202232cd8d9918cffd66bb84bcc4d8131d
|
|
BLAKE2b-256 checksum How to use checksums |
acaf532d6a97a5dbd2bb7166eea012d3b6dd17b3898cb831a1a3f8b5dfed9b28
|
| 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 / encarapi-1.4.1-py3-none-any.whl
| Download URL | encarapi-1.4.1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d43035bfd43eca7e6f68c9490d37cba0e0b0c34ee3ea5a20c7c8f8a2edad6226
|
|
BLAKE2b-256 checksum How to use checksums |
5e0e2a28c670d902b43dcc19515fb833192997263d5f0d559d146d8bc05d6e1a
|
| 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 encarapi 1.4.1
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.