{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders: Find a Tender + Contracts Finder Notices",
    "description": "UK public procurement notices from the official Find a Tender and Contracts Finder OCDS APIs in one clean schema. Filter by keyword, CPV code, value, date and open deadline.",
    "version": "0.1",
    "x-build-id": "Lj4eEDuoxEDErCkcG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studded_lantana~uk-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studded_lantana-uk-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/studded_lantana~uk-tenders/runs": {
      "post": {
        "operationId": "runs-sync-studded_lantana-uk-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/studded_lantana~uk-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-studded_lantana-uk-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official UK source to read: find-a-tender (UK-wide, mostly higher-value notices) and/or contracts-finder (England, lower-value notices). Leave as both to cover the widest set of notices; results from both share one schema.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender",
              "contracts-finder"
            ]
          },
          "stages": {
            "title": "Notice stages",
            "type": "array",
            "description": "Which kind of notice to return. tender = opportunities to bid on (default). planning = early market engagement and pipeline notices, before a tender opens. award = contracts already awarded, including the winning suppliers and the awarded value; use this to see who won.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "planning",
                "award"
              ],
              "enumTitles": [
                "Tender (opportunities)",
                "Planning (pipeline / market engagement)",
                "Award"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "How far back to look: notices published (Contracts Finder) or last updated (Find a Tender) in the last N days, including today (UTC). Days are calendar days, so 1 means today only: for a daily check use 2 and skip notices already seen; use 7 for a weekly one. Maximum 31. Ignored if Date from is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional start of a fixed period, as YYYY-MM-DD (e.g. \"2026-09-01\"). Use it with Date to instead of Days back. The period can be at most 31 days; for a longer history, run once per month."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional. YYYY-MM-DD, inclusive. Defaults to today (UTC)."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title or description contains any of these words or phrases (case-insensitive), e.g. [\"software\", \"cloud hosting\"]. A notice matches if at least one appears, so add synonyms as separate entries. Leave empty to return all notices.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Keep notices in these procurement categories (CPV codes). Trailing zeros widen the match, so a division code covers everything under it: \"72000000\" IT services, \"48000000\" software packages, \"45000000\" construction work, \"79000000\" business services, \"85000000\" health and social work. A short prefix such as \"45\" works too. Leave empty for all categories.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "type": "integer",
            "description": "Keep notices whose estimated value (awarded value for award notices) is at least this many pounds, e.g. 50000. Many buyers publish no value, and those notices are dropped when this is set, so leave it empty for the fullest list."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "type": "integer",
            "description": "Keep notices whose estimated value (awarded value for award notices) is at most this many pounds, e.g. 1000000. Notices without a published value are dropped when this is set."
          },
          "openOnly": {
            "title": "Only open tenders",
            "type": "boolean",
            "description": "Set to true to keep only notices whose tender deadline is still in the future, i.e. opportunities that can still be bid on. Use it with the tender stage.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many matching notices. You are charged per notice returned, so this also caps the cost of the run. A week of tender notices from both sources is usually under 100.",
            "default": 200
          },
          "maxPagesPerSource": {
            "title": "Max pages per source and stage",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Advanced; the default is fine for most runs. How many pages (up to 100 notices each) to scan per source and stage before stopping. Lower it to bound run time on wide date ranges.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}