Skip to main content

Encar Parser – Official Python Client Parser for Carapis Encar API

PyPI version API Docs License: MIT Carapis Catalog

Encar Parser is the official Python client for the Carapis Encar API, acting as a powerful parser to provide seamless programmatic access to real-time Korean used car data from Encar.com. With the encar parser library, you can easily query, filter, and analyze vehicle listings, manufacturers, models, and more – all powered by the robust Carapis Encar API provided by Carapis.com.

Explore a live catalog powered by this Carapis Encar API: Carapis Catalog

Features

  • Easy access and parsing of real-time Encar.com vehicle data via the Carapis Encar API client parser.
  • List, filter, and retrieve detailed car listings using the Carapis Encar API parser features.
  • Fetch manufacturer, model, and vehicle details programmatically (using slugs for catalog items)
  • Supports advanced search queries for the Carapis Encar API
  • Free tier available for testing the Carapis Encar API (up to 1,000 vehicles)

Installation

Install the encar library parser using pip. Dependencies are handled automatically.

pip install encar

Configuration

  1. API Key (Optional): For full access to the Carapis Encar API, an API key is recommended. Get yours at Carapis.com Pricing.

    If an API key is not provided, the client parser will operate in Free Tier mode, limited to accessing the latest 1,000 vehicles. Retrieve your API key from a secure location, such as environment variables, if you use one.

How to use Encar API (Python Client Parser)

Initialize the client parser and make Carapis Encar API calls.

import os
from encar import CarapisClient, CarapisClientError

# --- Option 1: Initialize with API Key (Recommended for full access) ---
API_KEY = os.getenv("CARAPIS_API_KEY") # Or get from a secure source
client_with_key = CarapisClient(api_key=API_KEY)

# --- Option 2: Initialize without API Key (Free Tier - Limited Access) ---
client_free_tier = CarapisClient() # No api_key provided


# --- Proceed with Encar API calls using either client parser ---

# Example API call using the free tier client:
# vehicles = client_free_tier.list_vehicles(limit=3)
# Process vehicles['results'] (limited to latest 1000)

Encar API Python Usage Examples (Parser)

Below are examples for querying the Carapis Encar API using this client parser.

List Vehicles via Encar API Parser

Retrieve a list of vehicles with filtering. Uses slugs for manufacturer/model group/model.

# Assuming 'client' is an initialized CarapisClient instance
vehicles_response = client.list_vehicles(
    limit=5,
    min_year=2021,
    fuel_type='gasoline',
    manufacturer_slug='hyundai',
    model_group_slug='sonata',
    max_mileage=50000,
    ordering='-created_at'
)
# Process vehicles_response['results'] (list of vehicles)
# vehicles_response also contains 'count', 'page', 'pages', 'limit'

Get Vehicle Details via Encar API Parser

Retrieve details for a specific vehicle by its vehicle_id.

# Assuming 'client' is an initialized CarapisClient instance
vehicle_id_to_get = 38481829 # Replace with a valid ID
vehicle_details = client.get_vehicle(vehicle_id=vehicle_id_to_get)
# Process vehicle_details (dictionary with vehicle data)

List Manufacturers via Encar API Parser

Retrieve a list of vehicle manufacturers.

# Assuming 'client' is an initialized CarapisClient instance
manufacturers_response = client.list_manufacturers(country='KR', limit=10)
# Process manufacturers_response['results'] (list of manufacturers)
# manufacturers_response also contains 'count', 'page', 'pages', 'limit'

Get Manufacturer Details via Encar API Parser

Retrieve details for a specific manufacturer by its slug.

# Assuming 'client' is an initialized CarapisClient instance
manufacturer_slug = 'hyundai' # Example slug
manufacturer_info = client.get_manufacturer(slug=manufacturer_slug)
# Process manufacturer_info (dictionary with manufacturer data)

Get Manufacturer Stats via Encar API Parser

Retrieve overall statistics about manufacturers.

# Assuming 'client' is an initialized CarapisClient instance
mfr_stats = client.get_manufacturer_stats()
# Process mfr_stats (dictionary with statistics)

List Model Groups via Encar API Parser

Retrieve a list of model groups, filtered by manufacturer's slug.

# Assuming 'client' is an initialized CarapisClient instance
manufacturer_slug_for_groups = 'hyundai' # Example slug
model_groups_response = client.list_model_groups(manufacturer__slug=manufacturer_slug_for_groups, search='Sonata', limit=5)
# Process model_groups_response['results'] (list of model groups)
# model_groups_response also contains 'count', 'page', 'pages', 'limit'

Get Model Group Details via Encar API Parser

Retrieve details for a specific model group by its slug.

# Assuming 'client' is an initialized CarapisClient instance
model_group_slug = 'sonata' # Example slug
model_group_info = client.get_model_group(slug=model_group_slug)
# Process model_group_info (dictionary with model group data)

List Models via Encar API Parser

Retrieve a list of specific vehicle models, filtered by model group's slug.

# Assuming 'client' is an initialized CarapisClient instance
model_group_slug_for_models = 'sonata' # Example slug
models_response = client.list_models(model_group__slug=model_group_slug_for_models, search='DN8', limit=5)
# Process models_response['results'] (list of models)
# models_response also contains 'count', 'page', 'pages', 'limit'

Get Model Details via Encar API Parser

Retrieve details for a specific vehicle model by its slug.

# Assuming 'client' is an initialized CarapisClient instance
model_slug = 'sonata-dn8' # Example slug
model_info = client.get_model(slug=model_slug)
# Process model_info (dictionary with model data)

Metadata

Release files for encar 0.1.4

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 0.1.4
File Size Uploaded
encar-0.1.4.tar.gz 18.6 kB Details

Built distribution (wheel)

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

Total release size: 32.6 kB

Release files / encar-0.1.4.tar.gz

Download URL encar-0.1.4.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
acd15464d1ab24ccd9d32febf9bf355271c905d0e6484f4afd81d03c9f3fd98d
BLAKE2b-256 checksum
How to use checksums
aae1bf68325701143a649a31b379096b1cd66ec236026df70d2572f977f835ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.7 Darwin/23.3.0

Release files / encar-0.1.4-py3-none-any.whl

Download URL encar-0.1.4-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d443401fa6fecc23330d71bf724884303c3488cd956c8eb325a957594fea1aba
BLAKE2b-256 checksum
How to use checksums
bda8bee90e5e833bed86fb5dc0ec91a2bad7be7df1a9da81582aaa6327027eb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.7 Darwin/23.3.0

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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