openapi: 3.0.0
info:
  title: 'MotorAPIs'
  contact:
    name: MotorAPIs support
  version: 1.0.0

servers:
  - url: 'https://motorapis.com/api/'

tags:
  - name: Main endpoints
  - name: Encar
    description: Encar (South Korea) is a car marketplace, not an auction. Its listings come through /cars (domain_id=12) and the lookups (encar_com); these endpoints exist only for it.
  - name: Additional endpoints

paths:
  /cars:
    get:
      description: 'Vehicles with active lots from every source enabled for your key, filtered and paged (50 per page by default; use page for the next results). Add minutes to get only recent changes. Each vehicle may contain lots[].seller_reserve. Seller reserve price, when available. Object with price (reserve amount) and updated_at (last reserve update timestamp, or null); seller_reserve is null when no reserve is available. This is not the current bid or a confirmed final sale price. Read it from the relevant lot. Example: {"price":8500,"updated_at":"2026-09-13T10:30:00.000000Z"}.'
      tags:
        - Main endpoints
      summary: get all cars
      operationId: 5c016f94af420eb75736c4c8d142203d
      parameters:
        - name: domain_id
          in: query
          description: "Source platform ID: 1=IAAI, 3=Copart, 12=Encar. Omit to use sources enabled for the key. Send one integer, not an array. Unsupported IDs return 400; sources outside your access return 401."
          required: false
          schema:
            type: integer
        - name: minutes
          in: query
          description: this parameter allows you to retrieve only those cars that have been updated in the last few minutes (max 4320 minutes)
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 4320
        - name: per_page
          in: query
          description: "Vehicles per page. Default: 50. Use page for the next results."
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
        - name: page
          in: query
          description: Optional page number, starting at 1 (default). Keep filters unchanged when requesting subsequent pages.
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: manufacturer_id
          in: query
          description: |
            Manufacturer ID(s) (number, comma-separated for multiple values, e.g. `16,88,...`).

            To get the ID, use the `/manufacturers` endpoint.
          required: false
          schema:
            type: string
        - name: model_id
          in: query
          description: Car model id, to get it use `/models` endpoint
          required: false
          schema:
            type: integer
        - name: generation_id
          in: query
          description: Car generation id, to get it use `/generations` endpoint
          required: false
          schema:
            type: integer
        - name: from_year
          in: query
          description: Filter from specific year
          required: false
          schema:
            type: integer
        - name: to_year
          in: query
          description: Filter to specific year
          required: false
          schema:
            type: integer
        - name: year
          in: query
          description: Filter with fixed year
          required: false
          schema:
            type: integer
        - name: vehicle_type
          in: query
          description: Vehicle type, automobile = 1, motorcycle = 2, atv = 5, watercraft = 12, jet_sky = 11, snow_mobile = 15, boat = 7, trailers = 3, mobile_home = 10, emergency_equipment = 13, industrial_equipment = 9, truck = 4, bus = 8, cargo_special_bus = 14
          required: false
          schema:
            type: integer
        - name: buy_now
          in: query
          description: Add buy_now=1 to get only cars with Buy Now price
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
        - name: search_query
          in: query
          description: Search query, can be Vin code or Lot number
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: One status ID. For multiple statuses use repeated status[] parameters, e.g. status[]=4&status[]=5. Do not combine status and status[].
          required: false
          schema:
            type: integer
        - name: status[]
          in: query
          required: false
          description: "Alternative to status: repeat this query parameter for multiple status IDs."
          schema:
            type: array
            items:
              type: integer
            minItems: 1
          style: form
          explode: true
        - name: vin
          in: query
          description: "VIN code to search, you can add _ in end or start of string, for example, search: NLM91_ to get all cars where VIN starts with NLM91"
          required: false
          schema:
            type: string
        - name: name
          in: query
          description: Search in Name of lot, for example Corvette will return all lots where Corvette is in title
          required: false
          schema:
            type: string
        - name: document_title
          in: query
          description: Search in Document title
          required: false
          schema:
            type: string
        - name: cylinders
          in: query
          description: Number of cylinders
          required: false
          schema:
            type: integer
        - name: engine_name
          in: query
          description: Search in name of engine
          required: false
          schema:
            type: string
        - name: body_type
          in: query
          description: "Filter by body type, possible values are: sedan = 1, wagon = 2, coupe = 3, pickup = 4, SUV = 5, cabrio = 6, VAN = 7, moto = 8, furgon = 9, combi = 10, hatchback = 11, roadster = 12, limousine = 13, truck = 14, bike = 15, sport bike = 16, roadster bike = 17, industrial = 18, bus = 19, liftback = 20, enduro bike = 21, hearse = 22, fire truck = 23, trailer = 24, tandem = 25, garbage = 26, sport_car = 27, other = 100"
          required: false
          schema:
            type: integer
        - name: color
          in: query
          description: "Filter by color, possible values are: silver = 1, purple = 2, orange = 3, green = 4, red = 5, gold = 6, charcoal = 7, brown = 8, grey = 9, turquoise = 10, blue = 11, bronze = 12, white = 13, cream = 14, black = 15, yellow = 16, beige = 17, pink = 18, two_colors = 100"
          required: false
          schema:
            type: integer
        - name: transmission
          in: query
          description: "Filter by transmission, possible values are: automatic = 1, manual = 2"
          required: false
          schema:
            type: integer
        - name: drive_wheel
          in: query
          description: "Filter by drive wheel, possible values are: rear = 1, front = 2, all = 3"
          required: false
          schema:
            type: integer
        - name: country
          in: query
          description: "Filter by country, for example use: US for United States, CA for Canada and KR for South Korea"
          required: false
          schema:
            type: string
        - name: state_code
          in: query
          description: "Filter by state code, for example use: CA for California or FL for Florida"
          required: false
          schema:
            type: string
        - name: fuel_type
          in: query
          description: "Filter by fuel type, possible values are: diesel = 1, electric = 2, hybrid = 3, gasoline = 4, gas = 5, flexible = 6, hydrogen = 7 Send a single integer; arrays are not supported."
          required: false
          schema:
            type: integer
        - name: condition
          in: query
          description: "Filter by condition, possible values are: run and drives = 0, for repair = 1, to be dismantled = 2, not run = 3, used = 4, unconfirmed = 5, engine starts = 6, enhanced = 7"
          required: false
          schema:
            type: integer
        - name: damage
          in: query
          description: Scalar text search, for example hail. Arrays and objects are not supported.
          required: false
          schema:
            type: string
        - name: prices_history
          in: query
          description: Add price history to response (set value 1 to get prices array)
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
        - name: without_sale_date
          in: query
          description: If you add 1, it will return only the cars that do not have an auction date.
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
        - name: sale_date_in_days
          in: query
          description: Lots where sale date is bigger than date of X days ago
          required: false
          schema:
            type: integer
        - name: sale_date_from
          in: query
          description: "Lots whose sale date is strictly after this calendar date (YYYY-MM-DD, the time part is ignored), example: 2026-09-01. Overrides sale_date_in_days; ignored with without_sale_date=1."
          required: false
          schema:
            type: string
        - name: sale_date_to
          in: query
          description: "Lots whose sale date is strictly before this calendar date (YYYY-MM-DD, the time part is ignored), example: 2026-09-30. Ignored with without_sale_date=1."
          required: false
          schema:
            type: string
        - name: exclude_expired_auctions
          in: query
          description: "Current implementation limitation: despite its name, exclude_expired_auctions=1 selects lots with no sale date or a sale date earlier than now, so it does not exclude past auctions. Omit it or send 0; use next_hours_auction for an upcoming window."
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
        - name: next_hours_auction
          in: query
          description: Lots with auction date within the next X hours
          required: false
          schema:
            type: integer
        - name: odometer_from_km
          in: query
          description: Odometer from (in kilometers)
          required: false
          schema:
            type: integer
        - name: odometer_to_km
          in: query
          description: Odometer to (in kilometers)
          required: false
          schema:
            type: integer
        - name: odometer_from_mi
          in: query
          description: Odometer from (in miles)
          required: false
          schema:
            type: integer
        - name: odometer_to_mi
          in: query
          description: Odometer to (in miles)
          required: false
          schema:
            type: integer
        - name: buy_now_price_from
          in: query
          description: "Buy now price: from"
          required: false
          schema:
            type: integer
        - name: buy_now_price_to
          in: query
          description: "Buy now price: to"
          required: false
          schema:
            type: integer
        - name: bid_price_from
          in: query
          description: "Current bid price: from"
          required: false
          schema:
            type: integer
        - name: bid_price_to
          in: query
          description: "Current bid price: to"
          required: false
          schema:
            type: integer
        - name: simple_paginate
          in: query
          description: Set 1 for simple pagination without totals, or 0 for totals. Set explicitly; account defaults may differ.
          required: false
          schema:
            type: integer
        - name: sortDirection
          in: query
          description: "Sort by vehicle ID: asc (default) or desc."
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
      responses:
        "200":
          description: A list of all cars
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Vehicle"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /manufacturers/{type}:
    get:
      tags:
        - Main endpoints
      summary: list all car brands
      operationId: c43da212517d44d769bb785ebe9bb2d2
      parameters:
        - name: type
          in: path
          description: "Vehicle group: cars, motorcycles or all. The path without this segment (deprecated) returns cars."
          required: true
          schema:
            type: string
            enum:
              - cars
              - motorcycles
              - all
            default: cars
          example: cars
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of manufacturers
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Manufacturer"
              example:
                data:
                  - id: 48
                    name: Ford
                    cars_qty: 93791
                    image: https://motorapis.com/images/brands/ford.svg
                    models_qty: 119
                    cars: true
                    motorcycles: false
                  - id: 140
                    name: Toyota
                    cars_qty: 93028
                    image: https://motorapis.com/images/brands/toyota.svg
                    models_qty: 180
                    cars: true
                    motorcycles: false
                  - id: 26
                    name: Chevrolet
                    cars_qty: 83914
                    image: https://motorapis.com/images/brands/chevrolet.svg
                    models_qty: 126
                    cars: true
                    motorcycles: false
                  - id: 56
                    name: Honda
                    cars_qty: 73667
                    image: https://motorapis.com/images/brands/honda.svg
                    models_qty: 90
                    cars: true
                    motorcycles: true
                  - id: 99
                    name: Nissan
                    cars_qty: 64180
                    image: https://motorapis.com/images/brands/nissan.svg
                    models_qty: 124
                    cars: true
                    motorcycles: false
                links:
                  first: https://motorapis.com/api/manufacturers/cars?page=1
                  last: https://motorapis.com/api/manufacturers/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/manufacturers/cars
                  per_page: 1000
                  to: 424
                  total: 424
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /models/{manufacturer_id}/{type}:
    get:
      tags:
        - Main endpoints
      summary: list all car models with filter by brand
      operationId: 866de850b4d4bbec2c160c39c8eee84a
      parameters:
        - name: manufacturer_id
          in: path
          required: true
          schema:
            type: integer
          example: "16"
        - name: type
          in: path
          description: "Vehicle group: cars, motorcycles or all. The path without this segment (deprecated) returns cars."
          required: true
          schema:
            type: string
            enum:
              - cars
              - motorcycles
              - all
            default: cars
          example: cars
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of car models
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Model"
              example:
                data:
                  - id: 93
                    name: 3er
                    cars_qty: 4746
                    manufacturer_id: 16
                    generations_qty: 7
                  - id: 94
                    name: 5er
                    cars_qty: 2569
                    manufacturer_id: 16
                    generations_qty: 8
                  - id: 1665
                    name: X5
                    cars_qty: 2307
                    manufacturer_id: 16
                    generations_qty: 4
                  - id: 1895
                    name: X3
                    cars_qty: 2207
                    manufacturer_id: 16
                    generations_qty: 3
                  - id: 2070
                    name: 4er
                    cars_qty: 1014
                    manufacturer_id: 16
                    generations_qty: 3
                links:
                  first: https://motorapis.com/api/models/16/cars?page=1
                  last: https://motorapis.com/api/models/16/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/models/16/cars
                  per_page: 500
                  to: 62
                  total: 62
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /generations/{model_id}/{type}:
    get:
      tags:
        - Main endpoints
      summary: list all car generations with filter by model
      operationId: 8d98d611b9e9909cbc4e8f641201744f
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: integer
          example: "94"
        - name: type
          in: path
          description: "Vehicle group: cars or motorcycles. The path without this segment (deprecated) returns cars."
          required: true
          schema:
            type: string
            enum:
              - cars
              - motorcycles
            default: cars
          example: cars
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of car generations
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Generation"
              example:
                data:
                  - id: 391
                    name: I (E12)
                    cars_qty: 0
                    from_year: 1972
                    to_year: 1981
                    manufacturer_id: 16
                    model_id: 94
                  - id: 393
                    name: II (E28)
                    cars_qty: 2
                    from_year: 1981
                    to_year: 1988
                    manufacturer_id: 16
                    model_id: 94
                  - id: 394
                    name: III (E34)
                    cars_qty: 11
                    from_year: 1987
                    to_year: 1996
                    manufacturer_id: 16
                    model_id: 94
                  - id: 395
                    name: IV (E39)
                    cars_qty: 54
                    from_year: 1995
                    to_year: 2004
                    manufacturer_id: 16
                    model_id: 94
                  - id: 397
                    name: V (E60/E61)
                    cars_qty: 190
                    from_year: 2002
                    to_year: 2010
                    manufacturer_id: 16
                    model_id: 94
                  - id: 399
                    name: VI (F10/F11/F07)
                    cars_qty: 951
                    from_year: 2009
                    to_year: 2017
                    manufacturer_id: 16
                    model_id: 94
                  - id: 5126
                    name: VII (G30/G31)
                    cars_qty: 714
                    from_year: 2016
                    to_year: 2023
                    manufacturer_id: 16
                    model_id: 94
                  - id: 7288
                    name: VIII (G60/G61/G68)
                    cars_qty: 0
                    from_year: 2024
                    to_year: null
                    manufacturer_id: 16
                    model_id: 94
                links:
                  first: https://motorapis.com/api/generations/94/cars?page=1
                  last: https://motorapis.com/api/generations/94/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/generations/94/cars
                  per_page: 500
                  to: 8
                  total: 8
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /search-vin/{vin}:
    get:
      tags:
        - Main endpoints
      summary: get a car by vin code
      operationId: 083a7dfc9f3bc400b85fda5ace53232d
      parameters:
        - name: vin
          in: path
          required: true
          schema:
            type: string
        - name: prices_history
          in: query
          description: Add price history to response (set value 1 to get prices array)
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Car info
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  data:
                    $ref: "#/components/schemas/Vehicle"
                description: "Illustrative response: generation.id and seller_reserve are example values. Get actual generation IDs from /generations/3038/cars."
              example:
                data:
                  id: 16070300
                  year: 2023
                  title: 2023 BMW M8
                  vin: WBSAE0C06PCL70372
                  manufacturer:
                    id: 16
                    name: BMW
                  model:
                    id: 3038
                    name: M8
                    manufacturer_id: 16
                  generation:
                    id: 900001
                    name: I (F92) LCI
                    manufacturer_id: 16
                    model_id: 3038
                  body_type:
                    name: coupe
                    id: 3
                  color:
                    name: green
                    id: 4
                  engine:
                    id: 39
                    name: 4.4l 8
                  transmission:
                    name: automatic
                    id: 1
                  drive_wheel:
                    name: all
                    id: 3
                  vehicle_type:
                    name: automobile
                    id: 1
                  fuel:
                    name: gasoline
                    id: 4
                  cylinders: 8
                  lots:
                    - id: 16447827
                      lot: "94166665"
                      domain:
                        name: copart_com
                        id: 3
                      external_id: null
                      odometer:
                        km: 28218
                        mi: 17534
                        status:
                          name: actual
                          id: 1
                      estimate_repair_price: null
                      pre_accident_price: 88591
                      clean_wholesale_price: 97575
                      actual_cash_value: null
                      sale_date: 2026-03-25T15:55:05.000000Z
                      sale_date_updated_at: 2026-03-26T15:56:32.000000Z
                      bid: 56500
                      bid_updated_at: 2026-03-25T14:01:44.000000Z
                      buy_now: 0
                      buy_now_updated_at: 2026-03-01T23:14:06.000000Z
                      final_bid: 56500
                      final_bid_updated_at: 2026-03-15T03:12:52.000000Z
                      status:
                        name: sold
                        id: 6
                      seller: null
                      seller_type: null
                      title:
                        id: 4235
                        code: null
                        name: Ct - Clean Title
                      detailed_title:
                        id: 1582
                        code: null
                        name: Mi - Certificate Of Title
                      note: null
                      damage:
                        main:
                          id: 37
                          name: Side
                        second:
                          id: 3
                          name: Front End
                      keys_available: true
                      airbags: null
                      condition:
                        name: run_and_drives
                        id: 0
                      grade_iaai: null
                      images:
                        id: 19358054
                        small:
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/b1f12fe1dcf2485190eb28e2f104d11c_thb.jpg
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/89c8fb28463844338e402c0b27b35259_thb.jpg
                        normal:
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/b1f12fe1dcf2485190eb28e2f104d11c_hrs.jpg
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/89c8fb28463844338e402c0b27b35259_hrs.jpg
                        big:
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/b1f12fe1dcf2485190eb28e2f104d11c_hrs.jpg
                          - https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/89c8fb28463844338e402c0b27b35259_hrs.jpg
                        exterior: null
                        interior: null
                        video: https://cs.copart.com/v1/AUTH_svc.pdoc00001/ids-c-prod-lpp/1225/986c53a65f76451ab653fc6492983720_O.mp4
                        video_youtube_id: null
                        external_panorama_url: null
                        downloaded:
                          - https://images.example.com/copart/bmw/m8/2023/94166665/WBSAE0C06PCL70372-1.webp
                          - https://images.example.com/copart/bmw/m8/2023/94166665/WBSAE0C06PCL70372-2.webp
                      location:
                        country:
                          iso: us
                          name: USA
                        state:
                          id: 82
                          code: mi
                          name: michigan
                        city:
                          id: 75
                          name: davison
                        location:
                          id: 88
                          name: mi - flint
                        latitude: 43.07812
                        longitude: -83.51813
                        postal_code: 48423 8502
                        is_offsite: null
                        raw: mi - flint
                        offsite: null
                      tags:
                        - CERT-D
                        - IV
                      line: A/92
                      selling_branch:
                        name: mi - flint
                        link: null
                        number: null
                        id: 540618
                        domain_id: 3
                      created_at: 2025-12-01T16:11:02.000000Z
                      updated_at: 2026-03-26T18:07:05.000000Z
                      details: null
                      is_timed_auction: false
                      seller_reserve:
                        price: 55000
                        updated_at: 2026-03-24T10:30:00.000000Z
                      auction_type:
                        name: pure_sale
                        id: 1
                      buyer_country: mx
                      archived: true
                      archived_at: 2026-03-26T18:01:13.000000Z
                      prices:
                        - id: 9746422
                          lot_id: 16447827
                          bid: 51000
                          final_bid_updated_at: 2026-03-13T18:20:35.000000Z
                          buy_now_price: null
                          sale_date: 2026-03-11T14:00:00.000000Z
                          status:
                            name: not_sold
                            id: 8
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "404":
          description: Vehicle or lot not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "423":
          description: "vin was excluded: the VIN was removed at the owner's request. Treat it as not found; do not retry."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
              example:
                error: vin was excluded
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /search-lot/{lot}/{domain}:
    get:
      tags:
        - Main endpoints
      summary: get a car by lot number
      operationId: cd75179e11ac6615b47b186e61a5a9f7
      parameters:
        - name: lot
          in: path
          required: true
          description: Copart or IAAI lot number, or an Encar listing ID (with encar_com; up to 2147483647).
          schema:
            type: string
        - name: prices_history
          in: query
          description: Add price history to response (set value 1 to get prices array)
          required: false
          schema:
            type: integer
        - name: search_by_id
          in: query
          description: Set value 1 for this parameter, if you need to search by IAAI ID instead of lot number (on URL IAAI put ID not lot number)
          required: false
          schema:
            type: integer
        - name: domain
          in: path
          required: true
          description: "Source name: copart_com, iaai_com or encar_com. Always pass it: Copart lot numbers and Encar listing IDs can look alike."
          schema:
            type: string
            enum:
              - copart_com
              - iaai_com
              - encar_com
      responses:
        "200":
          description: Car info
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  data:
                    $ref: "#/components/schemas/Vehicle"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "404":
          description: Vehicle or lot not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /archived-lots:
    get:
      tags:
        - Main endpoints
      summary: get archived lots
      operationId: cfb0828078711c33658f96ea26fe6db4
      parameters:
        - name: per_page
          in: query
          required: false
          description: "Archive page size: default 100."
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
        - name: minutes
          in: query
          description: this parameter allows you to retrieve only those lots that have been archived in the last few minutes (max 4320 minutes)
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 4320
          example: "10"
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: simple_paginate
          in: query
          required: false
          description: 1 for simple pagination, 0 to request totals. Explicitly set 1 when totals are not needed; account defaults may vary.
          schema:
            type: integer
            enum:
              - 0
              - 1
      responses:
        "200":
          description: List of archived lots
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ArchiveEvent"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /statistics:
    get:
      tags:
        - Additional endpoints
      summary: get statistics and average prices for all cars, grouped by manufacturer, model, generation, year, vehicle type and platform
      operationId: e9614d1657ad523194b3fd035a4be052
      parameters:
        - name: manufacturer_id
          in: query
          required: false
          description: Manufacturer ID or comma-separated IDs, for example 16,88.
          schema:
            type: string
        - name: model_id
          in: query
          description: Car model id, to get it use /models endpoint
          required: false
          schema:
            type: integer
        - name: generation_id
          in: query
          description: Car generation id, to get it use /generations endpoint
          required: false
          schema:
            type: integer
        - name: engine_id
          in: query
          description: Engine id
          required: false
          schema:
            type: integer
        - name: year
          in: query
          description: Filter with fixed year
          required: false
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          required: false
          description: Default 100, maximum 500.
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 500
      responses:
        "200":
          description: Statistical data
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Statistic"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /korea-duplicates:
    get:
      tags:
        - Encar
      summary: Encar re-listed listing IDs
      description: Pairs of Encar listing IDs that belong to the same car (Encar re-lists cars under new IDs). Requires Encar access. Returns a raw simple page with current_page, data and next_page_url, not links and meta.
      operationId: b42629564dc449a86b45210940606c12
      parameters:
        - name: minutes
          in: query
          description: Pairs created within the last N minutes (1–4320, up to 72 hours).
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 4320
          example: "60"
        - name: per_page
          in: query
          description: Pairs per page. Default 1000, maximum 5000.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 5000
            default: 1000
          example: "1000"
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: lot
          in: query
          required: false
          description: Optional Encar listing ID, matching original_id or duplicate_id.
          schema:
            type: integer
      responses:
        "200":
          description: Pairs of linked Encar listing IDs.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  current_page:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/KoreaDuplicate"
                  next_page_url:
                    type: string
                    nullable: true
                  prev_page_url:
                    type: string
                    nullable: true
                  per_page:
                    type: integer
              example:
                current_page: 1
                data:
                  - id: 5521
                    original_id: 40702938
                    duplicate_id: 40711215
                    created_at: "2026-10-04 08:01:12"
                first_page_url: https://motorapis.com/api/korea-duplicates?page=1
                from: 1
                next_page_url: null
                path: https://motorapis.com/api/korea-duplicates
                per_page: 1000
                prev_page_url: null
                to: 1
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: "Encar is not enabled for this key: you don't have access to encar."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /korea-options:
    get:
      tags:
        - Encar
      summary: Encar equipment options
      description: The dictionary for the option codes in lots[].details.options of Encar listings. One top-level JSON array, no pagination. Cache it and refresh it now and then.
      operationId: a09c0adfe59ebbf034a83f9e9664a2e0
      parameters: []
      responses:
        "200":
          description: Every equipment option.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/KoreaOption"
              example:
                - id: 1
                  code: "001"
                  name_original: 선루프
                  name: Sunroof
                  sort: 10
                  section: exterior
                  section_name: Exterior
                  image: null
                  description: null
                  location: null
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /exchange-rate-krw-usd:
    get:
      tags:
        - Encar
      summary: KRW to USD exchange rate
      description: The stored rate used for Encar prices, in US dollars per 1 Korean won (multiply a KRW amount by rate). No API key is needed. It is not a live quote; check updated_at.
      operationId: 7c1e5b0d3a2f4e6b9d8c1a0f2e3d4c5b
      parameters: []
      responses:
        "200":
          description: The stored rate and when it was updated.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  rate:
                    type: number
                    description: US dollars per 1 KRW.
                  updated_at:
                    type: string
              example:
                rate: 0.0007445071
                updated_at: "2026-10-04T21:27:02.364174Z"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
  /usa/damages:
    get:
      tags:
        - Additional endpoints
      summary: get list of USA damages
      operationId: cae4a412fb92dbdc63485819375f04ad
      parameters:
        - name: page
          in: query
          description: page number
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: List of damages
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ReferenceRecord"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /usa/states:
    get:
      tags:
        - Additional endpoints
      summary: get list of USA and Canada states
      operationId: b26e6d497fa10032893fc7eecb1fcb74
      parameters:
        - name: country
          in: query
          description: "country code: us or ca (default us)"
          required: false
          schema:
            type: string
          example: us
        - name: page
          in: query
          description: page number
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: List of USA/Canada states
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ReferenceRecord"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /usa/cities/{state_id}:
    get:
      tags:
        - Additional endpoints
      summary: get list of cities by state
      operationId: 1ea379b20cf282b37a54f6a522212aa7
      parameters:
        - name: state_id
          in: path
          description: state id
          required: true
          schema:
            type: integer
          example: "12"
        - name: page
          in: query
          description: page number
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: List of cities
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ReferenceRecord"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /usa/titles:
    get:
      tags:
        - Additional endpoints
      summary: get list of USA titles
      operationId: 281b7bbbabb43113c7a0703b1b67a2b1
      parameters:
        - name: page
          in: query
          description: page number
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: List of titles
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ReferenceRecord"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /usa/branches:
    get:
      tags:
        - Additional endpoints
      summary: get list of USA branches
      operationId: 9e84ef416362ca69a3d691de3ffba1f1
      parameters:
        - name: domain_id
          in: query
          description: Filter by domain id (1 and 3 are available options)
          required: false
          schema:
            type: integer
          example: "1"
        - name: page
          in: query
          description: page number
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: List of branches
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/ReferenceRecord"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /manufacturers:
    get:
      tags:
        - Main endpoints
      summary: list all car brands
      operationId: c43da212517d44d769bb785ebe9bb2d2Default
      deprecated: true
      description: "Legacy path, same as /manufacturers/cars. Use /manufacturers/{type}."
      parameters:
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of manufacturers
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Manufacturer"
              example:
                data:
                  - id: 48
                    name: Ford
                    cars_qty: 93791
                    image: https://motorapis.com/images/brands/ford.svg
                    models_qty: 119
                    cars: true
                    motorcycles: false
                  - id: 140
                    name: Toyota
                    cars_qty: 93028
                    image: https://motorapis.com/images/brands/toyota.svg
                    models_qty: 180
                    cars: true
                    motorcycles: false
                  - id: 26
                    name: Chevrolet
                    cars_qty: 83914
                    image: https://motorapis.com/images/brands/chevrolet.svg
                    models_qty: 126
                    cars: true
                    motorcycles: false
                  - id: 56
                    name: Honda
                    cars_qty: 73667
                    image: https://motorapis.com/images/brands/honda.svg
                    models_qty: 90
                    cars: true
                    motorcycles: true
                  - id: 99
                    name: Nissan
                    cars_qty: 64180
                    image: https://motorapis.com/images/brands/nissan.svg
                    models_qty: 124
                    cars: true
                    motorcycles: false
                links:
                  first: https://motorapis.com/api/manufacturers/cars?page=1
                  last: https://motorapis.com/api/manufacturers/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/manufacturers/cars
                  per_page: 1000
                  to: 424
                  total: 424
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /models/{manufacturer_id}:
    get:
      tags:
        - Main endpoints
      summary: list all car models with filter by brand
      operationId: 866de850b4d4bbec2c160c39c8eee84aDefault
      deprecated: true
      description: "Legacy path, same as /models/{manufacturer_id}/cars. Use /models/{manufacturer_id}/{type}."
      parameters:
        - name: manufacturer_id
          in: path
          required: true
          schema:
            type: integer
          example: "16"
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of car models
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Model"
              example:
                data:
                  - id: 93
                    name: 3er
                    cars_qty: 4746
                    manufacturer_id: 16
                    generations_qty: 7
                  - id: 94
                    name: 5er
                    cars_qty: 2569
                    manufacturer_id: 16
                    generations_qty: 8
                  - id: 1665
                    name: X5
                    cars_qty: 2307
                    manufacturer_id: 16
                    generations_qty: 4
                  - id: 1895
                    name: X3
                    cars_qty: 2207
                    manufacturer_id: 16
                    generations_qty: 3
                  - id: 2070
                    name: 4er
                    cars_qty: 1014
                    manufacturer_id: 16
                    generations_qty: 3
                links:
                  first: https://motorapis.com/api/models/16/cars?page=1
                  last: https://motorapis.com/api/models/16/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/models/16/cars
                  per_page: 500
                  to: 62
                  total: 62
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /generations/{model_id}:
    get:
      tags:
        - Main endpoints
      summary: list all car generations with filter by model
      operationId: 8d98d611b9e9909cbc4e8f641201744fDefault
      deprecated: true
      description: "Legacy path, same as /generations/{model_id}/cars. Use /generations/{model_id}/{type}."
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: integer
          example: "94"
        - name: page
          in: query
          required: false
          description: Page number. Keep other filters unchanged.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        "200":
          description: A list of car generations
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/Page"
                  - type: object
                    additionalProperties: true
                    properties:
                      data:
                        type: array
                        items:
                          $ref: "#/components/schemas/Generation"
              example:
                data:
                  - id: 391
                    name: I (E12)
                    cars_qty: 0
                    from_year: 1972
                    to_year: 1981
                    manufacturer_id: 16
                    model_id: 94
                  - id: 393
                    name: II (E28)
                    cars_qty: 2
                    from_year: 1981
                    to_year: 1988
                    manufacturer_id: 16
                    model_id: 94
                  - id: 394
                    name: III (E34)
                    cars_qty: 11
                    from_year: 1987
                    to_year: 1996
                    manufacturer_id: 16
                    model_id: 94
                  - id: 395
                    name: IV (E39)
                    cars_qty: 54
                    from_year: 1995
                    to_year: 2004
                    manufacturer_id: 16
                    model_id: 94
                  - id: 397
                    name: V (E60/E61)
                    cars_qty: 190
                    from_year: 2002
                    to_year: 2010
                    manufacturer_id: 16
                    model_id: 94
                  - id: 399
                    name: VI (F10/F11/F07)
                    cars_qty: 951
                    from_year: 2009
                    to_year: 2017
                    manufacturer_id: 16
                    model_id: 94
                  - id: 5126
                    name: VII (G30/G31)
                    cars_qty: 714
                    from_year: 2016
                    to_year: 2023
                    manufacturer_id: 16
                    model_id: 94
                  - id: 7288
                    name: VIII (G60/G61/G68)
                    cars_qty: 0
                    from_year: 2024
                    to_year: null
                    manufacturer_id: 16
                    model_id: 94
                links:
                  first: https://motorapis.com/api/generations/94/cars?page=1
                  last: https://motorapis.com/api/generations/94/cars?page=1
                  prev: null
                  next: null
                meta:
                  current_page: 1
                  from: 1
                  last_page: 1
                  path: https://motorapis.com/api/generations/94/cars
                  per_page: 500
                  to: 8
                  total: 8
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
  /search-lot/{lot}:
    get:
      tags:
        - Main endpoints
      summary: get a car by lot number
      operationId: cd75179e11ac6615b47b186e61a5a9f7Default
      deprecated: true
      description: "Legacy path without the source. Use /search-lot/{lot}/{domain} with copart_com, iaai_com or encar_com."
      parameters:
        - name: lot
          in: path
          required: true
          schema:
            type: string
        - name: prices_history
          in: query
          description: Add price history to response (set value 1 to get prices array)
          required: false
          schema:
            type: integer
        - name: search_by_id
          in: query
          description: Set value 1 for this parameter, if you need to search by IAAI ID instead of lot number (on URL IAAI put ID not lot number)
          required: false
          schema:
            type: integer
      responses:
        "200":
          description: Car info
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  data:
                    $ref: "#/components/schemas/Vehicle"
        "400":
          description: Invalid request parameter or page size. Correct the request before retrying.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "401":
          description: Requested source is not enabled for this key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "403":
          description: Missing, invalid, expired or inactive API key.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "404":
          description: Vehicle or lot not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "429":
          description: Request rate limit reached. Respect Retry-After if provided.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
          headers:
            Retry-After:
              description: Optional delay in seconds or HTTP date. Not guaranteed on every response.
              schema:
                type: string
        "500":
          description: Unexpected server error. Retry safe reads with a bounded budget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: 'Enter your API key in header x-api-key'
      name: x-api-key
      in: header
  schemas:
    ApiError:
      type: object
      additionalProperties: true
      properties:
        error: &a1
          type: string
          nullable: true
        message: *a1
        errors:
          type: object
          additionalProperties: true
    EnumValue:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        name: *a1
      nullable: true
    SellerReserve:
      type: object
      additionalProperties: true
      properties:
        price: &a2
          anyOf:
            - type: number
              nullable: true
            - type: string
              nullable: true
          description: Numeric value; some sources serialize numeric values as strings.
        updated_at: &a3
          type: string
          format: date-time
          nullable: true
      nullable: true
      description: Seller reserve when available; null otherwise. Not a confirmed final sale price.
      example:
        price: 8500
        updated_at: 2026-09-13T10:30:00.000000Z
    Lot:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        lot:
          anyOf:
            - type: string
            - type: integer
        domain:
          $ref: "#/components/schemas/EnumValue"
        status:
          $ref: "#/components/schemas/EnumValue"
        bid: *a2
        buy_now: *a2
        final_bid: *a2
        seller_reserve:
          $ref: "#/components/schemas/SellerReserve"
        sale_date: *a3
        created_at: *a3
        updated_at: *a3
        archived:
          type: boolean
        archived_at: *a3
        buyer_country:
          type: string
          nullable: true
          description: "Copart and IAAI: country of the buyer who won the lot, lowercase ISO 3166-1 alpha-2 (for example mx). null or absent when unknown."
          example: mx
        images:
          type: object
          nullable: true
          additionalProperties: true
        location:
          type: object
          nullable: true
          additionalProperties: true
        details:
          type: object
          nullable: true
          additionalProperties: true
          description: "Encar only: listing details as collected (asking price in KRW, option codes, inspection, insurance history). null on Copart and IAAI lots. Fields can be missing; read them defensively."
          properties:
            original_price:
              type: integer
              nullable: true
              description: Asking price in Korean won (KRW). Convert with /exchange-rate-krw-usd.
            is_leasing:
              type: boolean
              nullable: true
            is_brand_certified:
              type: boolean
              nullable: true
            badge: *a1
            seats_count:
              type: integer
              nullable: true
            engine_volume:
              type: integer
              nullable: true
              description: Engine displacement in cc.
            sell_type: *a1
            first_registration:
              type: object
              nullable: true
              additionalProperties: true
              properties:
                year:
                  type: integer
                  nullable: true
                month:
                  type: integer
                  nullable: true
                day:
                  type: integer
                  nullable: true
            options:
              type: object
              nullable: true
              additionalProperties: true
              description: Option codes by group (standard, choice, tuning, etc); /korea-options names them.
              properties:
                standard: &a4
                  type: array
                  items:
                    type: string
                choice: *a4
                tuning: *a4
                etc: *a4
            inspect:
              type: object
              nullable: true
              additionalProperties: true
            insurance_v2:
              type: object
              nullable: true
              additionalProperties: true
          example:
            original_price: 28900000
            is_leasing: false
            is_brand_certified: true
            badge: 2.0 Gasoline Signature
            seats_count: 5
            engine_volume: 1999
            sell_type: COMMON
            first_registration:
              year: 2022
              month: 3
              day: 15
            options:
              standard: ["001", "010", "023"]
              choice: ["059"]
              tuning: []
              etc: []
    Vehicle:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        vin: *a1
        title: *a1
        year:
          type: integer
          nullable: true
        manufacturer:
          $ref: "#/components/schemas/EnumValue"
        model:
          $ref: "#/components/schemas/EnumValue"
        generation:
          $ref: "#/components/schemas/EnumValue"
        lots:
          type: array
          items:
            $ref: "#/components/schemas/Lot"
    TimestampedAmount:
      type: object
      additionalProperties: true
      properties:
        value: *a2
        updated_at: *a3
    TimestampedDate:
      type: object
      additionalProperties: true
      properties:
        value: *a3
        updated_at: *a3
    ArchiveCommon:
      type: object
      additionalProperties: true
      properties:
        lot_id:
          type: integer
        car_id:
          type: integer
        vin: *a1
        buyer_country:
          type: string
          nullable: true
          description: "Copart and IAAI: country of the buyer who won the lot, lowercase ISO 3166-1 alpha-2 (for example mx). null or absent when unknown."
          example: mx
        lot:
          anyOf:
            - type: string
            - type: integer
        domain:
          $ref: "#/components/schemas/EnumValue"
        status:
          $ref: "#/components/schemas/EnumValue"
        archived_at: *a3
    ArchiveLegacy:
      allOf:
        - $ref: "#/components/schemas/ArchiveCommon"
        - type: object
          additionalProperties: true
          properties:
            bid: *a2
            sale_date: *a3
            final_bid_updated_at: *a3
      description: Legacy format. bid may fall back to the current bid; do not assume it is a confirmed sale price.
    ArchiveCurrent:
      allOf:
        - $ref: "#/components/schemas/ArchiveCommon"
        - type: object
          additionalProperties: true
          properties:
            bid:
              $ref: "#/components/schemas/TimestampedAmount"
            buy_now:
              $ref: "#/components/schemas/TimestampedAmount"
            final_bid:
              $ref: "#/components/schemas/TimestampedAmount"
            sale_date:
              $ref: "#/components/schemas/TimestampedDate"
      description: Timestamped archive format returned for some accounts.
    ArchiveEvent:
      anyOf:
        - $ref: "#/components/schemas/ArchiveLegacy"
        - $ref: "#/components/schemas/ArchiveCurrent"
    Page:
      type: object
      additionalProperties: true
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
        links:
          type: object
          additionalProperties: true
          properties:
            first: *a1
            last: *a1
            prev: *a1
            next: *a1
        meta:
          type: object
          additionalProperties: true
          properties:
            current_page:
              type: integer
            per_page:
              type: integer
            total:
              type: integer
            last_page:
              type: integer
        next_page_url: *a1
        current_page:
          type: integer
        per_page:
          type: integer
      description: Partial pagination envelope. Depending on endpoint/account, next page is links.next or next_page_url. Totals may be absent with simple pagination. Null next link ends traversal.
    ReferenceRecord:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        name: *a1
    Manufacturer:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        name: *a1
        cars_qty:
          type: integer
          nullable: true
        image: *a1
        models_qty:
          type: integer
          nullable: true
        cars:
          type: boolean
        motorcycles:
          type: boolean
    Model:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        name: *a1
        manufacturer_id:
          type: integer
    Generation:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        name: *a1
        manufacturer_id:
          type: integer
        model_id:
          type: integer
    Statistic:
      type: object
      additionalProperties: true
      description: Grouped statistics with manufacturer/model/generation/engine relationships when available. Extra fields are allowed; schema is intentionally partial.
    KoreaDuplicate:
      type: object
      additionalProperties: true
      properties:
        original_id:
          type: integer
        duplicate_id:
          type: integer
        created_at:
          type: string
          description: "When the pair was stored, for example 2026-10-04 08:01:12 (not ISO 8601)."
          nullable: true
    KoreaOption:
      type: object
      additionalProperties: true
      description: Equipment dictionary row; preserve unknown option fields.
      properties:
        id:
          type: integer
        code:
          type: string
          description: Matches the codes in lots[].details.options of Encar listings.
        name_original:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        section:
          type: string
          nullable: true
        section_name:
          type: string
          nullable: true
