{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Sector Tender and Contract Notices Scraper",
    "description": "Get the latest UK government procurement notices, search by keyword, or browse by status, with buyer, value, dates, CPV codes and awarded supplier for each contract.",
    "version": "1.0",
    "x-build-id": "Azjwslr2glcdJ8dCN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~uk-public-sector-tender-and-contract-notices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-uk-public-sector-tender-and-contract-notices",
        "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/nimbryxo-studio~uk-public-sector-tender-and-contract-notices/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-uk-public-sector-tender-and-contract-notices",
        "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/nimbryxo-studio~uk-public-sector-tender-and-contract-notices/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-uk-public-sector-tender-and-contract-notices",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "recent",
              "search",
              "byStatus",
              "byNoticeId"
            ],
            "type": "string",
            "description": "What to scrape. recent follows the OCDS feed; search uses the Contracts Finder Search API; byStatus is the legacy alias for search + status; byNoticeId fetches specific notices.",
            "default": "recent"
          },
          "searchQuery": {
            "title": "Keyword search",
            "type": "string",
            "description": "Words or phrases to find in the notice title, description, buyer, supplier or CPV text (mode=search or byStatus). Supports \"exact phrase\", +required words and OR by default, like Contracts Finder.",
            "default": "IT services"
          },
          "status": {
            "title": "Notice status",
            "enum": [
              "any",
              "Open",
              "Closed",
              "Withdrawn",
              "Awarded",
              "active",
              "closed",
              "cancelled",
              "complete"
            ],
            "type": "string",
            "description": "Filter by notice status. Legacy values active/closed/cancelled/complete are still accepted and mapped to Open/Closed/Withdrawn/Awarded.",
            "default": "active"
          },
          "stage": {
            "title": "Procurement stage",
            "enum": [
              "any",
              "tender",
              "award",
              "planning",
              "earlyEngagement"
            ],
            "type": "string",
            "description": "Filter by the stage of the notice. Open tenders are Contract notices with status Open; awards are Contract notices with status Awarded; pipeline and early engagement are separate notice types. Recent's all-stage feed also includes implementation releases; the Search API has no reliable implementation-only filter.",
            "default": "any"
          },
          "noticeIds": {
            "title": "Notice IDs or URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "For mode=byNoticeId: Contracts Finder notice GUIDs or notice URLs, one per line. Release IDs are accepted too.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvSector": {
            "title": "CPV sector",
            "enum": [
              "any",
              "03000000",
              "09000000",
              "14000000",
              "15000000",
              "16000000",
              "18000000",
              "19000000",
              "22000000",
              "24000000",
              "30000000",
              "31000000",
              "32000000",
              "33000000",
              "34000000",
              "35000000",
              "37000000",
              "38000000",
              "39000000",
              "41000000",
              "42000000",
              "43000000",
              "44000000",
              "45000000",
              "48000000",
              "50000000",
              "51000000",
              "55000000",
              "60000000",
              "63000000",
              "64000000",
              "65000000",
              "66000000",
              "70000000",
              "71000000",
              "72000000",
              "73000000",
              "75000000",
              "76000000",
              "77000000",
              "79000000",
              "80000000",
              "85000000",
              "90000000",
              "92000000",
              "98000000"
            ],
            "type": "string",
            "description": "Filter by one of the 45 CPV root sectors. A sector also matches all of its sub-codes. Leave on Any for all sectors.",
            "default": "any"
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "uniqueItems": true,
            "type": "array",
            "description": "Exact CPV codes or numeric prefixes, e.g. 72000000, 72, 45215. A prefix matches every code below it.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "regions": {
            "title": "Delivery regions",
            "uniqueItems": true,
            "type": "array",
            "description": "Only notices delivered in these regions. Leave empty for every region. Any-region notices are always included.",
            "items": {
              "type": "string",
              "enum": [
                "United Kingdom",
                "England",
                "North East",
                "North West",
                "Yorkshire and the Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Scotland",
                "Wales",
                "Northern Ireland",
                "Isle of Man",
                "Channel Islands",
                "British Oversea Territories",
                "Europe",
                "Rest of the World"
              ],
              "enumTitles": [
                "United Kingdom",
                "England",
                "North East",
                "North West",
                "Yorkshire and the Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Scotland",
                "Wales",
                "Northern Ireland",
                "Isle of Man",
                "Channel Islands",
                "British Oversea Territories",
                "Europe",
                "Rest of the World"
              ]
            },
            "default": []
          },
          "valueFrom": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Only notices whose stated value range reaches at least this amount. Notices with no stated value are dropped when a value or date filter is set."
          },
          "valueTo": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "number",
            "description": "Only notices whose stated value range starts at or below this amount."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only notices first published on or after this date."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Only notices first published on or before this date."
          },
          "deadlineFrom": {
            "title": "Closing from",
            "type": "string",
            "description": "Only notices whose tender deadline is on or after this date."
          },
          "deadlineTo": {
            "title": "Closing to",
            "type": "string",
            "description": "Only notices whose tender deadline is on or before this date."
          },
          "awardedFrom": {
            "title": "Awarded from",
            "type": "string",
            "description": "Only award notices awarded on or after this date."
          },
          "awardedTo": {
            "title": "Awarded to",
            "type": "string",
            "description": "Only award notices awarded on or before this date."
          },
          "approachMarketFrom": {
            "title": "Approach to market from",
            "type": "string",
            "description": "Only planning notices with an approach-to-market date on or after this date."
          },
          "approachMarketTo": {
            "title": "Approach to market to",
            "type": "string",
            "description": "Only planning notices with an approach-to-market date on or before this date."
          },
          "buyerContains": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "Keep notices whose buying organisation name contains this text (case-insensitive). Applied after the server search and re-checked on every record."
          },
          "suitableForSme": {
            "title": "Suitable for SMEs only",
            "type": "boolean",
            "description": "Only notices marked suitable for small and medium enterprises.",
            "default": false
          },
          "suitableForVcse": {
            "title": "Suitable for VCSEs only",
            "type": "boolean",
            "description": "Only notices marked suitable for voluntary, community and social enterprises.",
            "default": false
          },
          "awardedToSme": {
            "title": "Awarded to an SME only",
            "type": "boolean",
            "description": "Only award notices where the winning supplier is marked as an SME.",
            "default": false
          },
          "awardedToVcse": {
            "title": "Awarded to a VCSE only",
            "type": "boolean",
            "description": "Only award notices where the winning supplier is marked as a VCSE.",
            "default": false
          },
          "subcontractOnly": {
            "title": "Subcontract notices only",
            "type": "boolean",
            "description": "Only notices marked as subcontract or supply-chain opportunities.",
            "default": false
          },
          "onlyOpen": {
            "title": "Still open for bids",
            "type": "boolean",
            "description": "Keep only Open notices whose closing date is in the future.",
            "default": false
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "publishedAt:DESC",
              "publishedAt:ASC",
              "value.amount:DESC",
              "value.amount:ASC",
              "deadline:ASC",
              "deadline:DESC",
              "awardedDate:DESC",
              "awardedDate:ASC",
              "contractEndDate:ASC"
            ],
            "type": "string",
            "description": "Order of the delivered records. Legacy sort values are still accepted.",
            "default": "publishedAt:DESC"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on emitted records. The Search API returns at most 1,000 matches per request; recent follows cursor pages.",
            "default": 50
          },
          "includeDetails": {
            "title": "Include full notice details",
            "type": "boolean",
            "description": "Fetch the full notice batch (buyer contact, awards, documents, withdrawal data). One batch request per 50 notices.",
            "default": true
          },
          "dedupeByOcid": {
            "title": "One record per procurement",
            "type": "boolean",
            "description": "When enabled, keep only the latest release for each OCDS procurement (ocid). Search rows without an ocid fall back to the notice ID.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}