{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders Scraper — Contracts Finder + Find a Tender",
    "description": "Get UK government tenders, contract opportunities and awards from the official Contracts Finder and Find a Tender (FTS) OCDS APIs. Filter by keyword, CPV code, region, value, deadline and SME suitability. No login, no API key, Open Government Licence data.",
    "version": "0.1",
    "x-build-id": "hWeprYIUxDA6gVpqa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/timeless_enigma~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-timeless_enigma-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/timeless_enigma~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-timeless_enigma-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/timeless_enigma~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-timeless_enigma-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official UK portals to query. Contracts Finder = mostly lower-value England notices; Find a Tender = UK-wide higher-value notices.",
            "items": {
              "type": "string",
              "enum": [
                "contractsFinder",
                "findATender"
              ],
              "enumTitles": [
                "Contracts Finder",
                "Find a Tender (FTS)"
              ]
            },
            "default": [
              "contractsFinder",
              "findATender"
            ]
          },
          "stage": {
            "title": "Notice stage",
            "enum": [
              "tender",
              "award",
              "planning",
              "all"
            ],
            "type": "string",
            "description": "tender = open opportunities (tender, tenderUpdate, tenderAmendment; cancellations excluded unless 'Include cancellations' is on); award = award*/contract* (winners, updates, terminations); planning = planning/planningUpdate (pipeline); all = every release, including cancellations.",
            "default": "tender"
          },
          "includeCancellations": {
            "title": "Include tender cancellations",
            "type": "boolean",
            "description": "With stage = tender, also return tenderCancellation releases (FTS: ~37 per week as of Nov 2026). Always included with stage = all.",
            "default": false
          },
          "daysBack": {
            "title": "Days back (for scheduled runs)",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "Used only when 'From date' is empty. Whole UTC days back from 'To date' (default today, UTC): 0 = only the current UTC day, 1 = yesterday + today, 7 = the last week. Dates are UTC calendar days.",
            "default": 7
          },
          "publishedFrom": {
            "title": "From date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Leave empty to use Days back. Contracts Finder filters by publish date; Find a Tender by last-updated date."
          },
          "publishedTo": {
            "title": "To date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today. Max range 366 days."
          },
          "keywords": {
            "title": "Keywords (any match)",
            "type": "array",
            "description": "Keep notices whose title or description contains ANY of these words (case-insensitive). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Keep notices whose main or additional CPV code starts with any of these digits, e.g. 72 (IT services), 45 (construction), 85 (health).",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Keep notices whose delivery/buyer region contains any of these strings, e.g. 'London', 'West Midlands', or ITL/NUTS codes like 'UKI'.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Min value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated (or awarded) value. Notices without a value are dropped when set."
          },
          "maxValue": {
            "title": "Max value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated (or awarded) value."
          },
          "onlyOpen": {
            "title": "Only open (deadline in future)",
            "type": "boolean",
            "description": "Keep only notices with a submission deadline later than now.",
            "default": false
          },
          "smeSuitableOnly": {
            "title": "SME-suitable only",
            "type": "boolean",
            "description": "Keep only notices the buyer marked as suitable for SMEs (mostly Contracts Finder).",
            "default": false
          },
          "dedupeByOcid": {
            "title": "One row per procurement (dedupe by OCID)",
            "type": "boolean",
            "description": "Keep only the newest notice for each procurement (OCID). Turn off to get every amendment/update as its own row.",
            "default": true
          },
          "crossSourceDedupe": {
            "title": "Remove cross-portal duplicates",
            "type": "boolean",
            "description": "Drop a notice when the same procurement (same normalized title + buyer name) was already returned from the source listed first.",
            "default": true
          },
          "includeDescription": {
            "title": "Include full description",
            "type": "boolean",
            "description": "Turn off for smaller rows.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total rows saved (and charged) across all sources. Split fairly: each source gets an equal share and any share a source can't fill goes to the other; rows are interleaved CF/FTS.",
            "default": 200
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap per source; each page is up to 100 raw releases BEFORE stage/filters. Find a Tender is fetched unfiltered (~29 pages per week as of Nov 2026), so for long ranges raise this: ~30 pages per week of FTS. If the cap is hit, RUN_SUMMARY shows hitPageCap=true.",
            "default": 200
          },
          "requestDelayMs": {
            "title": "Delay between API pages (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Be polite to the government APIs.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}