{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Waste Carrier Licence Check & New Registrations",
    "description": "Check waste carrier, broker and dealer registrations on the Environment Agency public register for England: bulk-check registration numbers, business names or postcodes for duty-of-care, or pull newly registered and soon-to-expire upper-tier carriers as B2B leads. Official data, no API key.",
    "version": "1.0",
    "x-build-id": "PvMQp3kB6SAbuX22q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ukdatakit~uk-waste-carriers-register/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ukdatakit-uk-waste-carriers-register",
        "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/ukdatakit~uk-waste-carriers-register/runs": {
      "post": {
        "operationId": "runs-sync-ukdatakit-uk-waste-carriers-register",
        "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/ukdatakit~uk-waste-carriers-register/run-sync": {
      "post": {
        "operationId": "run-sync-ukdatakit-uk-waste-carriers-register",
        "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": [
              "new",
              "check",
              "expiring"
            ],
            "type": "string",
            "description": "Check: look up registration numbers, names or postcodes (one result row per match, plus a 'not found' row). New: registrations dated in the last N days (new and renewed). Expiring: upper-tier registrations that expire in the next N days.",
            "default": "new"
          },
          "registrationNumbers": {
            "title": "Registration numbers (check mode)",
            "type": "array",
            "description": "Waste carrier registration numbers such as CBDU128084 or CBDL73797.",
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Business names (check mode)",
            "type": "array",
            "description": "Words from the holder's name, e.g. \"Biffa\" or \"skip hire\". Returns up to the max matches per name.",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Full postcodes (check mode)",
            "type": "array",
            "description": "Every registration at these exact postcodes, e.g. \"RG8 0SU\".",
            "items": {
              "type": "string"
            }
          },
          "maxMatchesPerName": {
            "title": "Max matches per name (check mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Name searches can match many holders; keep the closest few.",
            "default": 10
          },
          "days": {
            "title": "Days (new / expiring modes)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "New: look back this many days, including today. Expiring: look ahead this many days. Leave empty for 7 (new) or 30 (expiring)."
          },
          "tiers": {
            "title": "Tiers",
            "type": "array",
            "description": "Upper tier = carries other people's waste or construction/demolition waste (renews every 3 years). Lower tier = mainly own waste (no expiry).",
            "items": {
              "type": "string",
              "enum": [
                "upper",
                "lower"
              ],
              "enumTitles": [
                "Upper tier",
                "Lower tier"
              ]
            }
          },
          "excludeIndividuals": {
            "title": "Leave out sole traders",
            "type": "boolean",
            "description": "Drops registrations held by sole traders (individuals). On by default in new and expiring modes so lead lists only contain companies, partnerships and other organisations. Off by default in check mode."
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "Only registrations whose address postcode starts with one of these, e.g. \"M\", \"LS\", \"BS8\".",
            "items": {
              "type": "string"
            }
          },
          "localities": {
            "title": "Towns",
            "type": "array",
            "description": "Only registrations whose address mentions one of these towns.",
            "items": {
              "type": "string"
            }
          },
          "includeOverseas": {
            "title": "Include overseas addresses",
            "type": "boolean",
            "description": "Some registered carriers (for example EU hauliers) have a non-UK address.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}