{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders – Find a Tender & Contracts Finder (OCDS)",
    "description": "Unofficial. Pull UK public procurement notices from the Find a Tender and Contracts Finder OCDS APIs. Filter by CPV, keyword and stage; incremental mode for daily alerts. Export JSON/CSV/Excel. $2 per 1,000 releases.",
    "version": "0.1",
    "x-build-id": "0WLhSfcJmcXAoNFnz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/elekezem~uk-tenders-ocds/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-elekezem-uk-tenders-ocds",
        "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/elekezem~uk-tenders-ocds/runs": {
      "post": {
        "operationId": "runs-sync-elekezem-uk-tenders-ocds",
        "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/elekezem~uk-tenders-ocds/run-sync": {
      "post": {
        "operationId": "run-sync-elekezem-uk-tenders-ocds",
        "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": "Data sources",
            "type": "array",
            "description": "Which official UK sources to query. \"fts\" = Find a Tender (high-value notices), \"contractsFinder\" = Contracts Finder (lower-value, England). Default: both.",
            "items": {
              "type": "string",
              "enum": [
                "fts",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender (high-value)",
                "Contracts Finder (lower-value, England)"
              ]
            },
            "default": [
              "fts",
              "contractsFinder"
            ]
          },
          "mode": {
            "title": "Search mode",
            "enum": [
              "sample",
              "dateRange",
              "incremental"
            ],
            "type": "string",
            "description": "\"sample\" = latest notices from the past 7 days (quick preview, default, max 10). \"dateRange\" = notices in dateFrom..dateTo (set both). \"incremental\" = only notices new since the previous incremental run (for scheduled alerts).",
            "default": "sample"
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "Required when mode=\"dateRange\". ISO date, e.g. \"2026-10-01\" or \"2026-10-01T00:00:00\". Ignored in other modes."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Optional end for mode=\"dateRange\", inclusive, ISO date, e.g. \"2026-10-07\". If omitted, Find a Tender is queried through now; Contracts Finder omits publishedTo so that API defaults to now. Ignored in other modes."
          },
          "maxResults": {
            "title": "Max notices to return",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit on returned notices (1–100000, default 10). You pay per returned notice, so start with 10–50. In sample mode this is capped at 10.",
            "default": 10
          },
          "includeRaw": {
            "title": "Include raw OCDS payload",
            "type": "boolean",
            "description": "If false (default), each item omits the large \"raw\" OCDS object to save tokens. Set true only when you need the full source release.",
            "default": false
          },
          "stages": {
            "title": "Notice stages",
            "type": "array",
            "description": "Optional filter. \"tender\" = open opportunities to bid on; \"award\" = contracts already awarded; \"planning\" = early market engagement; \"implementation\" = contract changes (Contracts Finder only). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "implementation"
              ],
              "enumTitles": [
                "Early market engagement (planning)",
                "Open opportunities (tender)",
                "Awarded contracts (award)",
                "Contract changes (implementation, Contracts Finder only)"
              ]
            }
          },
          "keywords": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional single phrase, case-insensitive, matched in title, description and buyer name. Example: \"cyber security\". Not a boolean query."
          },
          "cpvCodes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Optional list of CPV codes or prefixes, e.g. [\"72\"] = IT services, [\"45\"] = construction. Matches any.",
            "items": {
              "type": "string"
            }
          },
          "watermarkStoreName": {
            "title": "Alert state store (advanced)",
            "type": "string",
            "description": "Only for mode=\"incremental\". Name of the key-value store remembering the last seen date. Leave default unless running several separate alerts.",
            "default": "uk-tenders-ocds-watermarks"
          },
          "minRequestIntervalSeconds": {
            "title": "Request delay (advanced)",
            "minimum": 2,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds between requests to each source, min 2. Leave default.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}