{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada VIN Decoder: Recalls & Market Value Report",
    "description": "Decode VINs in bulk and get US and Transport Canada recalls, NHTSA safety stars and complaints, plus the live Canadian market value from AutoTrader.ca, Kijiji and CarGurus comparables, with a deal rating for your asking price.",
    "version": "0.1",
    "x-build-id": "eNaVaVn8UGAlKxsO3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~canada-vin-report/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-canada-vin-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/fayoussef~canada-vin-report/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-canada-vin-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/fayoussef~canada-vin-report/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-canada-vin-report",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "vins": {
            "title": "VINs",
            "type": "array",
            "description": "One 17-character VIN per line. To also rate a price, add the asking price and the odometer in km after the VIN, separated by commas: \"2HGFC2F59JH512345, 18500, 92000\". Duplicates are reported once.",
            "items": {
              "type": "string"
            }
          },
          "vin_file": {
            "title": "Spreadsheet of VINs (optional)",
            "type": "string",
            "description": "Upload an Excel (.xlsx), CSV or TSV file, or paste a public link to one (Google Sheets links work when shared as 'Anyone with the link'). The column named VIN is used; columns whose header says price and km (or mileage, odometer) are read as the asking price and odometer. Every row's original columns are kept in the output. Used together with the list above."
          },
          "sheet_name": {
            "title": "Sheet name (optional)",
            "type": "string",
            "description": "Only for Excel files with several sheets. Leave empty to read the first sheet."
          },
          "include_recalls": {
            "title": "Recalls and safety ratings",
            "type": "boolean",
            "description": "Add US (NHTSA) and Canadian (Transport Canada) recalls, the NHTSA complaint count and NCAP crash-test stars for each vehicle's make, model and model year.",
            "default": true
          },
          "include_market_value": {
            "title": "Canadian market value",
            "type": "boolean",
            "description": "Search AutoTrader.ca, Kijiji and CarGurus.ca for the same make, model and year, and add the median asking price, the price range, a trim and mileage aware estimate and, when you give an asking price, a deal rating. Charged as a separate event, only when a value is found.",
            "default": true
          },
          "postal_code": {
            "title": "Postal code (optional)",
            "type": "string",
            "description": "Compare against cars for sale around this Canadian postal code (\"M5V 3L9\" or \"M5V\"). Leave empty, with the radius at 0, to compare against all of Canada."
          },
          "radius_km": {
            "title": "Radius (km)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How far from the postal code to look for comparable cars. 0 compares against all of Canada.",
            "default": 0
          },
          "comparables_per_site": {
            "title": "Comparable listings per site",
            "minimum": 10,
            "maximum": 200,
            "type": "integer",
            "description": "How many listings to read from each site for every make, model and year. More gives a steadier value on common models and takes a little longer.",
            "default": 40
          },
          "market_sources": {
            "title": "Listing sites",
            "type": "array",
            "description": "Which sites the comparable listings come from.",
            "items": {
              "type": "string",
              "enum": [
                "autotrader",
                "kijiji",
                "cargurus"
              ],
              "enumTitles": [
                "AutoTrader.ca",
                "Kijiji",
                "CarGurus.ca"
              ]
            },
            "default": [
              "autotrader",
              "kijiji",
              "cargurus"
            ]
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}