{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tenders Scraper: Find a Tender & Contracts Finder",
    "description": "UK public sector tender, award and planning notices from Find a Tender and Contracts Finder (open OCDS data), one row per notice. Filter by keyword, CPV code, stage, region, value and buyer. Only-new mode skips notices already saved.",
    "version": "0.0",
    "x-build-id": "OmBXfK1fqtLPOUEMy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piquno~uk-public-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piquno-uk-public-tenders-scraper",
        "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/piquno~uk-public-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piquno-uk-public-tenders-scraper",
        "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/piquno~uk-public-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piquno-uk-public-tenders-scraper",
        "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": "Services",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "Which services to read: Find a Tender's notice data and Contracts Finder's published notices (future opportunities, live opportunities, awards and early engagements), both through their OCDS APIs. When both are selected, maxResults is shared between them (see Two sources, one limit in the README).",
            "items": {
              "type": "string",
              "enum": [
                "findATender",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "findATender",
              "contractsFinder"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Notices listed in the last N days (24 hours each), counted back from dateTo when it is set, else from the run's start. In only-new mode it sets only the first run's window.",
            "default": 3
          },
          "dateFrom": {
            "title": "From (UTC)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d)?Z)?$",
            "type": "string",
            "description": "Start of the window: a UTC date (2026-11-01) or UTC time (2026-11-01T09:00:00Z). Overrides daysBack. In only-new mode: first run only, at most 31 days ago."
          },
          "dateTo": {
            "title": "To (UTC)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d)?Z)?$",
            "type": "string",
            "description": "End of the window (a date includes that whole UTC day). Default: now. Not allowed with onlyNew."
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Keep notices that contain ANY of these words or phrases as whole words, any letter case, in the title, description, lot titles and descriptions, or buyer name. Short words also match ordinary English: IT matches \"it\".",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 100,
            "type": "array",
            "description": "CPV codes; trailing zeros are ignored, so 72 and 72000000 both mean division 72, 452 means group 452 and 4523 class 4523. A notice matches when any of its CPV codes (main, additional, items, awards) starts with one of these. Notices without a CPV code are dropped when this is set.",
            "items": {
              "type": "string",
              "pattern": "^\\s*\\d{2,8}(-\\d)?\\s*$"
            }
          },
          "stages": {
            "title": "Stages",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these stages (from the notice's OCDS tags; see the README). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "tender",
                "award"
              ],
              "enumTitles": [
                "Planning (planned procurements, market engagement)",
                "Tender (opportunities, changes, cancellations)",
                "Award (awards, contracts, amendments, terminations)"
              ]
            }
          },
          "onlyOpen": {
            "title": "Only open tenders",
            "type": "boolean",
            "description": "Keep only notices whose tender deadline (tenderDeadline) is still in the future. Drops notices without a deadline: most planning and award notices, and Find a Tender notices that give only a deadline for requests to participate (17 of 144 Find a Tender tender notices of 16-17 November 2026).",
            "default": false
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Compared with the notice's GBP value: the tender value (on Contracts Finder the upper end of a range), or on award notices the highest award value (without VAT where given, else with VAT; an award notice without one is compared on its tender value). Notices with no GBP value are dropped when minValue or maxValue is set."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Same rules as the minimum value."
          },
          "regions": {
            "title": "Regions",
            "maxItems": 50,
            "type": "array",
            "description": "Keep notices whose delivery region or buyer region STARTS WITH one of these (any case). Find a Tender uses NUTS/ITL codes (UKI London, UKD North West, UK = the whole UK); Contracts Finder uses region names (London, South East, North West). Enter both forms to cover both services.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "buyers": {
            "title": "Buyers",
            "maxItems": 50,
            "type": "array",
            "description": "Keep notices whose buyer name contains one of these (any case), for example NHS or Council.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "onlyNew": {
            "title": "Only new notices (monitor)",
            "type": "boolean",
            "description": "Each run saves only matching notices listed since the previous run of the same monitor, oldest first, skipping notices this monitor has already saved (limits: Only new notices in the README). Needs a monitorName. Use it with a schedule.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "pattern": "^[A-Za-z0-9_-]{1,60}$",
            "type": "string",
            "description": "Required with onlyNew: the name of this monitor's saved progress (letters, digits, - and _). Give each schedule its own name: two schedules that share one miss each other's notices. A new name starts over."
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Most notices to save in this run (every saved notice is charged). With both services: Find a Tender gets half (rounded up), Contracts Finder half (rounded down); a service that has fewer matches leaves the rest to the other. Must be at least 2 with both services.",
            "default": 100
          },
          "maxPagesPerSource": {
            "title": "Maximum pages per service",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Most result pages (of up to 100 notices) read from each service in one run; retries after errors are not counted. A 31-day Find a Tender window took 104 pages on 17 November 2026, so raise this for long windows with narrow filters.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}