{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Operator Licences - 69K HGV & PSV Licences (DVSA)",
    "description": "69k HGV and PSV operator licences in Great Britain (DVSA, OGL): operator, licence type and status, authorised fleet, address and company number. Search or aggregate.",
    "version": "0.0",
    "x-build-id": "EHcZc4vne4PyxhOrz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~uk-operator-licences/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-uk-operator-licences",
        "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~uk-operator-licences/runs": {
      "post": {
        "operationId": "runs-sync-j0401-uk-operator-licences",
        "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~uk-operator-licences/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-uk-operator-licences",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "",
              "search",
              "aggregate"
            ],
            "type": "string",
            "description": "search = filter the register. aggregate = one row per group. Leave blank to auto-route: filters or groupBy -> aggregate when groupBy is set, otherwise filters -> search, no filters -> aggregate."
          },
          "name": {
            "title": "Operator name",
            "type": "string",
            "description": "Operator name substring, case-insensitive (e.g. \"TAYLOR\"). Sole traders and partnerships are not name-searchable (personal names are not published here). The output field operatorName is accepted as an alias."
          },
          "licenceNumber": {
            "title": "Licence number",
            "type": "string",
            "description": "Exact operator licence number (e.g. \"OF2080358\")."
          },
          "companyNumber": {
            "title": "Companies House number",
            "type": "string",
            "description": "Exact company or registered-society number (e.g. \"09541002\", \"SC402481\"). 8-digit numbers are zero-padded automatically. Placeholder numbers (00000000) are not published, so those rows have a blank companyNumber."
          },
          "region": {
            "title": "Traffic area",
            "enum": [
              "",
              "East of England",
              "West of England",
              "North East of England",
              "North West of England",
              "West Midlands",
              "London and the South East of England",
              "Scotland",
              "Wales"
            ],
            "type": "string",
            "description": "Traffic area that issued the licence."
          },
          "vehicleClass": {
            "title": "Vehicle class",
            "enum": [
              "",
              "Goods",
              "PSV"
            ],
            "type": "string",
            "description": "Goods = O-licence (heavy goods vehicles, 63,956 licences); PSV = P-licence (buses and coaches, 5,071 licences)."
          },
          "licenceType": {
            "title": "Licence type",
            "enum": [
              "",
              "Restricted",
              "Standard National",
              "Standard International"
            ],
            "type": "string",
            "description": "Restricted = own account only; Standard National / International = hire and reward (international adds cross-border)."
          },
          "operatorType": {
            "title": "Operator type",
            "enum": [
              "",
              "Limited Company",
              "Limited Liability Partnership",
              "Partnership",
              "Sole Trader",
              "Other (e.g. public authority, charity, trust, university)"
            ],
            "type": "string",
            "description": "Legal form of the operator."
          },
          "status": {
            "title": "Licence status",
            "enum": [
              "",
              "Valid",
              "Curtailed",
              "Suspended"
            ],
            "type": "string",
            "description": "Current licence status."
          },
          "postcode": {
            "title": "Postcode",
            "type": "string",
            "description": "Correspondence postcode or prefix; spaces are ignored (e.g. \"LE14\" or \"LE14 3JL\"). Only incorporated operators carry a postcode."
          },
          "minVehicles": {
            "title": "Minimum authorised vehicles",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Inclusive lower bound on the number of authorised vehicles."
          },
          "maxVehicles": {
            "title": "Maximum authorised vehicles",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Inclusive upper bound on the number of authorised vehicles."
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "region",
              "licenceType",
              "operatorType",
              "status",
              "fleetBand",
              "postcodeArea",
              "vehicleClass"
            ],
            "type": "string",
            "description": "region -> traffic area; licenceType / operatorType / status / vehicleClass -> category; fleetBand -> authorised-vehicle band; postcodeArea -> postal area (blank for name-redacted licences). Blank defaults to region."
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap the number of search records pushed (0 = the default 50, maximum 5000). Aggregate returns every group. Use offset to page through more than 5000 matches.",
            "default": 50
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip this many matching search records before the first returned row (0-100000). Result order is stable (traffic area, then source file order), so offset+maxResults pages through the whole match set; totalMatched still reports the full count.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}