{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders Feed (Contracts Finder + Find a Tender)",
    "description": "One clean, de-duplicated feed of UK public-sector tenders and contract awards from the official Contracts Finder and Find a Tender OCDS APIs. Filter by keyword, CPV code, value, region and date; 'new since last run' mode for alerts. OGL v3.0 data, no personal contact data. Unofficial.",
    "version": "0.2",
    "x-build-id": "X9BmdDwmeKgIfbLql"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainsourcedata~uk-public-tenders-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainsourcedata-uk-public-tenders-feed",
        "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/plainsourcedata~uk-public-tenders-feed/runs": {
      "post": {
        "operationId": "runs-sync-plainsourcedata-uk-public-tenders-feed",
        "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/plainsourcedata~uk-public-tenders-feed/run-sync": {
      "post": {
        "operationId": "run-sync-plainsourcedata-uk-public-tenders-feed",
        "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": {
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Case-insensitive; matches title or description. Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (prefix match)",
            "type": "array",
            "description": "E.g. 72000000 (IT services) matches all 72xxxxxx codes; 48 = software packages.",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "Stage filter applied to each release (tender = new and updated opportunities; award includes contract releases). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ],
              "enumTitles": [
                "Planning / pipeline",
                "Tender (open opportunities)",
                "Award"
              ]
            }
          },
          "dateFrom": {
            "title": "From (published/updated)",
            "type": "string",
            "description": "ISO date/time (e.g. 2026-10-01 or 2026-10-01T09:00:00) or relative like '12 hours', '7 days', '2 weeks'. Default: 3 days before 'To' (covers weekends). Ignored in 'new since last run' mode after the first run."
          },
          "dateTo": {
            "title": "To",
            "type": "string",
            "description": "ISO date/time. Default: now (UTC)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum notices returned (newest first). Default 100; raise it for a full feed.",
            "default": 100
          },
          "fastMode": {
            "title": "Fast mode (quick check for AI agents)",
            "type": "boolean",
            "description": "Returns at most 20 newest notices from the last day (unless you set 'From'), with a short rate-limit wait. Typically finishes in under 30 seconds, so AI agents get results without polling.",
            "default": false
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Uses tender value, or total award value if no tender value. Notices without a value are excluded when set."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum value (GBP)."
          },
          "regions": {
            "title": "Delivery regions (text match)",
            "type": "array",
            "description": "Matches delivery region names or NUTS/ITL codes, e.g. 'London', 'UKJ', 'Scotland'.",
            "items": {
              "type": "string"
            }
          },
          "smeSuitableOnly": {
            "title": "Only notices marked suitable for SMEs",
            "type": "boolean",
            "description": "Only notices marked suitable for SMEs.",
            "default": false
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official services to query.",
            "items": {
              "type": "string",
              "enum": [
                "contractsFinder",
                "findATender"
              ],
              "enumTitles": [
                "Contracts Finder",
                "Find a Tender"
              ]
            },
            "default": [
              "contractsFinder",
              "findATender"
            ]
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Remembers notices already returned (per state key) and resumes from where the last run ended. Ideal for scheduled daily alerts.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Use different keys for different saved searches in 'new since last run' mode.",
            "default": "default"
          },
          "latestReleasePerProcess": {
            "title": "Latest release per procurement only",
            "type": "boolean",
            "description": "Collapse multiple updates of the same procurement (ocid) in the window into the newest one.",
            "default": true
          },
          "mergeCrossSourceDuplicates": {
            "title": "Merge notices published on both services",
            "type": "boolean",
            "description": "Merge notices published on both services.",
            "default": true
          },
          "minSecondsBetweenRequests": {
            "title": "Seconds between API requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Politeness delay per request (minimum 1).",
            "default": 1
          },
          "maxRateLimitWaitSecs": {
            "title": "Max total wait for rate limits (seconds)",
            "minimum": 0,
            "maximum": 1800,
            "type": "integer",
            "description": "If Contracts Finder or Find a Tender ask us to slow down, we wait as requested up to this total, then return what we have (partial results are flagged in the status message and RUN_SUMMARY). Default: 150 s for windows up to 3 days, 1800 s for longer backfills."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}