{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Find a Tender Scraper: Tenders, Awards, Buyers",
    "description": "Scrape UK public tenders and contract awards from Find a Tender, the official government service, with no login or API key. Each notice: buyer and contact, value, deadline, CPV, region, notice type, lots, suppliers with Companies House numbers, documents. Filter, monitor new notices, pay per notice.",
    "version": "0.1",
    "x-build-id": "J4EzWw65qIp3tf3PP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~uk-find-a-tender-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-uk-find-a-tender-scraper",
        "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/automation_craft~uk-find-a-tender-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-uk-find-a-tender-scraper",
        "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/automation_craft~uk-find-a-tender-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-uk-find-a-tender-scraper",
        "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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Scan notices published or updated in the last N days (used when Date from is empty). Example: 7. One day is about 400 notices.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start of the window, YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC). Overrides Days back. Find a Tender starts on 2021-01-01."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End of the window, YYYY-MM-DD (whole day, UTC) or YYYY-MM-DDTHH:MM:SS. Empty means now."
          },
          "noticeIds": {
            "title": "Notice ids, process ids or URLs",
            "type": "array",
            "description": "Fetch these notices directly instead of scanning a window: notice ids like 091621-2026, procurement process ids (ocids) like ocds-h6vhtk-06dce3 (returns every notice of that process), or Find a Tender notice URLs. Filters are not applied to this list.",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "Keep notices at these stages of the procurement: planning (UK1 to UK3), tender (UK4, UK12), award (UK5, UK6) or contract (UK7, UK9 to UK11). Filtered in the Actor, because the API's own stage filter returns only legacy notices. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract"
              ],
              "enumTitles": [
                "Planning (pipeline, market engagement, planned procurement)",
                "Tender (open opportunities, procurement terminations)",
                "Award (transparency and contract award notices)",
                "Contract (contract details, performance, changes, terminations)"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Keep only these Procurement Act 2023 notice types. LEGACY keeps notices published under the 2015 and 2016 regulations. Empty means all types.",
            "items": {
              "type": "string",
              "enum": [
                "UK1",
                "UK2",
                "UK3",
                "UK4",
                "UK5",
                "UK6",
                "UK7",
                "UK9",
                "UK10",
                "UK11",
                "UK12",
                "UK13",
                "UK14",
                "UK15",
                "UK16",
                "UK17",
                "LEGACY"
              ],
              "enumTitles": [
                "UK1 Pipeline notice",
                "UK2 Preliminary market engagement notice",
                "UK3 Planned procurement notice",
                "UK4 Tender notice",
                "UK5 Transparency notice",
                "UK6 Contract award notice",
                "UK7 Contract details notice",
                "UK9 Contract performance notice",
                "UK10 Contract change notice",
                "UK11 Contract termination notice",
                "UK12 Procurement termination notice",
                "UK13 Dynamic market intention notice",
                "UK14 Dynamic market establishment notice",
                "UK15 Dynamic market modification notice",
                "UK16 Dynamic market cessation notice",
                "UK17 Payments compliance notice",
                "Legacy notices (2015 and 2016 regulations)"
              ]
            }
          },
          "includeUpdates": {
            "title": "Include updates and corrections",
            "type": "boolean",
            "description": "Keep notices that change an earlier notice (revised tender notices, cancellations, contract changes). Off keeps only first publications.",
            "default": true
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep notices whose title, description or lot text contains at least one of these words or phrases (case insensitive, matched at word starts, so \"ai\" does not match \"maintenance\"). Example: cleaning, software.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title, description or lot text contains any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Keep notices with at least one matching CPV code. A full code with trailing zeros means its whole branch (72000000 keeps every IT service code); a prefix like 4521 works too. Check digits (-5) are ignored.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Keep notices delivered in these places: NUTS or ITL codes of any level (UKI, UKH11, TLH1) or names (London, Wales, Scotland, England, Northern Ireland, South East). The buyer's region is used when a notice names no delivery region.",
            "items": {
              "type": "string"
            }
          },
          "includeNationwide": {
            "title": "Regions: include UK wide notices",
            "type": "boolean",
            "description": "When a region filter is set, also keep notices delivered across the whole UK (region code UK).",
            "default": true
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose estimated or awarded value (excluding VAT where given) is at least this. Notices without a value are dropped when a value filter is set."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose value is at most this."
          },
          "buyerNames": {
            "title": "Buyer names (any)",
            "type": "array",
            "description": "Keep notices whose buyer name contains one of these texts, for example NHS, Council, Ministry of Defence.",
            "items": {
              "type": "string"
            }
          },
          "supplierNames": {
            "title": "Supplier names (any)",
            "type": "array",
            "description": "Keep award and contract notices naming a supplier that contains one of these texts. Use it to track a competitor's wins.",
            "items": {
              "type": "string"
            }
          },
          "supplierCompanyNumbers": {
            "title": "Supplier Companies House numbers",
            "type": "array",
            "description": "Keep notices naming a supplier with one of these Companies House numbers (8 characters, leading zeros optional).",
            "items": {
              "type": "string"
            }
          },
          "procurementCategories": {
            "title": "Procurement categories",
            "type": "array",
            "description": "Keep notices whose main category is one of these.",
            "items": {
              "type": "string",
              "enum": [
                "goods",
                "services",
                "works"
              ],
              "enumTitles": [
                "Goods",
                "Services",
                "Works"
              ]
            }
          },
          "smeSuitableOnly": {
            "title": "Suitable for SMEs only",
            "type": "boolean",
            "description": "Keep notices where at least one lot is marked suitable for small and medium enterprises.",
            "default": false
          },
          "vcseSuitableOnly": {
            "title": "Suitable for VCSEs only",
            "type": "boolean",
            "description": "Keep notices where at least one lot is marked suitable for voluntary, community and social enterprises.",
            "default": false
          },
          "aboveThresholdOnly": {
            "title": "Above threshold only",
            "type": "boolean",
            "description": "Keep notices for contracts above the procurement thresholds.",
            "default": false
          },
          "openForBidsOnly": {
            "title": "Open for bids only",
            "type": "boolean",
            "description": "Keep tender notices whose submission deadline is still in the future.",
            "default": false
          },
          "deadlineWithinDays": {
            "title": "Deadline within days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep notices whose tender or expression of interest deadline falls between now and N days from now."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "type": "string",
            "description": "Keep notices whose deadline is on or after this date (YYYY-MM-DD, UTC)."
          },
          "deadlineTo": {
            "title": "Deadline to",
            "type": "string",
            "description": "Keep notices whose deadline is on or before this date (YYYY-MM-DD, whole day, UTC)."
          },
          "monitorName": {
            "title": "Monitor name (new or changed notices only)",
            "type": "string",
            "description": "Give a schedule a name, for example it-tenders-london, and every run returns only notices that are new or changed since the last run with that name. The scan continues where the last complete run stopped. Known notices are not delivered or charged again."
          },
          "resetMonitor": {
            "title": "Reset the monitor",
            "type": "boolean",
            "description": "Forget what the monitor has seen, so this run treats every notice in the window as new.",
            "default": false
          },
          "includeProcessHistory": {
            "title": "Link every notice of the procurement",
            "type": "boolean",
            "description": "Look up the whole procurement process of each delivered notice and add processNotices, originalNoticeId and previousNoticeId (links an amendment or award to the original tender). One extra API call per procurement, so runs are slower. No extra charge.",
            "default": false
          },
          "includeOcdsRelease": {
            "title": "Include the full OCDS release",
            "type": "boolean",
            "description": "Attach the complete official OCDS release (every field Find a Tender publishes) as ocdsRelease next to the flat fields.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after delivering this many notices. Each delivered notice is one paid result.",
            "default": 100
          },
          "maxPagesToScan": {
            "title": "Maximum pages to scan",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on API pages of 100 notices each (about 11 seconds per page, the service's rate rule). 300 pages is about 30,000 notices, roughly 10 weeks.",
            "default": 300
          },
          "useApifyProxy": {
            "title": "Use an Apify datacenter IP",
            "type": "boolean",
            "description": "Send this run's requests from one Apify datacenter IP held for the whole run (recommended), falling back to the container IP if the proxy fails.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}