{
  "openapi": "3.0.1",
  "info": {
    "title": "WA EV Registrations - Electric Vehicle Population by County",
    "description": "Washington's electric vehicle population (294k registered EVs): which county, make, model, model year, EV type (battery / plug-in hybrid). Filter by county, make, year; aggregate adoption trends by model year, county share, Tesla vs others.",
    "version": "0.0",
    "x-build-id": "TvdB1bg6p6vfHKsde"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~wa-ev-registrations/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-wa-ev-registrations",
        "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/j0401~wa-ev-registrations/runs": {
      "post": {
        "operationId": "runs-sync-j0401-wa-ev-registrations",
        "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/j0401~wa-ev-registrations/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-wa-ev-registrations",
        "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": {
          "county": {
            "title": "County",
            "type": "string",
            "description": "Only return EVs registered in this county (case-insensitive, exact). E.g. \"King\", \"Snohomish\", \"Pierce\"."
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Only return EVs of this make (case-insensitive, exact). E.g. \"TESLA\", \"CHEVROLET\", \"FORD\"."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Only return EVs whose model contains this substring (case-insensitive). E.g. \"MODEL Y\", \"BOLT\"."
          },
          "evType": {
            "title": "EV type",
            "type": "string",
            "description": "Only return EVs whose type contains this substring (case-insensitive). E.g. \"Battery Electric\", \"Plug-in\" (hybrid), \"Hybrid\"."
          },
          "cafvType": {
            "title": "Clean fuel eligibility",
            "type": "string",
            "description": "Only return EVs whose clean-alt-fuel-vehicle (CAFV) eligibility contains this substring. E.g. \"Eligible\"."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Only return EVs registered in cities containing this substring (case-insensitive). E.g. \"Seattle\", \"Olympia\"."
          },
          "electricUtility": {
            "title": "Electric utility",
            "type": "string",
            "description": "Only return EVs whose electric utility contains this substring (case-insensitive). E.g. \"PUGET SOUND ENERGY\"."
          },
          "yearFrom": {
            "title": "Model year from",
            "type": "string",
            "description": "Only return EVs with model year at or after this (e.g. \"2020\"). Adoption trend: later years = more recent purchases."
          },
          "yearTo": {
            "title": "Model year to",
            "type": "string",
            "description": "Only return EVs with model year at or before this (e.g. \"2026\")."
          },
          "minElectricRange": {
            "title": "Min electric range",
            "minimum": 0,
            "type": "integer",
            "description": "Only return EVs with an electric range at or above this (miles). E.g. 200 for long-range battery EVs.",
            "default": 0
          },
          "aggregate": {
            "title": "Aggregate instead of vehicles",
            "type": "boolean",
            "description": "When on, returns one summary record per group (see groupBy) with vehicle count and share of the filtered total - instead of individual vehicles. Computed server-side.",
            "default": false
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "make",
              "county",
              "model",
              "modelYear",
              "evType",
              "city",
              "electricUtility"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over (only used when aggregate is on). 'make' -> Tesla vs others; 'county' -> where EVs concentrate; 'modelYear' -> the adoption trend by purchase year.",
            "default": "make"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of records pushed (0 = unlimited). A vehicle query can reach the run's charge cap; an aggregate over all 294k has at most dozens of groups.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}