{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Tenders Scraper: Contract Winners and Open Tenders",
    "description": "Returns UK public contract awards with the winning supplier (Companies House number, location, SME flag), buyer, value, CPV codes and notice link, plus open tenders, from Find a Tender (Procurement Act 2023) and Contracts Finder.",
    "version": "1.0",
    "x-build-id": "hDlbz6ByfkmAYrUnH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agents001~uk-public-contracts-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agents001-uk-public-contracts-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/agents001~uk-public-contracts-feed/runs": {
      "post": {
        "operationId": "runs-sync-agents001-uk-public-contracts-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/agents001~uk-public-contracts-feed/run-sync": {
      "post": {
        "operationId": "run-sync-agents001-uk-public-contracts-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": {
          "mode": {
            "title": "What to return",
            "enum": [
              "awards",
              "tenders",
              "both"
            ],
            "type": "string",
            "description": "Contract awards (one record per winning supplier), open tender notices, or both.",
            "default": "awards"
          },
          "daysBack": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Notices published or updated from this many days ago up to now. Ignored when 'From date' is set.",
            "default": 7
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional exact start of the publication window, for example 2026-10-01. Overrides 'Published in the last N days'."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional end of the publication window (inclusive), for example 2026-10-15. Empty means up to now."
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Only notices with a CPV code under any of these. Trailing zeros mean 'everything below', so 72000000 matches all IT services and 4521 matches 45210000 to 45219999. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only notices whose title, description, lot title, CPV description or supplier name contains any of these words or phrases, for example 'software', 'cleaning', 'cyber'. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "buyerKeywords": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Only notices from buyers whose name contains any of these, for example 'NHS', 'Council', 'Ministry of Defence'.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices worth at least this much (value excluding VAT, or including VAT where that is all the notice gives). Notices without a value are left out when this is above 0.",
            "default": 0
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Only notices in these UK regions. 'England' covers the nine English regions. See 'Region applies to'.",
            "items": {
              "type": "string",
              "enum": [
                "England",
                "North East",
                "North West",
                "Yorkshire and The Humber",
                "East Midlands",
                "West Midlands",
                "East of England",
                "London",
                "South East",
                "South West",
                "Wales",
                "Scotland",
                "Northern Ireland"
              ]
            }
          },
          "regionAppliesTo": {
            "title": "Region applies to",
            "enum": [
              "buyerOrDelivery",
              "supplier"
            ],
            "type": "string",
            "description": "Match the region against the buyer's address or the place of delivery, or against the winning supplier's address (awards only).",
            "default": "buyerOrDelivery"
          },
          "supplierSize": {
            "title": "Winning supplier size",
            "enum": [
              "any",
              "sme",
              "large"
            ],
            "type": "string",
            "description": "Awards only: keep all winners, only SMEs, or only large organisations, as stated on the notice.",
            "default": "any"
          },
          "onlyOpenTenders": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "Tenders only: drop tenders whose submission deadline has passed.",
            "default": true
          },
          "includeUpdates": {
            "title": "Include updated notices",
            "type": "boolean",
            "description": "Include notices that were changed or corrected in the window, not only first publications.",
            "default": true
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Find a Tender carries every notice under the Procurement Act 2023 (since 24 February 2025) and above-threshold notices under the old rules. Contracts Finder carries lower-value notices under the old rules. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "findATender",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            }
          },
          "onlyNew": {
            "title": "Only records not seen in previous runs",
            "type": "boolean",
            "description": "Remember which records were already returned for these filters and only return new ones. The first run returns everything that matches. Ideal for scheduled daily runs. The date window and maxItems are not part of the memory, so a rolling window keeps one history.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records, newest first. 0 means no limit. You pay per record returned.",
            "default": 500
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9-]{1,63}$",
            "type": "string",
            "description": "Only used when 'Only records not seen in previous runs' is on. Name of the key-value store in your account that remembers records already returned. Each different set of filters gets its own record inside it. Change it only to keep separate histories. If a run reports that it cannot open the store, enter a different name here.",
            "default": "agents001-uk-public-contracts-feed-state"
          },
          "timeBudgetSecs": {
            "title": "Time budget",
            "minimum": 0,
            "type": "integer",
            "description": "Stop reading after this many seconds and return what was found so far, so runs stay quick even when the government APIs are rate limiting. 0 means no limit. Raise it (or set 0) for large windows, for example 30 days or more with no maximum.",
            "default": 100
          },
          "requestDelaySecs": {
            "title": "Delay between requests to the same server",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Minimum seconds between requests to the same API. Keep this polite.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}