{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Contract Awards + Supplier Health",
    "description": "UK public contract awards from Find a Tender and Contracts Finder, with every supplier matched to Companies House (confidence + evidence) and register signals to review.",
    "version": "0.1",
    "x-build-id": "adRQV7jcVIhyoowCa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oval_opera_myg~uk-contract-awards-supplier-health/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oval_opera_myg-uk-contract-awards-supplier-health",
        "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/oval_opera_myg~uk-contract-awards-supplier-health/runs": {
      "post": {
        "operationId": "runs-sync-oval_opera_myg-uk-contract-awards-supplier-health",
        "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/oval_opera_myg~uk-contract-awards-supplier-health/run-sync": {
      "post": {
        "operationId": "run-sync-oval_opera_myg-uk-contract-awards-supplier-health",
        "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": [
              "awards",
              "suppliers"
            ],
            "type": "string",
            "description": "awards: one row per award x supplier. suppliers: one profile per company number in supplierCompanyNumbers, with the awards they won in the date window.",
            "default": "awards"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official OCDS APIs. No login or key needed.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender",
              "contracts-finder"
            ]
          },
          "dateFrom": {
            "title": "Published/updated from",
            "type": "string",
            "description": "Notices published (Contracts Finder) or updated (Find a Tender) on or after this date. Default: lookbackDays before dateTo."
          },
          "dateTo": {
            "title": "Published/updated to",
            "type": "string",
            "description": "Default: now."
          },
          "lookbackDays": {
            "title": "Lookback days (if no dateFrom)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Used when dateFrom is empty.",
            "default": 30
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Any keyword in the title or description (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Prefix match: 90910000 matches 9091xxxx.",
            "items": {
              "type": "string"
            }
          },
          "buyerNameContains": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Any of these substrings in the buyer name (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Delivery regions",
            "type": "array",
            "description": "UK region names, e.g. North West, London, Scotland. Find a Tender NUTS/ITL codes are mapped to these names.",
            "items": {
              "type": "string"
            }
          },
          "minValueGBP": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Awards without a value are excluded when set."
          },
          "maxValueGBP": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Awards without a value are excluded when set."
          },
          "supplierCompanyNumbers": {
            "title": "Company numbers (suppliers mode)",
            "type": "array",
            "description": "Up to 500 Companies House numbers, e.g. 02183240 or SC188426.",
            "items": {
              "type": "string"
            }
          },
          "scanAwards": {
            "title": "Find awards for these companies (suppliers mode)",
            "type": "boolean",
            "description": "Scan notices in the date window for awards to these companies. Turn off for a company-only health check.",
            "default": true
          },
          "enrichSuppliers": {
            "title": "Match suppliers to Companies House",
            "type": "boolean",
            "description": "Match each supplier to Companies House and add company-level health fields and flags.",
            "default": true
          },
          "minMatchConfidence": {
            "title": "Minimum match confidence",
            "enum": [
              "0.85",
              "0.9",
              "0.95"
            ],
            "type": "string",
            "description": "Below this, the supplier is returned as review/unmatched with the best candidate in matchEvidence, and is not charged as enriched.",
            "default": "0.85"
          },
          "includeUnmatched": {
            "title": "Include unmatched / non-company suppliers",
            "type": "boolean",
            "description": "Also return rows whose supplier is unmatched, in review, or not a company (labelled, not force-matched).",
            "default": true
          },
          "includeOfficerData": {
            "title": "Include officer data",
            "type": "boolean",
            "description": "Off by default. When on: adds an aggregate count of officer appointments/resignations in the last 12 months, and adds the names of officers shared with possible successor companies (matchEvidence.successorCandidates[].sharedOfficerNames). Personal data: only turn on if you have a lawful basis to process it. When off, output only says whether officers are shared and how many. Needs the live Companies House API.",
            "default": false
          },
          "useLiveCompaniesHouse": {
            "title": "Live Companies House checks",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "auto: the live Companies House API is called only for suppliers that are unmatched or in the review bucket, not in the monthly index (e.g. dissolved), or whose index record is not Active or has accounts / confirmation statement past due. Everyone else uses the monthly bulk index. always: refresh every matched supplier (many more requests; only with your own companiesHouseApiKey, otherwise treated as auto). never: index only. In suppliers mode each requested company is always looked up live when a key is available.",
            "default": "auto"
          },
          "companiesHouseApiKey": {
            "title": "Your Companies House API key (optional)",
            "type": "string",
            "description": "Optional. A free key from developer.company-information.service.gov.uk (REST API key). If supplied it is used instead of the Actor's shared key, so your run gets its own 600 requests / 5 min budget and is never cut back to index-only by other users' traffic. Stored encrypted; never logged or returned."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum dataset items to return.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}