{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Operator Licence Register: Goods & PSV, Weekly Changes",
    "description": "UK operator licence register: every goods vehicle operator licence (HGV) and PSV licence in a traffic area such as North West of England, with fleet size, operating centre and Companies House number. Then a weekly feed of new haulage operator licences and fleet changes. Official DVSA data.",
    "version": "0.1",
    "x-build-id": "nM4gxIQgNyrH8xLZN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidfetch~uk-operator-licences/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidfetch-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/solidfetch~uk-operator-licences/runs": {
      "post": {
        "operationId": "runs-sync-solidfetch-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/solidfetch~uk-operator-licences/run-sync": {
      "post": {
        "operationId": "run-sync-solidfetch-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": {
          "changesSince": {
            "title": "Changes since",
            "type": "string",
            "description": "Only licences that are new, changed (status, licence type, vehicles or trailers authorised, operating centres, name, company number) or removed in a weekly register file of this date or later, each with its list of changes. The register has no change dates, so the actor compares each weekly file with the history it keeps in a named key-value store on your account: the first run records the starting point and returns nothing, changes show from the next weekly file. Schedule it weekly, for example on Mondays. Accepts a date such as 2026-10-19 or a period back from today such as 7 days, 2 weeks or 1 month."
          },
          "trafficAreas": {
            "title": "Traffic areas",
            "type": "array",
            "description": "Traffic Commissioner areas to read. Empty means all nine (eight in Great Britain, plus Northern Ireland).",
            "items": {
              "type": "string",
              "enum": [
                "northEast",
                "northWest",
                "westMidlands",
                "east",
                "wales",
                "westOfEngland",
                "londonSouthEast",
                "scotland",
                "northernIreland"
              ],
              "enumTitles": [
                "North East of England",
                "North West of England",
                "West Midlands",
                "East of England",
                "Wales",
                "West of England",
                "London and the South East of England",
                "Scotland",
                "Northern Ireland"
              ]
            }
          },
          "licenceCategory": {
            "title": "Goods or PSV",
            "enum": [
              "goods",
              "psv",
              "any"
            ],
            "type": "string",
            "description": "Goods vehicle licences (numbers starting with O), PSV licences (starting with P), or both.",
            "default": "goods"
          },
          "licenceTypes": {
            "title": "Licence types",
            "type": "array",
            "description": "Empty means all. Standard licences carry goods or passengers for hire or reward; a restricted goods licence carries only the operator's own goods.",
            "items": {
              "type": "string",
              "enum": [
                "standardNational",
                "standardInternational",
                "restricted",
                "specialRestricted"
              ],
              "enumTitles": [
                "Standard national",
                "Standard international",
                "Restricted",
                "Special restricted (PSV)"
              ]
            }
          },
          "statuses": {
            "title": "Licence status",
            "type": "array",
            "description": "Empty means every status in the file. The Northern Ireland file has no status, so a status filter leaves Northern Ireland out.",
            "items": {
              "type": "string",
              "enum": [
                "valid",
                "curtailed",
                "suspended",
                "revoked",
                "surrendered"
              ],
              "enumTitles": [
                "Valid",
                "Curtailed",
                "Suspended",
                "Revoked",
                "Surrendered"
              ]
            }
          },
          "minVehicles": {
            "title": "Min vehicles authorised",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Fleet size: the lowest number of vehicles the licence must authorise, as a whole number, for example 10. Licences with no vehicle count in the register are dropped when this is set. Combine with the maximum to get a range such as 10 to 50."
          },
          "maxVehicles": {
            "title": "Max vehicles authorised",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper end of the fleet size range: the highest number of vehicles the licence may authorise, as a whole number, for example 50. Licences with no vehicle count in the register are dropped when this is set. Leave empty for no upper limit."
          },
          "operatorName": {
            "title": "Operator name",
            "type": "string",
            "description": "Words that must all start a word of the operator's legal or trading name, without regard to case. \"smith haul\" finds SMITH HAULAGE LTD. Leave empty to not filter by name."
          },
          "licenceNumbers": {
            "title": "Licence numbers",
            "type": "array",
            "description": "Look up these licences instead of searching, for example OB1234567 or PK0123456. Up to 10,000 per run, returned in the same order. A value that is not a licence number, or a number not in the register, gets a free row. Spaces, dashes and lower case are fine.",
            "items": {
              "type": "string"
            }
          },
          "includeSoleTraderContacts": {
            "title": "Include addresses of sole traders and partnerships",
            "type": "boolean",
            "description": "Licences held by private persons (sole traders and partnerships) come without correspondence and operating centre addresses by default, only the postcode district, because those are often home addresses. Turn this on only if you have a lawful basis to process personal data (see Personal data in the README). Names of transport managers and directors are never returned.",
            "default": false
          },
          "maxItems": {
            "title": "Max licences",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many licences. You pay per licence saved. Empty means 100 for a search or changes run and every licence found for a lookup. Whole number from 1 to 1,000,000."
          },
          "historyStoreName": {
            "title": "History store",
            "type": "string",
            "description": "Name of the key-value store on your account where the actor keeps the licence history for the changes feed. Use a different name to keep a separate history, for example per client.",
            "default": "uk-operator-licences-history"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}