{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders: Find a Tender + Contracts Finder",
    "description": "Open UK public sector tenders from both official services, Find a Tender and Contracts Finder, in one feed: buyer, region, CPV categories, value in GBP with VAT basis, deadline and days left, SME suitability, lots. Filter and track only new or changed tenders.",
    "version": "0.1",
    "x-build-id": "lOM4grcnYV9ijDdSB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yzy001~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yzy001-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/yzy001~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-yzy001-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/yzy001~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-yzy001-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": {
          "cpvCodes": {
            "title": "CPV codes (industry)",
            "type": "array",
            "description": "Keep tenders with any of these CPV codes or their sub-codes, for example 72 (IT services), 45 (construction), 85 (health and social work), 90 (cleaning and environmental). Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. Keep tenders whose title, description, buyer or lot titles contain any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Category",
            "type": "array",
            "description": "Goods, services or works. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "GOODS",
                "SERVICES",
                "WORKS"
              ],
              "enumTitles": [
                "Goods",
                "Services",
                "Works"
              ]
            },
            "default": []
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Optional. Keep tenders whose buyer is in, or whose work is delivered in, any of these regions.",
            "items": {
              "type": "string",
              "enum": [
                "North East",
                "North West",
                "Yorkshire and the Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Wales",
                "Scotland",
                "Northern Ireland"
              ]
            },
            "default": []
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Notices published in the last N days, today included (1-31). About 400 tenders a week across both services. Ignored when a from date is set.",
            "default": 7
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Optional. First publication date to include (YYYY-MM-DD). At most 31 days."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Last publication date to include. Defaults to today."
          },
          "sources": {
            "title": "Services",
            "type": "array",
            "description": "Find a Tender carries most notices since the Procurement Act 2023; Contracts Finder carries lower-value ones.",
            "items": {
              "type": "string",
              "enum": [
                "FIND_A_TENDER",
                "CONTRACTS_FINDER"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "FIND_A_TENDER",
              "CONTRACTS_FINDER"
            ]
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Leave out tenders whose deadline has passed or that are cancelled or complete.",
            "default": true
          },
          "minDaysToDeadline": {
            "title": "Minimum days to deadline",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Keep tenders with at least this many days left."
          },
          "minValueGbp": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Notices without a value are left out when this is set."
          },
          "maxValueGbp": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Notices without a value are left out when this is set."
          },
          "smeSuitableOnly": {
            "title": "Only tenders marked suitable for SMEs",
            "type": "boolean",
            "description": "Keep tenders the buyer marked as suitable for small and medium-sized enterprises.",
            "default": false
          },
          "includePlanning": {
            "title": "Include planning notices",
            "type": "boolean",
            "description": "Also return planned procurements and market engagement notices.",
            "default": false
          },
          "allowPartial": {
            "title": "Allow partial results",
            "type": "boolean",
            "description": "If one service fails, return the other and name the failed one. Off = the run fails.",
            "default": true
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember which tenders were returned before and mark each row NEW, CHANGED, SEEN or FIRST_RUN.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new or changed tenders",
            "type": "boolean",
            "description": "With tracking on, return only tenders not returned before, or changed since.",
            "default": false
          },
          "maxItems": {
            "title": "Max tenders",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit on rows, newest first.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}