{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders Scraper: Contracts Finder + Find a Tender",
    "description": "UK public sector tenders, contract awards and pipeline notices from Contracts Finder and Find a Tender in one de-duplicated table. Filter by stage, keyword, CPV, value, region and buyer, or schedule it for new notices only. Public OCDS APIs, Open Government Licence, no login, no personal data.",
    "version": "1.0",
    "x-build-id": "SyLmE6HUivAT9VzOQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/civitab~uk-tenders-ocds/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-civitab-uk-tenders-ocds",
        "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/civitab~uk-tenders-ocds/runs": {
      "post": {
        "operationId": "runs-sync-civitab-uk-tenders-ocds",
        "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/civitab~uk-tenders-ocds/run-sync": {
      "post": {
        "operationId": "run-sync-civitab-uk-tenders-ocds",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "CF = Contracts Finder (England, lower-value + all central gov). FTS = Find a Tender (UK-wide, higher-value / Procurement Act 2023 notices).",
            "items": {
              "type": "string",
              "enum": [
                "CF",
                "FTS"
              ],
              "enumTitles": [
                "Contracts Finder",
                "Find a Tender"
              ]
            },
            "default": [
              "CF",
              "FTS"
            ]
          },
          "stages": {
            "title": "Notice stages",
            "type": "array",
            "description": "planning = pipeline / early engagement, tender = open opportunities, award = awarded contracts.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ],
              "enumTitles": [
                "Planning / pipeline",
                "Tender (open opportunities)",
                "Award / contract"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Look back this many days from now (ignored if 'Date from' is set).",
            "default": 3
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional start (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS, UTC). Contracts Finder filters by published date, Find a Tender by last-updated date.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional end (default: now).",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title or description contains ANY of these words (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Keep notices with a CPV code starting with any of these, e.g. 72 (IT services) or 45000000.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Min value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose highest stated value is at least this.",
            "default": null
          },
          "maxValue": {
            "title": "Max value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose lowest stated value is at most this.",
            "default": null
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Exact region name (e.g. London, Scotland, North East, East of England) or a NUTS code (e.g. UKM, UKI3; includes the codes under it). Exact match: \"East\" does not match \"North East\". Separate several with commas.",
            "default": ""
          },
          "buyerName": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "e.g. NHS, Council, Ministry of Defence.",
            "default": ""
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many notices. You pay per notice, so this caps cost.",
            "default": 50
          },
          "outputMode": {
            "title": "Output format",
            "enum": [
              "flat",
              "raw"
            ],
            "type": "string",
            "description": "flat = clean one-row-per-notice table. raw = full OCDS release (personal contact data removed).",
            "default": "flat"
          },
          "onlyNew": {
            "title": "Only new notices (monitor mode)",
            "type": "boolean",
            "description": "Skip notices this Actor already returned to you in earlier runs with the same filters. Schedule it daily for alerts.",
            "default": false
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap (100 notices per page).",
            "default": 200
          },
          "requestDelaySecs": {
            "title": "Delay between requests (s)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Politeness delay between API calls.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}