{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — UK Contract Awards & Supplier Win Analytics",
    "description": "Who won which UK public contract, for how much, from which buyer: Contracts Finder + Find a Tender award notices (OCDS open data, OGL). Supplier and buyer analytics (wins, value share, top buyers, CPV, bids where published), monitoring and Slack/webhook alerts.",
    "version": "1.1",
    "x-build-id": "4reuuuvWWoKKUTy6t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-uk-contract-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-uk-contract-awards",
        "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/siteverdict~siteverdict-uk-contract-awards/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-uk-contract-awards",
        "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/siteverdict~siteverdict-uk-contract-awards/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-uk-contract-awards",
        "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": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "<b>Search</b>: all matching awards in the window. <b>Monitor</b>: only awards not seen in previous runs (schedule daily, get alerts).",
            "default": "search"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Sources.",
            "items": {
              "type": "string",
              "enum": [
                "fts",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender (UK, above threshold + Procurement Act notices)",
                "Contracts Finder (England, lower-value contracts)"
              ]
            },
            "default": [
              "fts",
              "contractsFinder"
            ]
          },
          "awardedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "YYYY-MM-DD. Notices published/updated from this date. Default: last 30 days (7 in monitor mode)."
          },
          "awardedTo": {
            "title": "Published to",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "lookbackDays": {
            "title": "Look-back days (when no dates)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Look-back days (when no dates)."
          },
          "suppliers": {
            "title": "Suppliers (name contains, or Companies House number)",
            "type": "array",
            "description": "Suppliers (name contains, or Companies House number).",
            "items": {
              "type": "string"
            }
          },
          "buyers": {
            "title": "Buyers (name contains)",
            "type": "array",
            "description": "Buyers (name contains).",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (title/description/CPV, any)",
            "type": "array",
            "description": "Keywords (title/description/CPV, any).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Exclude keywords.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "e.g. 72 (IT services), 48 (software packages), 79 (business services), 45 (construction).",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum award value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum award value (£)."
          },
          "maxValue": {
            "title": "Maximum award value (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum award value (£)."
          },
          "smeOnly": {
            "title": "SME winners only",
            "type": "boolean",
            "description": "SME winners only.",
            "default": false
          },
          "includeAwardRows": {
            "title": "Output award rows",
            "type": "boolean",
            "description": "Output award rows.",
            "default": true
          },
          "includeSupplierAnalytics": {
            "title": "Output supplier analytics",
            "type": "boolean",
            "description": "Per supplier: awards won, total value, share of the filtered market, top buyers, CPV divisions, average bids where published.",
            "default": true
          },
          "topSuppliers": {
            "title": "How many supplier profiles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many supplier profiles.",
            "default": 25
          },
          "includeBuyerAnalytics": {
            "title": "Output buyer analytics",
            "type": "boolean",
            "description": "Output buyer analytics.",
            "default": false
          },
          "topBuyers": {
            "title": "How many buyer profiles",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many buyer profiles.",
            "default": 10
          },
          "maxAwards": {
            "title": "Max award rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Max award rows.",
            "default": 2000
          },
          "maxPagesPerSource": {
            "title": "Max pages per source (100 notices each)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Max pages per source (100 notices each).",
            "default": 60
          },
          "monitorStateName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Monitor name.",
            "default": "default"
          },
          "alertMinValue": {
            "title": "Alert only for awards of at least (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Alert only for awards of at least (£).",
            "default": 0
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "HTTPS only. Stored encrypted, never logged."
          },
          "webhookUrl": {
            "title": "Webhook URL (JSON POST)",
            "type": "string",
            "description": "HTTPS endpoint; private addresses refused. Stored encrypted, never logged."
          },
          "sampleMode": {
            "title": "Sample mode (recorded real awards, no charge)",
            "type": "boolean",
            "description": "Sample mode (recorded real awards, no charge).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}