{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Government Tenders – Contracts Finder & Find a Tender",
    "description": "UK public tenders from both official APIs, Find a Tender and Contracts Finder, in one schema: keyword, CPV, region, value, deadline and SME filters, lots, documents, awards, duplicates merged, only-new alerts. Includes Procurement Act 2023 notices. $2 per 1,000 tenders.",
    "version": "0.1",
    "x-build-id": "AtL4HAllS1Aleoulr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~uk-government-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-uk-government-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/gazidev~uk-government-tenders/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-uk-government-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/gazidev~uk-government-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-uk-government-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": "Keep notices that contain any of these words or phrases (title, description, CPV names, lots). Matches at the start of a word: `roof` also finds `roofing`. Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices that contain any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "For example `72` (IT services) or `45000000` (construction). Trailing zeros of an 8-digit code are treated as a prefix.",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Notice stages",
            "uniqueItems": true,
            "type": "array",
            "description": "Which notices to return. Default: open calls for tender.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract"
              ],
              "enumTitles": [
                "Planning (pipeline, market engagement)",
                "Tender (open calls)",
                "Award (awards and contract details)",
                "Contract changes and terminations"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "publishedWithinDays": {
            "title": "Published in the last … days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Publication window. Newest first; reading stops at `maxItems` or after 15 pages (1,500 notices of any stage) per service and run. Find a Tender publishes about 500 notices per working day, so 1–3 days fit in one run.",
            "default": 3
          },
          "openOnly": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Drop tender-stage notices whose deadline has passed or that were cancelled, or that a newer award notice in the window closed. Does not affect the other stages.",
            "default": true
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 1500,
            "type": "integer",
            "description": "Upper limit of notices returned (and charged) per run.",
            "default": 50
          },
          "regions": {
            "title": "UK regions",
            "uniqueItems": true,
            "type": "array",
            "description": "Place of delivery. UK-wide notices always match. Notices without any location do not match.",
            "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"
              ]
            }
          },
          "minValue": {
            "title": "Minimum value",
            "minimum": 0,
            "type": "integer",
            "description": "Estimated value (or awarded value) in the notice's currency, usually GBP."
          },
          "maxValue": {
            "title": "Maximum value",
            "minimum": 0,
            "type": "integer",
            "description": "Estimated value (or awarded value) in the notice's currency, usually GBP."
          },
          "keepUnknownValue": {
            "title": "Keep notices without a value",
            "type": "boolean",
            "description": "Only used with a value filter. Many buyers do not publish a value.",
            "default": true
          },
          "smeSuitable": {
            "title": "Only SME-suitable",
            "type": "boolean",
            "description": "Keep only notices the buyer marked as suitable for small and medium enterprises.",
            "default": false
          },
          "buyerContains": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "For example `NHS` or `Council`."
          },
          "deadlineAfter": {
            "title": "Deadline after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Keep only tenders whose deadline is after this date."
          },
          "minDaysLeft": {
            "title": "Minimum days left to bid",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Keep only tenders with at least this many days until the deadline. Useful in scheduled runs."
          },
          "sources": {
            "title": "Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Both by default.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender",
              "contracts-finder"
            ]
          },
          "publishedBefore": {
            "title": "Published before (to continue a long window)",
            "type": "string",
            "description": "Optional end of the window, e.g. `2026-11-20T09:00:00Z`. To read further back than one run allows, copy `resumeBefore` from the previous run's OUTPUT, raise the days, and wait about 5 minutes between runs."
          },
          "includeDocuments": {
            "title": "Include document links",
            "type": "boolean",
            "description": "Add links to bidding documents and buyer portals.",
            "default": true
          },
          "includeContacts": {
            "title": "Include buyer contact",
            "type": "boolean",
            "description": "Add the contact name, e-mail and telephone published in the notice. These can be personal data of buyer staff: use them only for a lawful purpose.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Remember delivered notices and return (and charge) only notices you have not received before. An updated notice counts as new.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name of the only-new memory. Runs with the same name share it. Empty: one memory per set of filters."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}