{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Gov Contracts Finder Public Tenders & Award Buyer Leads",
    "description": "Extract live UK Cabinet Office Contracts Finder (OCDS) open public tenders, early market pipelines & awarded contracts across NHS, MoD & UK councils with direct buyer emails, GBP values, CPV codes, SME flags & winners.",
    "version": "1.0",
    "x-build-id": "WaNEwYiJIxY99Sl6x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/regpulse-data~uk-gov-contracts-finder-tenders-award-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-regpulse-data-uk-gov-contracts-finder-tenders-award-leads",
        "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/regpulse-data~uk-gov-contracts-finder-tenders-award-leads/runs": {
      "post": {
        "operationId": "runs-sync-regpulse-data-uk-gov-contracts-finder-tenders-award-leads",
        "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/regpulse-data~uk-gov-contracts-finder-tenders-award-leads/run-sync": {
      "post": {
        "operationId": "run-sync-regpulse-data-uk-gov-contracts-finder-tenders-award-leads",
        "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": {
          "mode": {
            "title": "Operation Mode",
            "enum": [
              "open_tenders",
              "contract_awards",
              "early_pipeline",
              "watchlist_diff"
            ],
            "type": "string",
            "description": "Select 'open_tenders' for active UK government tender opportunities (stages=tender), 'contract_awards' for newly awarded UK public contracts with winning suppliers & GBP values (stages=award), 'early_pipeline' for pre-tender market engagement notices (stages=planning), or 'watchlist_diff' for stateful monitoring of newly published or stage-changed notices.",
            "default": "open_tenders"
          },
          "query": {
            "title": "Keyword Search Query",
            "type": "string",
            "description": "Optional case-insensitive keyword filter matching across title, description, buyer name, winning supplier names, and CPV description (e.g., 'cybersecurity', 'NHS cloud', '\"managed service\"', 'construction')."
          },
          "cpvPrefixes": {
            "title": "CPV Sector Code Prefixes",
            "type": "array",
            "description": "Filter by UK/EU Common Procurement Vocabulary (CPV) numeric prefixes — e.g., ['72', '48'] for IT & Software, ['79'] for Business & Consulting, ['45'] for Construction, ['85'] for Healthcare & NHS, ['71'] for Engineering. Leave empty to include all sectors.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Publication Lookback Window (Days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Number of calendar days back from today to search Contracts Finder notices by publication date (1 to 365).",
            "default": 14
          },
          "minValueGbp": {
            "title": "Minimum Contract Value (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum contract value threshold in GBP (checked against awarded value or estimated value). Notices without a value meeting this threshold are excluded."
          },
          "maxValueGbp": {
            "title": "Maximum Contract Value (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum contract value threshold in GBP. Notices without a value or exceeding this threshold are excluded."
          },
          "onlySuitableForSme": {
            "title": "Only SME-Suitable Opportunities",
            "type": "boolean",
            "description": "When enabled, returns only notices explicitly flagged by the UK buyer as suitable for Small and Medium-sized Enterprises (SMEs).",
            "default": false
          },
          "onlyOpenDeadlines": {
            "title": "Only Open Submission Deadlines",
            "type": "boolean",
            "description": "When enabled, returns only tenders whose submission deadline is still in the future. If omitted, automatically defaults to true in 'open_tenders' mode and false in 'contract_awards', 'early_pipeline', and 'watchlist_diff'."
          },
          "hasBuyerEmailOnly": {
            "title": "Only Notices With Direct Buyer Email",
            "type": "boolean",
            "description": "When enabled, excludes notices that do not include a direct UK public-sector buyer contact email address.",
            "default": false
          },
          "regions": {
            "title": "UK Regions or Localities Filter",
            "type": "array",
            "description": "Optional case-insensitive UK region, nation, or locality filters (e.g., ['London', 'South East', 'West Midlands', 'North West', 'Scotland', 'Wales', 'Manchester']). Matches buyer region/locality and contract delivery addresses.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum Records to Return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of structured Contracts Finder records to deliver (1 to 5,000).",
            "default": 100
          },
          "stateStoreName": {
            "title": "Watchlist State Store Name (for watchlist_diff Mode)",
            "type": "string",
            "description": "Named persistent Apify Key-Value Store used to retain previously seen OCIDs and contract stages across scheduled watchlist_diff runs.",
            "default": "uk-contracts-finder-watchlist-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}