{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders Monitor: Government Contracts & Find a Tender Alerts",
    "description": "UK tenders and government contracts from Find a Tender: UK public procurement notices (Procurement Act 2023, above and below threshold) scored to your CPV codes, keywords, regions and value, with deadlines, SME/VCSE flags and match reasons. Daily tender alerts, 31-day backfill, award tracking.",
    "version": "0.1",
    "x-build-id": "nmlYgQe6p8WDRLFrg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lindenwerk~uk-tender-matcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lindenwerk-uk-tender-matcher",
        "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/lindenwerk~uk-tender-matcher/runs": {
      "post": {
        "operationId": "runs-sync-lindenwerk-uk-tender-matcher",
        "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/lindenwerk~uk-tender-matcher/run-sync": {
      "post": {
        "operationId": "run-sync-lindenwerk-uk-tender-matcher",
        "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": [
              "monitor",
              "backfill",
              "awards"
            ],
            "type": "string",
            "description": "monitor = only notices not returned by a previous run with the same stateKey (schedule it daily; this is the default when the field is omitted, e.g. in API calls). backfill = every notice published or updated in dateFrom..dateTo (max 31 days; without dates: the last 7 days). awards = contract award and contract details notices only (who won what, at what price) in dateFrom..dateTo. The form opens with backfill so a first try shows the last 7 days right away; switch to monitor before you schedule it.",
            "default": "monitor"
          },
          "profileName": {
            "title": "Profile name",
            "type": "string",
            "description": "Free label for this search profile, copied to every output row. Also the default stateKey in monitor mode, so different profiles keep separate \"already seen\" lists. Example: \"it-services-north\"."
          },
          "cpvCodes": {
            "title": "CPV codes (prefix match)",
            "type": "array",
            "description": "CPV classification codes or prefixes. A prefix matches every code that starts with it: \"72\" = IT services, \"48\" = software, \"45\" = construction works, \"909\" = cleaning, \"7971\" = security services, \"85\" = health and social work, \"80\" = education and training. A main-CPV match gives the strongest score. Check digits like \"-8\" are ignored.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words matched in the title (full weight) and in the description (half weight). Case-insensitive. Keywords with 4+ letters also match inside longer words (\"cleaning\" matches \"cleanings\"); shorter ones (ICT, CCTV) only as whole words. Wrap a keyword in double quotes to force whole-word matching. Rare keywords in the current batch weigh a little more than common ones.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Notices whose title or description contain any of these words are dropped (never charged). Same matching rules as keywords. Example: [\"catering\", \"grounds maintenance\"].",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions (ITL code or name)",
            "type": "array",
            "description": "Keep only notices whose delivery location (else buyer address) is in one of these UK regions. Accepts ITL/NUTS codes (\"UKI\" London, \"UKM\" Scotland, \"UKL\" Wales, \"UKN\" Northern Ireland, \"UKD3\" Greater Manchester) or names (\"London\", \"North West\", \"Yorkshire\", \"Midlands\", \"England\"). Notices to be delivered across the whole UK match every region.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Keep only these contract natures. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "services",
                "works"
              ],
              "enumTitles": [
                "goods (supplies)",
                "services",
                "works"
              ]
            }
          },
          "thresholdLevels": {
            "title": "Threshold levels",
            "type": "array",
            "description": "Keep only notices above or below the procurement thresholds. Empty = all. SMEs often want [\"below\"] (smaller contracts, simpler procedures). Notices that do not say are kept.",
            "items": {
              "type": "string",
              "enum": [
                "above",
                "below"
              ],
              "enumTitles": [
                "above: above the Procurement Act thresholds",
                "below: below-threshold notices"
              ]
            }
          },
          "smeSuitableOnly": {
            "title": "Only tenders marked suitable for SMEs",
            "type": "boolean",
            "description": "Keep only tenders the buyer marked as suitable for small and medium-sized enterprises.",
            "default": false
          },
          "vcseSuitableOnly": {
            "title": "Only tenders marked suitable for VCSEs",
            "type": "boolean",
            "description": "Keep only tenders the buyer marked as suitable for voluntary, community and social enterprises (charities, social enterprises).",
            "default": false
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop notices whose published estimated value excl. VAT (awards mode: awarded value) is below this amount. Notices without a published value are kept and say so in matchReasons."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop notices whose published estimated value (awards mode: awarded value) is above this amount."
          },
          "onlyOpen": {
            "title": "Only open tenders",
            "type": "boolean",
            "description": "Drop tenders whose submission deadline (else request-to-participate deadline) has already passed. Tenders without a published deadline are kept.",
            "default": true
          },
          "minScore": {
            "title": "Minimum relevance score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only notices with relevanceScore >= minScore are returned (and charged as scored-match). Guide for a CPV + keyword profile: CPV match only = 50, one title keyword only = 46, CPV + one title keyword = 73, CPV + two keywords = 85+. Ignored for an unscored feed.",
            "default": 40
          },
          "competitorNames": {
            "title": "Competitor names (awards)",
            "type": "array",
            "description": "Only return award notices won by an organisation whose name contains one of these strings (case-insensitive), e.g. [\"Capita\", \"Serco\"]. Use with mode = awards.",
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Lookback days (monitor)",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "Monitor mode: how many days back to look on each run (plus today, UK time). 1 = yesterday and today. Larger values are safe: already delivered notices are skipped and not charged.",
            "default": 1
          },
          "dateFrom": {
            "title": "Date from (backfill / awards)",
            "type": "string",
            "description": "First day (YYYY-MM-DD, UK time) for backfill and awards mode. Default: dateTo minus 6 days. Ranges longer than 31 days are capped to the last 31 days."
          },
          "dateTo": {
            "title": "Date to (backfill / awards)",
            "type": "string",
            "description": "Last day (YYYY-MM-DD), inclusive. Default: today."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which notice types to return. Default: tender (monitor/backfill); awards mode forces award. Tender updates (changed deadlines, new documents) are merged into one row per procurement.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "award",
                "planning",
                "cancellation",
                "modification",
                "other"
              ],
              "enumTitles": [
                "tender (tender / contract notice, UK4 etc.)",
                "award (contract award / contract details, UK6 / UK7 etc.)",
                "planning (pipeline, preliminary market engagement, planned procurement)",
                "cancellation (procurement termination)",
                "modification (contract change)",
                "other"
              ]
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of rows to return (and charge) in this run, best matches first. 0 = no limit. Default 200; the form prefills 25 for a cheap first try, so raise it (or set 0) for full results. The run also stops when your maximum total charge for the run is reached.",
            "default": 200
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "deadline",
              "publicationDate",
              "value"
            ],
            "type": "string",
            "description": "Order of the output rows.",
            "default": "relevance"
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Include a shortened notice description in each row (personal contact details are removed).",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of characters of the description per row.",
            "default": 500
          },
          "includeFunctionalContacts": {
            "title": "Include functional buyer contacts",
            "type": "boolean",
            "description": "Include the buyer's functional contact (e.g. procurement@council.gov.uk, \"Commercial Team\"). Personal names, personal e-mail addresses (first.last@...) and phone numbers are never output.",
            "default": true
          },
          "stateKey": {
            "title": "State key (monitor)",
            "type": "string",
            "description": "Name of the \"already seen\" list kept in the named key-value store \"uk-tender-matcher-state\". Default: the profile name. Use a different key per profile or schedule."
          },
          "resetState": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Forget all notices seen by earlier runs with this stateKey before running (monitor mode).",
            "default": false
          },
          "firstRunBackfillDays": {
            "title": "First-run backfill days (monitor mode)",
            "minimum": 0,
            "maximum": 14,
            "type": "integer",
            "description": "Monitor mode: if a run without saved state (the very first run for this stateKey, or after Reset monitor state) finds nothing new in its lookback window, for example because it starts on a weekend or bank holiday, it looks back this many days once instead, so you see the current open tenders. Later runs are normal monitor runs. 0 = off.",
            "default": 7
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}