{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Public Tender Alerts - Find a Tender & Contracts Finder",
    "description": "$1.50 per 1,000 notices. Daily UK government tender alerts from Find a Tender and Contracts Finder. Filter by keyword, CPV code, region, value and deadline; cross-posted notices are merged and an alert mode returns only new notices.",
    "version": "0.1",
    "x-build-id": "zR65YTcn6GDUvTOX3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orange_briefcase_hrj~uk-tender-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orange_briefcase_hrj-uk-tender-alerts",
        "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/orange_briefcase_hrj~uk-tender-alerts/runs": {
      "post": {
        "operationId": "runs-sync-orange_briefcase_hrj-uk-tender-alerts",
        "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/orange_briefcase_hrj~uk-tender-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-orange_briefcase_hrj-uk-tender-alerts",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to look for in the notice title and description (case-insensitive, whole words). Leave empty to get every notice that matches the other filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match notices containing ANY of the keywords, or ALL of them.",
            "default": "any"
          },
          "searchIn": {
            "title": "Search keywords in",
            "enum": [
              "titleAndDescription",
              "titleOnly"
            ],
            "type": "string",
            "description": "Look for keywords in the title and description, or in the title only (fewer, more precise matches).",
            "default": "titleAndDescription"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip notices whose title or description contains any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes. Prefix matching: 72000000 matches every IT service code starting with 72; 48000000 matches software packages. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Limit to delivery/buyer regions. Valid values: North East, North West, Yorkshire and The Humber, East Midlands, West Midlands, East of England, London, South East, South West, Wales, Scotland, Northern Ireland. Leave empty for the whole UK.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeNationwide": {
            "title": "Include UK-wide notices when filtering by region",
            "type": "boolean",
            "description": "When regions are set, also keep notices marked as UK-wide or England-wide.",
            "default": true
          },
          "minValue": {
            "title": "Minimum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated contract value in pounds (excluding VAT where stated). For award notices the awarded value is used."
          },
          "maxValue": {
            "title": "Maximum value (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated contract value in pounds."
          },
          "includeUnknownValue": {
            "title": "Keep notices with no stated value",
            "type": "boolean",
            "description": "When a value range is set, keep notices that do not state a value.",
            "default": true
          },
          "deadlineFrom": {
            "title": "Deadline on or after",
            "type": "string",
            "description": "Only keep notices whose tender submission deadline is on or after this date (YYYY-MM-DD). Notices without a deadline are kept."
          },
          "excludeExpired": {
            "title": "Skip tenders whose deadline has passed",
            "type": "boolean",
            "description": "Drop tender notices whose submission deadline is already in the past.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which kinds of notice to return. 'tender' = open opportunities; 'planning' = pipeline / pre-market engagement; 'award' = contract awards; plus updates, cancellations and terminations.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "tenderUpdate",
                "tenderCancellation",
                "planning",
                "award",
                "contractTermination"
              ],
              "enumTitles": [
                "Tender (open opportunity)",
                "Tender update",
                "Tender cancellation",
                "Planning / pipeline",
                "Contract award",
                "Contract termination"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "buyerContains": {
            "title": "Buyer name contains",
            "type": "array",
            "description": "Only keep notices whose buyer name contains one of these strings (e.g. 'NHS', 'Council').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "smeSuitableOnly": {
            "title": "SME-suitable only",
            "type": "boolean",
            "description": "Only keep notices the buyer has flagged as suitable for small and medium-sized enterprises.",
            "default": false
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days of notices to fetch on a normal run, or on the first run in 'only new' mode (1-90).",
            "default": 7
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Off by default (every run returns all matching notices in the look-back window). Switch on for alerts: the Actor remembers notices already delivered (per filter set) and only outputs new ones. Ideal for a daily schedule.",
            "default": false
          },
          "stateKey": {
            "title": "Alert name (state key)",
            "type": "string",
            "description": "Optional name for this alert's memory. By default it is derived from your filters, so changing filters starts a fresh alert."
          },
          "includeSummary": {
            "title": "Save a summary",
            "type": "boolean",
            "description": "Save a digest (counts, top buyers, largest and closing-soonest notices) as SUMMARY in the run's key-value store.",
            "default": true
          },
          "includeBuyerContacts": {
            "title": "Include buyer contact details",
            "type": "boolean",
            "description": "Add the buyer's published contact name, email, phone and website. These can be personal data: use them only for responding to the tender, in line with UK GDPR.",
            "default": false
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which government services to query.",
            "items": {
              "type": "string",
              "enum": [
                "findATender",
                "contractsFinder"
              ],
              "enumTitles": [
                "Find a Tender",
                "Contracts Finder"
              ]
            },
            "default": [
              "findATender",
              "contractsFinder"
            ]
          },
          "maxResults": {
            "title": "Max notices per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many new notices. Anything left over is picked up on the next run.",
            "default": 1000
          },
          "maxPagesPerSource": {
            "title": "Max API pages per source",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Safety cap on API pages (100 notices each) fetched per source.",
            "default": 300
          },
          "requestIntervalSecs": {
            "title": "Seconds between requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Polite delay between API calls to each government service.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}