{
  "openapi": "3.0.1",
  "info": {
    "title": "Korean & Chinese Used Cars API (Encar, Dongchedi, Che168)",
    "description": "Live used car listings from South Korea (Encar, KB Chachacha, K Car) and China (Dongchedi, Che168) via the official EnCarAPI. Requires your EnCarAPI key.",
    "version": "0.0",
    "x-build-id": "oCivcTXY5Pbn2ftMs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/encarapi~korean-chinese-used-cars-encarapi/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-encarapi-korean-chinese-used-cars-encarapi",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/encarapi~korean-chinese-used-cars-encarapi/runs": {
      "post": {
        "operationId": "runs-sync-encarapi-korean-chinese-used-cars-encarapi",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/encarapi~korean-chinese-used-cars-encarapi/run-sync": {
      "post": {
        "operationId": "run-sync-encarapi-korean-chinese-used-cars-encarapi",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "apiKey": {
            "title": "EnCarAPI or ChinaCarAPI key",
            "type": "string",
            "description": "Your API key from https://encarapi.com/?utm_source=apify&utm_medium=encarapi-apify&utm_content=input#pricing (Korea) or https://chinacarapi.com/?utm_source=apify&utm_medium=encarapi-apify&utm_content=input#pricing (China). EnCarAPI keys with the China add-on work for both markets. Without a key the Actor only returns a demo item explaining how to get one."
          },
          "market": {
            "title": "Market",
            "enum": [
              "korea",
              "china"
            ],
            "type": "string",
            "description": "Korea: Encar, KB Chachacha, K Car. China: Dongchedi, Che168.",
            "default": "korea"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "details"
            ],
            "type": "string",
            "description": "Search listings, or fetch full details for a list of vehicle ids.",
            "default": "search"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many listings.",
            "default": 100
          },
          "koreaSource": {
            "title": "Korean marketplace",
            "enum": [
              "encar",
              "kbc",
              "kcar",
              "all"
            ],
            "type": "string",
            "description": "Encar is included in every plan. KB Chachacha, K Car and the deduplicated union depend on your plan (see encarapi.com/#pricing).",
            "default": "encar"
          },
          "manufacturer": {
            "title": "Brand",
            "type": "string",
            "description": "English brand name, e.g. Hyundai, Kia, Genesis, BMW. Comma-separated = OR."
          },
          "modelGroup": {
            "title": "Model",
            "type": "string",
            "description": "Model line, e.g. Sorento, Grandeur, 5 Series."
          },
          "modelSearch": {
            "title": "Free-text model search",
            "type": "string",
            "description": "Cross-brand search, e.g. 'GV80' or 's63 coupe'."
          },
          "minYear": {
            "title": "Min year",
            "type": "integer",
            "description": "Model year (4 digits)."
          },
          "maxYear": {
            "title": "Max year",
            "type": "integer",
            "description": "Model year (4 digits)."
          },
          "maxPriceManwon": {
            "title": "Max price (10,000 KRW)",
            "type": "integer",
            "description": "Korean prices are in 만원: 3000 = 30,000,000 KRW."
          },
          "maxMileage": {
            "title": "Max mileage (km)",
            "type": "integer",
            "description": "Maximum mileage in km."
          },
          "frameClean": {
            "title": "Accident-free chassis only",
            "type": "boolean",
            "description": "Only cars with a clean chassis frame.",
            "default": false
          },
          "chinaSource": {
            "title": "Chinese marketplace",
            "enum": [
              "all",
              "dongchedi",
              "che168"
            ],
            "type": "string",
            "description": "Dongchedi, Che168 or both (duplicates across the two are removed). The free Dev plan covers Dongchedi only. In details mode this picks the marketplace for ids that exist on both.",
            "default": "all"
          },
          "chinaMake": {
            "title": "Brand (China)",
            "type": "string",
            "description": "English brand name, e.g. BYD, Toyota."
          },
          "chinaModel": {
            "title": "Model (China)",
            "type": "string",
            "description": "Model name."
          },
          "chinaPriceMaxCny": {
            "title": "Max price (CNY)",
            "type": "integer",
            "description": "Maximum price in CNY."
          },
          "chinaMinYear": {
            "title": "Min year (China)",
            "type": "integer",
            "description": "Model year (4 digits)."
          },
          "chinaMaxYear": {
            "title": "Max year (China)",
            "type": "integer",
            "description": "Model year (4 digits)."
          },
          "chinaMaxMileage": {
            "title": "Max mileage (China, km)",
            "type": "integer",
            "description": "Maximum mileage in km."
          },
          "chinaCity": {
            "title": "City (China)",
            "type": "string",
            "description": "City where the car is offered, as listed in /api/enums (cities[].value, e.g. 上海 for Shanghai)."
          },
          "chinaFuel": {
            "title": "Fuel (China)",
            "type": "string",
            "description": "Fuel type in English or Chinese, e.g. Petrol, Electric, Plug-in hybrid (see /api/enums)."
          },
          "exportReady": {
            "title": "Export-ready only",
            "type": "boolean",
            "description": "Only Chinese cars that can be exported now.",
            "default": false
          },
          "chinaHasReport": {
            "title": "With inspection report only",
            "type": "boolean",
            "description": "Only Chinese cars that have an inspection report.",
            "default": false
          },
          "vehicleIds": {
            "title": "Vehicle ids (details mode)",
            "type": "array",
            "description": "Ids from a search. Korea: Encar id, kbc:<id> or kcar:<id>. China: the Dongchedi or Che168 listing id (set Chinese marketplace for ids that exist on both).",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}