{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Find a Tender — Government Procurement Tracker",
    "description": "UK gov tender opportunities + contract awards via the official Find a Tender OCDS API (Cabinet Office open data). Returns tender_id, title, buyer, value_gbp, status, deadline, awarded supplier, CPV codes. B2G sales intel — alt to Tussell / BiP.",
    "version": "0.0",
    "x-build-id": "bp71m4p3dVWFIwRkJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgendata~uk-find-a-tender/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgendata-uk-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/nexgendata~uk-find-a-tender/runs": {
      "post": {
        "operationId": "runs-sync-nexgendata-uk-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/nexgendata~uk-find-a-tender/run-sync": {
      "post": {
        "operationId": "run-sync-nexgendata-uk-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": {
          "searchQuery": {
            "title": "Search query (matched against title + description, case-insensitive)",
            "type": "string",
            "description": "Free-text filter applied client-side against the tender title + description. Use to narrow a date-window pull to a domain — e.g. 'cyber security', 'electronic patient record', 'managed service desk', 'occupational health', 'drone'. Leave blank to return every notice in the date window matching the other filters."
          },
          "dateFrom": {
            "title": "Date from (ISO YYYY-MM-DD, inclusive)",
            "type": "string",
            "description": "Lower bound for notice publication date. Mapped to the OCDS API `updatedFrom` parameter. Default is 30 days before the run start. The Find a Tender service publishes ~200-400 notices per UK business day, so a 30-day window typically returns 5,000-10,000 notices before searchQuery / status / value filters."
          },
          "dateTo": {
            "title": "Date to (ISO YYYY-MM-DD, inclusive)",
            "type": "string",
            "description": "Upper bound for notice publication date. Mapped to the OCDS API `updatedTo` parameter. Default is the run start timestamp. Combine with dateFrom for back-fill (e.g. dateFrom=2024-01-01 dateTo=2024-12-31 for a full-year sweep) or leave both blank for rolling 30-day windows."
          },
          "valueGbpMin": {
            "title": "Minimum tender value (GBP, applied to tender.value.amount)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Drop any tender whose net value (ex-VAT) is below this GBP threshold. Useful for filtering out below-threshold mini-tenders when chasing OJEU-threshold framework lots. Public Contracts Regulations 2015 thresholds (current 2024 rates): Goods/Services central gov GBP 138,760, Goods/Services sub-central GBP 213,477, Works GBP 5,336,937, Light-touch services GBP 663,540. Set to 138760 to capture above-threshold only. Default 0 = no filter.",
            "default": 0
          },
          "buyer": {
            "title": "Buyer / contracting authority name (partial match)",
            "type": "string",
            "description": "Case-insensitive substring match against the buyer name. Examples: 'NHS', 'Ministry of Defence', 'Cabinet Office', 'Transport for London', 'Birmingham City Council', 'Crown Commercial Service', 'Network Rail'. Leave blank to return notices from every buyer."
          },
          "cpvCode": {
            "title": "CPV code prefix (Common Procurement Vocabulary, 2-8 digits)",
            "type": "string",
            "description": "Filter by CPV (Common Procurement Vocabulary) code — the EU/UK statutory taxonomy used to classify procurement subject matter. Accepts a prefix: '72' = IT services (everything from 72000000 to 72999999), '7222' = software development, '85' = health and social work, '45' = construction, '79' = business services. Full code list at https://simap.ted.europa.eu/cpv. Leave blank to return notices across all CPV codes."
          },
          "status": {
            "title": "Tender lifecycle status",
            "enum": [
              "all",
              "planning",
              "active",
              "awarded",
              "closed"
            ],
            "type": "string",
            "description": "Filter by OCDS tender.status. 'planning' = pipeline / pre-procurement notice (PIN). 'active' = open Contract Notice accepting tenders. 'awarded' = Contract Award Notice published, supplier named. 'closed' = tender period ended without award (withdrawn / cancelled). 'all' (default) returns every status.",
            "default": "all"
          },
          "maxResults": {
            "title": "Max tender rows returned",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on dataset rows pushed (1-2000). Each tender is one row. The Find a Tender OCDS API paginates 100 notices per page; this actor follows the `links.next` cursor until maxResults is hit or no more pages remain. Set tight on broad sweeps — a 30-day NHS sweep can return 500-1500 rows.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}