Skip to main content

encar-api-client — Encar API client for Python

PyPI version Python versions License: MIT

encar-api-client gives you South Korean used-car listings from Encar 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 kr, plus types for the Encar-only fields. It comes from the apiauto.space team; the project is not affiliated with Encar or SK Encar.

  • Sync Client and AsyncClient, retries on 429 and 5xx, one exception class per API error
  • car("42793038") takes the Encar listing number as well as the record id
  • EncarRaw types for the Encar-only fields in car["raw"]
  • Python 3.10+, py.typed, checked with mypy --strict

Install

pip install encar-api-client

The module you import is encar_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 encar_api

with encar_api.Client() as client:  # reads APIAUTO_KEY
    cars = list(client.iter_cars(max_items=20, brand="Hyundai", year_min=2020))
    for car in cars:
        print(car["id"], car["title"], car["price"]["amount"], car["price"]["currency"])

    # One car by its listing number, such as "42793038", or its id, such as "encar:42793038"
    one = client.car(cars[0]["source_id"])
    print(one["listing_url"], one["photos"][:1])

A record looks like this (shortened; real values from the catalog):

{
  "id": "encar:42793038",
  "market": "kr",
  "source": "encar",
  "source_id": "42793038",
  "title": "2021 BMW 1 Series (F40) 118d M Sport",
  "brand": "BMW",
  "model": "1 Series (F40)",
  "year": 2021,
  "mileage_km": 122866,
  "fuel": "diesel",
  "transmission": null,
  "body_type": null,
  "price": {
    "amount": "17990000.00",
    "currency": "KRW"
  },
  "price_usd": "13265.53",
  "location": {
    "country": "KR",
    "region": "Gyeonggi",
    "city": null
  },
  "listing_url": "https://fem.encar.com/cars/detail/42793038",
  "is_active": true,
  "first_seen_at": "2026-09-23T11:36:05.145090Z",
  "photos": [
    "https://api.apiauto.space/img/encar:42793038/1.jpg?exp=...&sig=..."
  ],
  "raw": {
    "badge": "118d M 스포츠",
    "sell_type": "normal",
    "office_city": "경기",
    "form_year": "202110"
  }
}

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 KRW, price_usd is converted at the ECB daily rate.

Methods

Method What it does Quota
cars(**filters) One page of Encar 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.

Encar-only fields

from encar_api import raw

extra = raw(car)  # typed as EncarRaw
print(extra.get("source_values"))

EncarRaw lists the keys with comments; every key is optional, so read them with .get.

License

MIT. Encar is a trademark of its owner; it is named here only to say which listings the client returns.

Metadata

Release files for encar-api-client 0.1.1

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

Source distribution (sdist)

Source distribution for encar-api-client 0.1.1
File Size Uploaded Provenance Actions
encar_api_client-0.1.1.tar.gz 10.1 kB With provenance Details for encar_api_client-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for encar-api-client 0.1.1
File Interpreter ABI Platform Actions
encar_api_client-0.1.1-py3-none-any.whl Python 3 none any Details for encar_api_client-0.1.1-py3-none-any.whl

Total release size: 19.5 kB

Release files / encar_api_client-0.1.1.tar.gz

Download URL encar_api_client-0.1.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54d22e67acf7cb12f89bdb0f21b582877e50bdfdb90cb8b3fafcfbe897d842cb
BLAKE2b-256 checksum
How to use checksums
f7278e06566dba910a7f5423f9a59c2f8f7b74557006a3880371268635be1cd2
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 log

Release files / encar_api_client-0.1.1-py3-none-any.whl

Download URL encar_api_client-0.1.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6477584e7a055ecbc84587e08f4ed8a92a309f6a461129fcf7e47fe59b5821dc
BLAKE2b-256 checksum
How to use checksums
1a1b24504c66c7121b003d7804010904c10237168e993259792e1bec3e3e7eed
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 log

Security for encar-api-client 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for encar_api_client-0.1.1.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 log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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