{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Fuel Consumption Ratings API – NRCan, EV",
    "description": "All 30,886 NRCan fuel consumption ratings for new vehicles sold in Canada: gas 1995–2026, EVs and plug-in hybrids 2012–2026. L/100 km, CO2 g/km, CO2/smog ratings, EV range and kWh. JSON/CSV, Open Government Licence – Canada. $0.003 per rating, no start fee.",
    "version": "0.1",
    "x-build-id": "U7KIPTjtgY9FLEven"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loudtzu~canada-fuel-consumption-ratings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loudtzu-canada-fuel-consumption-ratings",
        "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/loudtzu~canada-fuel-consumption-ratings/runs": {
      "post": {
        "operationId": "runs-sync-loudtzu-canada-fuel-consumption-ratings",
        "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/loudtzu~canada-fuel-consumption-ratings/run-sync": {
      "post": {
        "operationId": "run-sync-loudtzu-canada-fuel-consumption-ratings",
        "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": {
          "vehicleTypes": {
            "title": "Vehicle types",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "conventional",
                "batteryElectric",
                "plugInHybrid"
              ],
              "enumTitles": [
                "Gasoline / diesel / E85 / natural gas",
                "Battery-electric",
                "Plug-in hybrid"
              ]
            }
          },
          "modelYearFrom": {
            "title": "Model year from",
            "minimum": 1995,
            "type": "integer",
            "description": "e.g. 2020. Only the needed files are downloaded."
          },
          "modelYearTo": {
            "title": "Model year to",
            "minimum": 1995,
            "type": "integer",
            "description": "e.g. 2026"
          },
          "make": {
            "title": "Make contains",
            "type": "string",
            "description": "e.g. Toyota"
          },
          "model": {
            "title": "Model contains",
            "type": "string",
            "description": "e.g. RAV4"
          },
          "vehicleClass": {
            "title": "Vehicle class contains",
            "type": "string",
            "description": "e.g. Pickup truck, Sport utility vehicle"
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "X",
                "Z",
                "D",
                "E",
                "N",
                "B"
              ],
              "enumTitles": [
                "Regular gasoline",
                "Premium gasoline",
                "Diesel",
                "E85",
                "Natural gas",
                "Electricity"
              ]
            }
          },
          "transmissionTypes": {
            "title": "Transmission types",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Automatic",
                "Automated manual",
                "Automatic with select shift",
                "Continuously variable",
                "Manual"
              ]
            }
          },
          "co2Min": {
            "title": "CO2 from (g/km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest CO2 emissions, grams per km."
          },
          "co2Max": {
            "title": "CO2 to (g/km)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest CO2 emissions, grams per km."
          },
          "co2RatingMin": {
            "title": "CO2 rating from",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "1 (worst) to 10 (best). Ratings exist from model year 2015."
          },
          "co2RatingMax": {
            "title": "CO2 rating to",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "1 to 10."
          },
          "smogRatingMin": {
            "title": "Smog rating from",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "1 (worst) to 10 (best). Ratings exist from model year 2015."
          },
          "smogRatingMax": {
            "title": "Smog rating to",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "1 to 10."
          },
          "combinedL100kmMax": {
            "title": "Combined L/100 km at most",
            "minimum": 0,
            "type": "integer",
            "description": "Whole litres per 100 km, e.g. 8."
          },
          "electricRangeKmMin": {
            "title": "Electric range at least (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Battery-electric range, or the electric-only range of a plug-in hybrid."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many records (default 100, at most 50,000). Ignored when 'Fetch all' is on. Each record is billed.",
            "default": 100
          },
          "fetchAll": {
            "title": "Fetch all matching records",
            "type": "boolean",
            "description": "Off by default. Turn on to return every matching record, up to 50,000 per run. Each record is billed; split larger pulls by date or filters.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "live",
              "changesSince",
              "asOf",
              "history",
              "archiveExport"
            ],
            "type": "string",
            "description": "live = normal query. The other modes read the archive.",
            "default": "live"
          },
          "since": {
            "title": "Since (changesSince)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Records added, changed or removed on or after this day. Removed records come back as ID + deleted-on only."
          },
          "asOf": {
            "title": "As of (asOf)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Each record as it stood at the end of this day."
          },
          "ids": {
            "title": "Record IDs (history)",
            "type": "array",
            "description": "Up to 1,000 ratingId values (from archive output). Every archived version, oldest first.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}