{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders Scraper — Contracts Finder & Find a Tender",
    "description": "Export UK public procurement notices from both official OCDS APIs: Contracts Finder and Find a Tender. Tenders you can bid on with deadlines and values, and award notices with the winning suppliers and amounts. Filter by keyword, CPV, value and date. No API key.",
    "version": "0.1",
    "x-build-id": "iI7fl9MFYin3hB2NN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/publicdata~uk-contracts-finder-find-a-tender/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-publicdata-uk-contracts-finder-find-a-tender",
        "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/publicdata~uk-contracts-finder-find-a-tender/runs": {
      "post": {
        "operationId": "runs-sync-publicdata-uk-contracts-finder-find-a-tender",
        "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/publicdata~uk-contracts-finder-find-a-tender/run-sync": {
      "post": {
        "operationId": "run-sync-publicdata-uk-contracts-finder-find-a-tender",
        "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": {
          "services": {
            "title": "Which UK service",
            "type": "array",
            "description": "Contracts Finder covers general and below-threshold notices; Find a Tender covers above-threshold procurements. Default: both.",
            "items": {
              "type": "string",
              "enum": [
                "contracts-finder",
                "find-a-tender"
              ],
              "enumTitles": [
                "Contracts Finder",
                "Find a Tender (above threshold)"
              ]
            },
            "default": [
              "contracts-finder",
              "find-a-tender"
            ]
          },
          "stages": {
            "title": "Notice stage",
            "type": "array",
            "description": "tender = open opportunities you can bid on; award = who won and for how much; planning = early notices. Matched on the OCDS release tag, so updates and amendments count as their own stage (an award update is an award). Find a Tender tags a contract award both award and contract; those notices are exported as award, the same as on Contracts Finder.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "contract",
                "implementation"
              ],
              "enumTitles": [
                "Planning",
                "Tender (open to bid)",
                "Award (winners)",
                "Contract",
                "Implementation"
              ]
            },
            "default": [
              "tender",
              "award"
            ]
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Match against title and description, e.g. 'software', 'cleaning', 'consultancy'."
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Filter by classification: 45* construction, 72* IT services, 79* business services, 85* health. A notice matches if any of its CPV codes starts with one of these. Notices published without a CPV code are dropped by this filter.",
            "items": {
              "type": "string"
            }
          },
          "publishedFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Default: 7 days ago. Inclusive, from 00:00."
          },
          "publishedTo": {
            "title": "Published to (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Default: today. Inclusive — notices published on this day are kept."
          },
          "minValue": {
            "title": "Minimum value",
            "type": "integer",
            "description": "Drop notices whose published value is below this amount. Notices published without a value are dropped by this filter too: measured 2026-08-21 over 1,761 live notices, 809 (46%) carry neither a tender value nor an award value — 11 of 471 Contracts Finder (2%) but 798 of 1,290 Find a Tender (62%), so any minimum removes most of Find a Tender. Leave empty for all."
          },
          "openOnly": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Keep only notices whose bidding deadline has not passed.",
            "default": false
          },
          "contractEndFrom": {
            "title": "Contract ends on or after (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep only notices whose contractEnd is on or after this date. Notices with no published contract end are dropped."
          },
          "contractEndTo": {
            "title": "Contract ends on or before (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep only notices whose contractEnd is on or before this date — how you find incumbents whose contract expires in the next 6-12 months."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on exported notices, and on how many you are charged for (0 = unlimited). Split evenly across the selected services so one does not use up the whole budget. It does not limit how many requests the run makes: keyword, CPV and value filters are applied after the rows arrive, so narrow the date window to keep a run short. Both UK services share one per-IP rate limit, so a wide run is cut off part way; the Actor then stops cleanly and exports what it already has.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}