{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders incl. Scotland — FTS + CF + PCS",
    "description": "Deduplicated UK procurement notices from three official public feeds, including Scottish site notices, local filters and incremental monitoring. No API key.",
    "version": "0.1",
    "x-build-id": "0vawsRi0ga6G7qorb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/resourcefully_dialect~uk-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-resourcefully_dialect-uk-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/resourcefully_dialect~uk-tenders/runs": {
      "post": {
        "operationId": "runs-sync-resourcefully_dialect-uk-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/resourcefully_dialect~uk-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-resourcefully_dialect-uk-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",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Official feeds to combine. No API key is needed.",
            "items": {
              "type": "string",
              "enum": [
                "fts",
                "cf",
                "pcs"
              ]
            },
            "default": [
              "fts",
              "cf",
              "pcs"
            ]
          },
          "mode": {
            "title": "mode",
            "enum": [
              "snapshot",
              "monitor"
            ],
            "type": "string",
            "description": "snapshot exports the window. monitor persists cursors, CPV context and delivered content versions in a named store.",
            "default": "snapshot"
          },
          "dateFrom": {
            "title": "dateFrom",
            "type": "string",
            "description": "Inclusive UTC start date, YYYY-MM-DD. Omit for yesterday (two calendar days including today). Monitoring without an explicit start uses its high-water mark with a two-day overlap."
          },
          "dateTo": {
            "title": "dateTo",
            "type": "string",
            "description": "Inclusive UTC end date, YYYY-MM-DD. Omit for today. PCS fetches complete calendar months then filters locally."
          },
          "pcsNoticeTypes": {
            "title": "pcsNoticeTypes",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "PCS monthly notice types. Default covers contract/award forms and site/Quick Quote awards.",
            "items": {
              "type": "integer"
            },
            "default": [
              2,
              3,
              102,
              103,
              104
            ]
          },
          "keywords": {
            "title": "keywords",
            "type": "array",
            "description": "Match any whole word or phrase in the full title and description; case insensitive.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywordsAll": {
            "title": "keywordsAll",
            "type": "array",
            "description": "Require every whole word or phrase in title and description.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "excludeKeywords",
            "type": "array",
            "description": "Exclude any matching whole word or phrase.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvPrefixes": {
            "title": "cpvPrefixes",
            "type": "array",
            "description": "Match any CPV prefix, such as 72 or 4521. Use strings to preserve leading zeros.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "itlPrefixes": {
            "title": "itlPrefixes",
            "type": "array",
            "description": "Match buyer ITL/NUTS code prefixes, such as UKM or UKI.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "nations": {
            "title": "nations",
            "type": "array",
            "description": "Match buyer location: England, Scotland, Wales or Northern Ireland. This is not necessarily the delivery location.",
            "items": {
              "type": "string",
              "enum": [
                "England",
                "Scotland",
                "Wales",
                "Northern Ireland"
              ]
            },
            "default": []
          },
          "stages": {
            "title": "stages",
            "type": "array",
            "description": "Keep planning, tender, award, contract, change, termination or other stages; empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract",
                "change",
                "termination",
                "other"
              ]
            },
            "default": []
          },
          "buyerContains": {
            "title": "buyerContains",
            "type": "string",
            "description": "Case-insensitive substring in the organisation buyer name."
          },
          "minValue": {
            "title": "minValue",
            "minimum": 0,
            "type": "number",
            "description": "Minimum value in GBP. Non-GBP valued rows fail numeric value filters."
          },
          "maxValue": {
            "title": "maxValue",
            "minimum": 0,
            "type": "number",
            "description": "Maximum value in GBP; no currency conversion is performed."
          },
          "includeNoValue": {
            "title": "includeNoValue",
            "type": "boolean",
            "description": "Retain rows without a published value, including when value bounds are supplied.",
            "default": true
          },
          "belowThresholdOnly": {
            "title": "belowThresholdOnly",
            "type": "boolean",
            "description": "Best-effort signal: explicit aboveThreshold=false, PCS site types 102/103/104, or an explicit below-threshold declaration. Not a legal threshold determination.",
            "default": false
          },
          "deadlineAfter": {
            "title": "deadlineAfter",
            "type": "string",
            "description": "Require a tender deadline strictly after this ISO date or timezone-qualified timestamp."
          },
          "dedup": {
            "title": "dedup",
            "enum": [
              "exact",
              "off"
            ],
            "type": "string",
            "description": "exact merges same-source stage versions and Scottish FTS/PCS reference matches. off retains releases.",
            "default": "exact"
          },
          "fuzzyCrossSource": {
            "title": "fuzzyCrossSource",
            "type": "boolean",
            "description": "Optional FTS/CF match: identical normalized buyer/title/value/currency, same stage and dates within three days. Confidence 0.85; may produce false matches.",
            "default": false
          },
          "maxItems": {
            "title": "maxItems",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum notices delivered this run. Zero makes no source requests; monitor retains undelivered work.",
            "default": 100
          },
          "includeDescription": {
            "title": "includeDescription",
            "type": "boolean",
            "description": "Include the sanitized description in output. Filters still use the full sanitized text.",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "descriptionMaxChars",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum output description length; matching and content versioning use full sanitized text.",
            "default": 2000
          },
          "monitorStateKey": {
            "title": "monitorStateKey",
            "type": "string",
            "description": "Key in the named uk-tenders-monitor store. Reuse it across fresh default datasets. Use one serial writer per key.",
            "default": "UK_TENDERS_STATE"
          },
          "requestPacingMs": {
            "title": "requestPacingMs",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum interval between request starts per host, including retries.",
            "default": 1000
          },
          "maxRetries": {
            "title": "maxRetries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries after the first attempt. Exhaustion saves the checkpoint and ends cleanly.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "proxyConfiguration",
            "type": "object",
            "description": "Optional user-supplied Apify/custom proxy configuration. Default is a direct connection; proxy services may have separate costs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}