{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Contract Awards (Contracts Finder) & Supplier Analytics",
    "description": "Search UK public sector contract awards from the official Contracts Finder API by keyword, buyer, supplier, CPV code, region, date and value. Clean award records with Companies House numbers, plus buyer/supplier spend rankings.",
    "version": "0.1",
    "x-build-id": "TSchprYqKTnwbau5P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhucl1006~uk-contracts-finder-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhucl1006-uk-contracts-finder-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/zhucl1006~uk-contracts-finder-awards/runs": {
      "post": {
        "operationId": "runs-sync-zhucl1006-uk-contracts-finder-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/zhucl1006~uk-contracts-finder-awards/run-sync": {
      "post": {
        "operationId": "run-sync-zhucl1006-uk-contracts-finder-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": {
          "publishedFrom": {
            "title": "Notices published from",
            "type": "string",
            "description": "Earliest notice publication date (YYYY-MM-DD). Default: 30 days ago. Max range per run: about 3 years."
          },
          "publishedTo": {
            "title": "Notices published to",
            "type": "string",
            "description": "Latest notice publication date (YYYY-MM-DD, inclusive). Default: today."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to find in the notice title or description (case-insensitive). Leave empty for all awards.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword matching",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match ANY keyword or ALL keywords.",
            "default": "any"
          },
          "buyers": {
            "title": "Buyers (contracting authorities)",
            "type": "array",
            "description": "Partial, case-insensitive buyer names, e.g. 'NHS', 'Ministry of Defence', 'Council'.",
            "items": {
              "type": "string"
            }
          },
          "suppliers": {
            "title": "Suppliers",
            "type": "array",
            "description": "Partial, case-insensitive supplier names, e.g. 'Capita', 'Serco'.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (prefix)",
            "type": "array",
            "description": "CPV code prefixes matched against main and additional CPV codes, e.g. '72' (IT services), '45' (construction), '79341'.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Delivery regions",
            "type": "array",
            "description": "Partial region names, e.g. 'London', 'Scotland', 'North West'. Many notices do not state a region.",
            "items": {
              "type": "string"
            }
          },
          "awardDateFrom": {
            "title": "Awarded on or after",
            "type": "string",
            "description": "Optional extra filter on the award (contract signature) date."
          },
          "awardDateTo": {
            "title": "Awarded on or before",
            "type": "string",
            "description": "Optional extra filter on the award date."
          },
          "minAmount": {
            "title": "Minimum awarded value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with a stated value at or above this."
          },
          "maxAmount": {
            "title": "Maximum awarded value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with a stated value at or below this."
          },
          "smeSuitableOnly": {
            "title": "Only notices marked suitable for SMEs",
            "type": "boolean",
            "description": "Keep only opportunities the buyer marked as suitable for small and medium enterprises.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum award records",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of award records to output (0 = no limit). Summary rows are not counted.",
            "default": 1000
          },
          "sortBy": {
            "title": "Sort award records by",
            "enum": [
              "awardDateDesc",
              "awardDateAsc",
              "publishedDesc",
              "amountDesc",
              "amountAsc"
            ],
            "type": "string",
            "description": "Order of award records in the output.",
            "default": "awardDateDesc"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "records",
              "summary",
              "both"
            ],
            "type": "string",
            "description": "Award records, an aggregated spend ranking, or both.",
            "default": "records"
          },
          "summaryBy": {
            "title": "Summarise by",
            "enum": [
              "supplier",
              "buyer",
              "buyerSupplier",
              "fiscalYear",
              "buyerFiscalYear",
              "supplierFiscalYear",
              "cpvDivision",
              "region"
            ],
            "type": "string",
            "description": "Grouping for the spend summary: total awarded GBP, award count, average/median/max, share of total, first/last award date and top counterparties. Joint awards are split equally between suppliers.",
            "default": "supplier"
          },
          "summaryTopN": {
            "title": "Summary rows (top N)",
            "minimum": 0,
            "type": "integer",
            "description": "How many summary rows to output, ranked by total awarded value (0 = all).",
            "default": 50
          },
          "dataSource": {
            "title": "Data access method",
            "enum": [
              "auto",
              "api",
              "bulk"
            ],
            "type": "string",
            "description": "Auto: ranges shorter than 45 days use the live Contracts Finder API; longer ranges read the monthly-refreshed yearly bulk files from the Open Contracting Partnership Data Registry (much faster) and top up the most recent days from the live API. 'Bulk only' skips the live API (data may be up to ~5 weeks old).",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}