{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Government Tenders — Find a Tender & Contracts Finder API",
    "description": "UK government tenders, contract opportunities and awards from Find a Tender + Contracts Finder in one de-duplicated feed. Filter by keyword, CPV, value, region, SME; get deadlines, buyer contacts, values, winners. Official open data (OGL). Daily tender alerts.",
    "version": "1.1",
    "x-build-id": "zPAZkQCcscrCdMioF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plumbline-data~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plumbline-data-uk-public-tenders",
        "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/plumbline-data~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-plumbline-data-uk-public-tenders",
        "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/plumbline-data~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-plumbline-data-uk-public-tenders",
        "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": {
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep notices whose title or description contains at least one of these words/phrases (case-insensitive). Matching starts at a word boundary, so \"roof\" finds roof, roofs and roofing but not waterproofing. E.g. roof, cyber security, catering.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Match the main or any additional CPV code by prefix. Examples: 45 = construction work, 4526 = roof works, 72 = IT services, 79 = business services, 85 = health & social.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "noticeStages": {
            "title": "Notice stages",
            "type": "array",
            "description": "tender = open opportunities incl. updates/amendments (default); planning = pipeline / prior information; award = awards & contracts (who won, for how much); implementation = contract details (Contracts Finder); cancellation = cancelled tenders.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "planning",
                "award",
                "implementation",
                "cancellation"
              ],
              "enumTitles": [
                "Open tenders (opportunities)",
                "Planning / pipeline",
                "Awards",
                "Implementation (Contracts Finder)",
                "Cancellations"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Find a Tender = the UK's central platform (all new Procurement Act 2023 notices, above and below threshold, plus older high-value notices). Contracts Finder = England's portal for lower-value and legacy notices. Both by default.",
            "items": {
              "type": "string",
              "enum": [
                "findATender",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "findATender",
              "contractsFinder"
            ]
          },
          "daysBack": {
            "title": "Days back (if no 'from' date)",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "When 'Published from' is empty, look back this many days. Great for daily/weekly scheduled alerts.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published / updated from",
            "type": "string",
            "description": "Start date (YYYY-MM-DD). Find a Tender filters by last-updated date, Contracts Finder by published date."
          },
          "publishedTo": {
            "title": "Published / updated to",
            "type": "string",
            "description": "End date (YYYY-MM-DD, inclusive). Empty = now."
          },
          "minValue": {
            "title": "Minimum value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop notices with an estimated value below this (notices without a value are dropped too when set)."
          },
          "maxValue": {
            "title": "Maximum value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop notices above this value."
          },
          "regions": {
            "title": "Region / town / postcode contains",
            "type": "array",
            "description": "Match delivery region, NUTS code, buyer town or postcode, e.g. London, North West, UKD, Manchester, BS1.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOpen": {
            "title": "Only notices still open (deadline in the future)",
            "type": "boolean",
            "description": "Keep only tenders whose submission deadline has not passed.",
            "default": false
          },
          "smeSuitableOnly": {
            "title": "Only marked suitable for SMEs",
            "type": "boolean",
            "description": "Keep only notices the buyer marked as suitable for small and medium-sized enterprises.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many matching notices. 0 = no limit.",
            "default": 0
          },
          "latestVersionOnly": {
            "title": "Latest version only (de-duplicate)",
            "type": "boolean",
            "description": "When a notice was updated several times in the range, return only its latest version.",
            "default": true
          },
          "includeBuyerContact": {
            "title": "Include buyer contact email & phone",
            "type": "boolean",
            "description": "The procurement contact point the buyer published for suppliers.",
            "default": true
          },
          "includeContactNames": {
            "title": "Include contact person names",
            "type": "boolean",
            "description": "Also include the named individual where the buyer published one. Off by default (personal data - only enable if you have a lawful basis).",
            "default": false
          },
          "windowDays": {
            "title": "Window size (days)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Long ranges are fetched in windows of this many days (newest first) so one API hiccup never loses the whole run.",
            "default": 7
          },
          "delayBetweenRequestsMs": {
            "title": "Delay between API pages (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Pause between API pages. The two UK services share one per-IP rate limit (~1 request/second); keep this at 1000+.",
            "default": 1100
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for timeouts, 429 and 5xx with exponential backoff.",
            "default": 5
          },
          "useServerSideStageFilter": {
            "title": "Use the API's own stage filter (faster, may miss notices)",
            "type": "boolean",
            "description": "The official APIs can pre-filter by stage, but in our tests (Oct 2026) Find a Tender's filter returned only 7 of 66 tender notices for a day. Off by default: we fetch everything in the window and filter locally, which is complete but uses more requests.",
            "default": false
          },
          "maxRateLimitWaitSecs": {
            "title": "Max total rate-limit waiting (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "When the UK API rate-limits (429 + Retry-After, usually 120 s), the Actor pauses and continues. After this much total waiting it stops cleanly and returns what it has.",
            "default": 900
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}