{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders: Find a Tender & Contracts Finder Alerts",
    "description": "Search UK public sector tenders, contract awards and planned procurements from Find a Tender and Contracts Finder. Filter by keyword, CPV code, region, buyer, value and deadline; get only new notices since the last run for scheduled tender alerts. Official OCDS APIs, flat output.",
    "version": "1.0",
    "x-build-id": "CtPZq1q7HJxbREnTz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/onibaku~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-onibaku-uk-public-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/onibaku~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-onibaku-uk-public-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/onibaku~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-onibaku-uk-public-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": {
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Matched against the notice title and description, case-insensitive, at the start of a word: \"software\", \"facilities management\", \"cyber\". Leave empty for every notice.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Must not contain",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these, e.g. \"framework\".",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Prefix match on the notice's CPV codes: \"72\" is all IT services, \"4521\" building construction work, \"79620000\" supply of staff. Trailing zeros are ignored, so 72000000 means the same as 72.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Region names (London, North West, Scotland, Wales, England...) or NUTS/ITL codes (UKI, UKD3, TLM). Matched against the buyer's address and the delivery locations.",
            "items": {
              "type": "string"
            }
          },
          "includeUkWide": {
            "title": "Include UK-wide notices in a region search",
            "type": "boolean",
            "description": "Keep notices delivered across the whole UK when you filter by region.",
            "default": true
          },
          "buyerNames": {
            "title": "Buyer name contains (any of)",
            "type": "array",
            "description": "Part of the contracting authority's name, e.g. \"NHS\", \"Leeds City Council\", \"Ministry of Defence\".",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "Leave empty for all. Planning = pipeline, market engagement and planned procurement notices; Tender = open opportunities; Award = contract awards and transparency (direct award) notices; Contract = contract details, changes and terminations.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract"
              ],
              "enumTitles": [
                "Planning (pipeline and early engagement)",
                "Tender (open opportunities)",
                "Award",
                "Contract (details, changes, terminations)"
              ]
            }
          },
          "noticeTypes": {
            "title": "Procurement Act notice types",
            "type": "array",
            "description": "Find a Tender notice types since the Procurement Act 2023, e.g. UK4 (tender notice), UK6 (contract award), UK1 (pipeline), UK2 (preliminary market engagement), UK3 (planned procurement), UK5 (transparency). Leave empty for all. Setting this leaves out Contracts Finder and older-regime notices, which have no UK type.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Estimated or awarded value. Notices with no published value are kept."
          },
          "maxValue": {
            "title": "Maximum value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Estimated or awarded value. Notices with no published value are kept."
          },
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Ignored when \"Published on or after\" is set. Up to 366.",
            "default": 7
          },
          "publishedSince": {
            "title": "Published on or after",
            "type": "string",
            "description": "A date (YYYY-MM-DD). Overrides \"Published in the last N days\"."
          },
          "deadlineAfter": {
            "title": "Tender deadline on or after",
            "type": "string",
            "description": "Only notices with a bid deadline on or after this date: YYYY-MM-DD, \"today\" or \"7 days\" (from now). \"today\" keeps only opportunities still open, and stays right on a schedule. Notices without a deadline are left out when this is set."
          },
          "smeSuitableOnly": {
            "title": "Only notices marked suitable for SMEs",
            "type": "boolean",
            "description": "The buyer says the contract (or a lot) is suitable for small and medium-sized businesses.",
            "default": false
          },
          "includeUpdates": {
            "title": "Include updated notices",
            "type": "boolean",
            "description": "Changes to earlier notices (new deadline, corrected details). They come through as their own notice with isUpdate = true.",
            "default": true
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Find a Tender carries everything under the Procurement Act 2023, at any value. Contracts Finder still carries notices for procurements started under the old rules.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender",
              "contracts-finder"
            ]
          },
          "onlyNewNotices": {
            "title": "Only notices not returned before",
            "type": "boolean",
            "description": "Remembers the notices each run of this search returned and skips them next time. Use with a schedule for tender alerts.",
            "default": false
          },
          "includeDescription": {
            "title": "Include the description",
            "type": "boolean",
            "description": "Plain text, up to 4,000 characters. Turn off for smaller output.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many notices.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}