{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders: Contracts Finder + Find a Tender",
    "description": "UK government tenders and contract awards from Contracts Finder and Find a Tender in one de-duplicated feed, via the official OCDS APIs. Filter by stage, keyword, CPV, value and deadline. Includes buyer, suppliers, award value and SME flag. Monitor mode returns only new notices.",
    "version": "0.2",
    "x-build-id": "cSHkRyQpoW4t3BPPP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mmm_mita~uk-public-tenders-unified/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mmm_mita-uk-public-tenders-unified",
        "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/mmm_mita~uk-public-tenders-unified/runs": {
      "post": {
        "operationId": "runs-sync-mmm_mita-uk-public-tenders-unified",
        "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/mmm_mita~uk-public-tenders-unified/run-sync": {
      "post": {
        "operationId": "run-sync-mmm_mita-uk-public-tenders-unified",
        "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": "Contracts Finder (England, lower-value) and Find a Tender (UK-wide, above threshold).",
            "items": {
              "type": "string",
              "enum": [
                "contracts-finder",
                "find-a-tender"
              ]
            },
            "default": [
              "contracts-finder",
              "find-a-tender"
            ]
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "tender = open opportunities, award = contract awards (who won), planning = early market engagement.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far back to look.",
            "default": 3
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title/description contains any of these (case-insensitive). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "CPV prefixes",
            "type": "array",
            "description": "e.g. 72 (IT), 45 (construction). Matches main and additional CPV codes.",
            "items": {
              "type": "string"
            }
          },
          "minValueGbp": {
            "title": "Minimum value (GBP)",
            "type": "integer",
            "description": "Notices without a value are kept."
          },
          "onlyOpenDeadline": {
            "title": "Only future deadlines",
            "type": "boolean",
            "description": "Drop tenders whose deadline has passed.",
            "default": false
          },
          "dedupeAcrossSources": {
            "title": "De-duplicate across sources",
            "type": "boolean",
            "description": "Many notices are published on both portals; keep one.",
            "default": true
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper bound on output rows.",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor mode (only new)",
            "type": "boolean",
            "description": "Remember notices between runs; schedule for alerts.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Use one name per saved search.",
            "default": "uk-tenders-monitor"
          },
          "monitorFirstRunBaseline": {
            "title": "Monitor: first run is a free baseline",
            "type": "boolean",
            "description": "In monitor mode, the first run (empty memory) only stores what already exists, with no output and no charge. Later runs return only new records. Turn off to receive (and pay for) the existing records on the first run too.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}