{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Contract Awards: Winners & Values",
    "description": "Recently awarded UK public sector contracts from official Contracts Finder data: winning supplier, buyer, value and dates. Daily monitoring.",
    "version": "1.0",
    "x-build-id": "anWuhdEruxTT2R90T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mastazee_data_lab~uk-public-contract-awards-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mastazee_data_lab-uk-public-contract-awards-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/mastazee_data_lab~uk-public-contract-awards-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mastazee_data_lab-uk-public-contract-awards-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/mastazee_data_lab~uk-public-contract-awards-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mastazee_data_lab-uk-public-contract-awards-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": {
          "lookbackDays": {
            "title": "Days to look back",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Awards published in the last this many days, including today (1 to 366). Ignored when 'Published from' is set, and after the first run when 'Only new awards' is on. About 100–170 award notices are published per working day. For older history, set 'Published from' and 'Published to'.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First publication date to include, as YYYY-MM-DD (UK date). Amended notices count on the day they were last edited."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Last publication date to include, as YYYY-MM-DD. Leave empty for today."
          },
          "buyerContains": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Keep awards whose buyer name contains any of these texts (not case-sensitive), e.g. \"NHS\" or \"Transport for London\".",
            "items": {
              "type": "string"
            }
          },
          "supplierContains": {
            "title": "Supplier name contains",
            "type": "array",
            "description": "Keep awards won by suppliers whose name contains any of these texts (not case-sensitive), e.g. \"Capita\".",
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "CPV code starts with",
            "type": "array",
            "description": "Keep awards with any CPV code starting with one of these digits, e.g. 45 (construction), 72 (IT services), 3314 (medical equipment). Matches the main code and the additional codes.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Delivery region",
            "type": "array",
            "description": "Keep awards delivered in these regions. Many notices name no region, or only 'England'; those are dropped when this is set.",
            "items": {
              "type": "string",
              "enum": [
                "North East",
                "North West",
                "Yorkshire and the Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Scotland",
                "Wales",
                "Northern Ireland"
              ]
            }
          },
          "minValue": {
            "title": "Minimum award value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards worth at least this much. Awards with no published value (about 1 in 12) are dropped unless 'Keep awards with unknown value' is on."
          },
          "includeUnknownValue": {
            "title": "Keep awards with unknown value",
            "type": "boolean",
            "description": "Only matters when a minimum value is set.",
            "default": false
          },
          "onlyNewAwards": {
            "title": "Only awards not seen in earlier runs",
            "type": "boolean",
            "description": "For scheduled monitoring: leave out awards already delivered by a previous run with the same state key. Awards whose notice was amended since come back flagged delivery = \"changed\".",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for this monitor's memory when 'Only awards not seen in earlier runs' is on. Each combination of state key and filters is its own monitor, so changing the filters starts a fresh one automatically. If a run starts while another run of the same monitor is still going, it stops without output so nothing is charged twice.",
            "default": "default"
          },
          "overlapDays": {
            "title": "Overlap days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Incremental runs re-read this many days before the saved position, to catch notices published late. Already delivered awards are not repeated.",
            "default": 2
          },
          "maxResults": {
            "title": "Maximum award rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Leave empty for no limit. In incremental mode the rest come on the next run."
          },
          "maxRuntimeSeconds": {
            "title": "Maximum scan time (seconds)",
            "minimum": 60,
            "maximum": 36000,
            "type": "integer",
            "description": "Stop reading after this long and output what was found. The summary says how far the scan got.",
            "default": 3300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}