{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders – Find a Tender & Contracts Finder",
    "description": "Get UK government tenders, pipeline notices and contract awards from official Find a Tender and Contracts Finder OCDS APIs: title, buyer, CPV, value, deadline, lots and awarded suppliers. Filter by date (incl. the last N days), stage, keyword and CPV code. Buyer contacts only if you turn them on.",
    "version": "0.1",
    "x-build-id": "tKi73HYeGjBzgWy28"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/justaduck~uk-government-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-justaduck-uk-government-tenders",
        "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/justaduck~uk-government-tenders/runs": {
      "post": {
        "operationId": "runs-sync-justaduck-uk-government-tenders",
        "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/justaduck~uk-government-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-justaduck-uk-government-tenders",
        "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": "Which official service to read. Find a Tender holds notices under the Procurement Act 2023 and above-threshold notices; Contracts Finder holds lower-value notices in England.",
            "items": {
              "type": "string",
              "enum": [
                "find-a-tender",
                "contracts-finder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "find-a-tender"
            ]
          },
          "dateFrom": {
            "title": "Published / updated from",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z?)?)?\\s*$",
            "type": "string",
            "description": "Earliest publication or last-update time, UTC. Format YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. Leave empty (and lastDays/lastHours empty) to start from the newest notices."
          },
          "dateTo": {
            "title": "Published / updated to",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z?)?)?\\s*$",
            "type": "string",
            "description": "Latest publication or last-update time, UTC. Format YYYY-MM-DD (means the end of that day) or YYYY-MM-DDTHH:MM:SS. Leave empty for up to now."
          },
          "lastDays": {
            "title": "Or: last N days",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Notices published or updated in the last N days up to now (the source's current time, UTC). Use instead of dateFrom/dateTo – handy for scheduled runs."
          },
          "lastHours": {
            "title": "Or: last N hours",
            "minimum": 1,
            "maximum": 876000,
            "type": "integer",
            "description": "Notices published or updated in the last N hours up to now (the source's current time, UTC). Use instead of dateFrom/dateTo or lastDays."
          },
          "stages": {
            "title": "Stages",
            "type": "array",
            "description": "Only notices at these procurement stages (OCDS release tags, e.g. tender also covers tenderUpdate). Leave empty for all stages.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award",
                "implementation"
              ],
              "enumTitles": [
                "Planning (pipeline / preliminary market engagement)",
                "Tender (open opportunities)",
                "Award (contract awards)",
                "Implementation"
              ]
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices whose title, description, lot titles/descriptions or award titles contain any of these words, matched from the start of a word and case-insensitive (\"clean\" matches \"cleaning\"; \"works\" does not match \"networks\"). Filtered by this Actor after download, because the official APIs have no keyword search.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Keep notices with a CPV code starting with any of these (e.g. 72000000 matches all IT services 72xxxxxx; 45233000 matches 45233xxx). Filtered by this Actor after download.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Maximum number of notices to return (default 1,000, to protect you from unexpectedly large runs). You pay only for notices returned. Raise it for longer date ranges.",
            "default": 1000
          },
          "includeContacts": {
            "title": "Include buyer contact details",
            "type": "boolean",
            "description": "Also return the buyer's contact point exactly as published in the official notice (name, email, telephone, URL). These are public, role-based contacts from the contracting authority; you are responsible for how you use them (e.g. UK GDPR / PECR for marketing). Off by default. Supplier and bidder contacts are never returned.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}