{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders — Contracts Finder + Find a Tender",
    "description": "Normalised UK public procurement notices from the official Find a Tender and Contracts Finder OCDS APIs. One schema, no HTML scraping.",
    "version": "1.0",
    "x-build-id": "634B9YYMaEQCoDVDw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/samueledorodion~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-samueledorodion-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/samueledorodion~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-samueledorodion-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/samueledorodion~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-samueledorodion-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",
            "type": "array",
            "description": "Case-insensitive words or phrases. A notice matches when any keyword appears in the title, description, or CPV description. Leave empty to skip keyword filtering.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary prefixes. \"72\" matches 72000000 and 72400000. Check digits such as 72000000-8 are accepted.",
            "items": {
              "type": "string"
            }
          },
          "portals": {
            "title": "Portals",
            "enum": [
              "both",
              "fts",
              "cf"
            ],
            "type": "string",
            "description": "Find a Tender covers higher-value and Procurement Act notices. Contracts Finder covers below-threshold notices from contracting authorities in England and reserved central-government notices.",
            "default": "both"
          },
          "stages": {
            "title": "Stage",
            "enum": [
              "all",
              "planning",
              "tender",
              "award"
            ],
            "type": "string",
            "description": "planning (pipelines and early engagement), tender (live opportunities), or award (contract awards). Applied after download. Find a Tender's own stages parameter currently drops Procurement Act notices, so this Actor does not send it.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start of the window. A date without a time is UTC midnight. Leave empty for 7 days ago."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End of the window. A date without a time includes the whole UTC day. Leave empty for now."
          },
          "valueMinGbp": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Keep notices whose published value is at least this many pounds. Notices with no GBP value are excluded when a bound is set. Net amount is used when the API publishes both net and gross."
          },
          "valueMaxGbp": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Keep notices whose published value is at most this many pounds."
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Case-insensitive text matched against the delivery region, for example \"North West\" or \"UKD\"."
          },
          "nutsCodes": {
            "title": "NUTS codes",
            "type": "array",
            "description": "NUTS prefixes. \"UKD\" matches UKD and UKD12. A notice matches when any code matches.",
            "items": {
              "type": "string"
            }
          },
          "buyerName": {
            "title": "Buyer name",
            "type": "string",
            "description": "Case-insensitive substring of the contracting authority name."
          },
          "supplierName": {
            "title": "Supplier name",
            "type": "string",
            "description": "Case-insensitive substring of an awarded supplier name."
          },
          "supplierCompanyNumber": {
            "title": "Supplier company number",
            "type": "string",
            "description": "UK Companies House number (GB-COH). Leading zeros are ignored, so 03864648 and 3864648 match."
          },
          "smeSuitable": {
            "title": "SME suitable",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Suitability is taken from the published OCDS flag, lot suitability, or a reserved-participation mark for SMEs.",
            "default": "any"
          },
          "vcseSuitable": {
            "title": "VCSE suitable",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "VCSE means a voluntary, community, or social enterprise. Same published-flag rules as SME suitable.",
            "default": "any"
          },
          "closingWithinDays": {
            "title": "Closing within days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep tenders whose submission deadline is still open and falls within this many days. Notices without a deadline are excluded."
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed",
            "type": "boolean",
            "description": "Compare each ocid and updated date with the named key-value store uk-public-tenders-seen. Scheduled monitor runs then return only notices that are new or updated. Leave off for a one-off search so the first run is not empty.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows written to the dataset, newest first across the selected portals. The default of 25 stays inside the free notice allowance.",
            "default": 25
          },
          "includeRawOcds": {
            "title": "Include raw OCDS",
            "type": "boolean",
            "description": "Attach the source release as rawOcds. Each returned notice then also emits the raw-ocds event ($0.002), including notices inside the free allowance.",
            "default": false
          },
          "includeDocumentLinks": {
            "title": "Include document links",
            "type": "boolean",
            "description": "Keep the document title and URL pairs published on the notice. Turn off to return an empty documents array.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}