{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Waste Carrier Licence Monitor",
    "description": "Verify and monitor UK Environment Agency waste carrier licences: single lookup, bulk compliance checks, and a recurring monitor mode that flags status changes and expiry windows.",
    "version": "0.1",
    "x-build-id": "DnZ05y1cyoqzB1c2f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~uk-waste-carrier-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-uk-waste-carrier-monitor",
        "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/nerolabs~uk-waste-carrier-monitor/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-uk-waste-carrier-monitor",
        "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/nerolabs~uk-waste-carrier-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-uk-waste-carrier-monitor",
        "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": {
          "registrationNumber": {
            "title": "Registration number (single lookup)",
            "type": "string",
            "description": "Exact Environment Agency registration number, e.g. CBDU370419 (upper tier) or CBDL73797 (lower tier). Use this for a single-record lookup."
          },
          "companyName": {
            "title": "Company or holder name (fuzzy search)",
            "type": "string",
            "description": "Full or partial business/individual name. Returns every matching registration, not one guaranteed match, since two carriers can share a similar name. Not usable with Monitor mode, see below."
          },
          "companiesHouseNumber": {
            "title": "Companies House number (cross-reference, optional)",
            "type": "string",
            "description": "Pair with Registration number or Company name. Compared against the company number the Environment Agency itself has on file for that holder, to flag a match or mismatch. This is not a live Companies House lookup, sole traders and partnerships have no company number and come back as 'not applicable' rather than a mismatch."
          },
          "registrationNumbers": {
            "title": "Registration numbers (bulk lookup / Monitor mode)",
            "type": "array",
            "description": "A list of exact registration numbers. Required for Monitor mode (a fuzzy name doesn't identify a stable record to track over time). Also the fastest way to check many known contractors in one run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "monitorMode": {
            "title": "Monitor mode (compare against the last run)",
            "type": "boolean",
            "description": "When true, the Actor loads what it saw last time for each registration number, compares against what the register says now, and returns only the change (or a cheap no-change confirmation). Schedule this Actor to run daily or weekly with the same registrationNumbers and watchlistId for ongoing compliance monitoring. Requires registrationNumber and/or registrationNumbers, not companyName.",
            "default": false
          },
          "watchlistId": {
            "title": "Watchlist ID (optional, Monitor mode only)",
            "type": "string",
            "description": "Only needed if you're running more than one independent monitored watchlist from the same Apify account (e.g. one per client or site) and want their delta history kept separate. Leave as default otherwise.",
            "default": "default"
          },
          "expiryWarningDays": {
            "title": "Expiry warning threshold (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Monitor mode flags a registration as a change event when its expiry falls within this many days.",
            "default": 90
          },
          "expiryUrgentDays": {
            "title": "Expiry urgent threshold (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "A second, more urgent flag when expiry falls within this many days.",
            "default": 30
          },
          "maxNameSearchResults": {
            "title": "Max results for a name search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Caps how many matches a company-name search returns.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}