{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders API — Find a Tender & Contracts Finder",
    "description": "UK government tenders, pipeline notices and contract awards from Find a Tender (FTS) and Contracts Finder in one deduplicated feed. Filter by keyword, CPV, region, value, deadline and SME. Schedule daily with Only-new and pay only for new notices. $3 per 1,000 notices.",
    "version": "0.1",
    "x-build-id": "Cbrq1dTTLlmgNGq5S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icarodata~uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icarodata-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/icarodata~uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-icarodata-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/icarodata~uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-icarodata-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": "Optional. A notice is kept if ANY keyword appears in its title, description, buyer name or CPV description (case-insensitive). Leave empty for all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional. Drop notices containing ANY of these words.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Optional CPV codes or prefixes, e.g. 72000000 (IT services), 45 (construction works), 79620000. Trailing zeros are treated as a prefix, so 72000000 matches every 72xxxxxx code.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Optional delivery regions: London, South East, South West, East of England, East Midlands, West Midlands, North East, North West, Yorkshire and the Humber, Wales, Scotland, Northern Ireland, England, or ITL/NUTS codes such as UKI, UKM7, UKD33.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeNationwide": {
            "title": "Include UK-wide notices in region filter",
            "type": "boolean",
            "description": "When a region filter is set, also keep notices whose delivery area is the whole UK (or all of England for English regions).",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which kinds of notices to return. Default: tenders (live opportunities).",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract_change",
                "cancellation"
              ],
              "enumTitles": [
                "Planning / pipeline / prior information",
                "Tender / opportunity (open for bids)",
                "Contract award",
                "Contract change / termination",
                "Cancellation"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official services to read. Both by default; duplicates published on both are merged.",
            "items": {
              "type": "string",
              "enum": [
                "find_a_tender",
                "contracts_finder"
              ],
              "enumTitles": [
                "Find a Tender Service (FTS)",
                "Contracts Finder"
              ]
            },
            "default": [
              "find_a_tender",
              "contracts_finder"
            ]
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose estimated or awarded value is at least this amount. Notices without a published value are dropped when set."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose value is at most this amount."
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Look-back window when 'Published from' is empty. For a daily schedule with 'Only new' enabled, 2–3 days is plenty.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional start date (YYYY-MM-DD). Overrides 'Days back'."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Optional end date (YYYY-MM-DD, inclusive)."
          },
          "openForBidsOnly": {
            "title": "Only open for bids",
            "type": "boolean",
            "description": "Keep only notices whose submission deadline is today or later.",
            "default": false
          },
          "deadlineFrom": {
            "title": "Deadline on or after",
            "type": "string",
            "description": "Keep only notices with a submission deadline on or after this date."
          },
          "smeSuitableOnly": {
            "title": "Only suitable for SMEs",
            "type": "boolean",
            "description": "Keep only notices the buyer flagged as suitable for small and medium-sized enterprises.",
            "default": false
          },
          "buyerKeywords": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Optional. Keep only notices whose buyer name contains ANY of these words (e.g. NHS, council, university).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeUpdates": {
            "title": "Include amended notices",
            "type": "boolean",
            "description": "Include updated/amended releases (the latest version of each notice is returned once).",
            "default": true
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after saving this many notices. You are charged only for saved notices.",
            "default": 100
          },
          "maxRunTimeSecs": {
            "title": "Max run time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Internal time budget. When it is reached the Actor stops reading the official APIs and saves the notices found so far (the run still succeeds). Default 180 s; set e.g. 1800 for long back-fills, or 0 for no internal limit (the platform run timeout still applies, minus a 45 s safety margin).",
            "default": 180
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Return only notices not delivered in a previous run with the same filters. State is kept in the named key-value store 'uk-public-tenders-state', so scheduled runs never repeat (or re-bill) a notice.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}