{
  "openapi": "3.0.1",
  "info": {
    "title": "Find a Tender Scraper & Monitor (UK FTS Tenders & Awards)",
    "description": "Scrape UK Find a Tender (FTS) notices via the official OCDS API: tenders, awards, pipeline and contract changes under the Procurement Act 2023. CPV, keyword and value filters; monitor mode returns only new and updated notices. OGL v3.0, no key.",
    "version": "1.0",
    "x-build-id": "4VYLGlhmMbEnwdaKD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestreldata~find-a-tender-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestreldata-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/kestreldata~find-a-tender-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kestreldata-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/kestreldata~find-a-tender-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kestreldata-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Find a Tender is the default. You can add UK Contracts Finder (below-threshold England) or EU TED in the same run.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder",
                "ted"
              ],
              "enumTitles": [
                "UK Find a Tender (FTS)",
                "UK Contracts Finder",
                "EU TED (Tenders Electronic Daily)"
              ]
            },
            "default": [
              "find-a-tender"
            ]
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "UK sources: matched in title/description. TED: full-text search in all languages.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title/description contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (prefix)",
            "type": "array",
            "description": "e.g. 72 (IT services), 48 (software packages), 45 (construction works), 7200.",
            "items": {
              "type": "string"
            }
          },
          "tedCountries": {
            "title": "TED buyer countries",
            "type": "array",
            "description": "Only used when the TED source is selected. ISO 3166 alpha-3 codes, e.g. DEU, FRA, IRL, NLD. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Min value",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated/award value in the notice currency. Notices without a value are dropped when set."
          },
          "maxValue": {
            "title": "Max value",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum value in the notice currency."
          },
          "cfStages": {
            "title": "Notice stages",
            "type": "array",
            "description": "planning = pipeline / preliminary market engagement, tender = open opportunities (incl. updates & cancellations), award = awarded contracts, contract = amendments/terminations (FTS only).",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "tedFormTypes": {
            "title": "TED notice kinds",
            "type": "array",
            "description": "Only used when the TED source is selected. competition = calls for tender, result = award notices, planning = prior information, change = corrigenda.",
            "items": {
              "type": "string",
              "enum": [
                "competition",
                "result",
                "planning",
                "change"
              ]
            },
            "default": [
              "competition"
            ]
          },
          "openOnly": {
            "title": "Only notices with a future deadline",
            "type": "boolean",
            "description": "Drop notices whose submission deadline has passed.",
            "default": false
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Published-date window for the first run (and every run in 'all' mode). Monitor runs continue from the previous run with a 1-day overlap.",
            "default": 7
          },
          "emitMode": {
            "title": "What to output",
            "enum": [
              "changes",
              "all"
            ],
            "type": "string",
            "description": "Monitor mode compares with the previous run with the same state name and filters.",
            "default": "changes"
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Notice description text (emails and phone numbers are redacted).",
            "default": false
          },
          "maxResultsPerSource": {
            "title": "Max results per source",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit.",
            "default": 0
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "Use different names for different monitors.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset state",
            "type": "boolean",
            "description": "Treat everything as new this run.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}