{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders Scraper: EU TED & UK Contracts",
    "description": "New government tenders and contract notices from the official EU TED and UK Find a Tender and Contracts Finder APIs, filtered by keywords, CPV codes, countries and value, with only-new monitoring and Slack-ready summaries.",
    "version": "0.1",
    "x-build-id": "Qw0Djn52mCLLaEBfx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rookdev~public-tenders-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rookdev-public-tenders-monitor",
        "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/rookdev~public-tenders-monitor/runs": {
      "post": {
        "operationId": "runs-sync-rookdev-public-tenders-monitor",
        "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/rookdev~public-tenders-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-rookdev-public-tenders-monitor",
        "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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Sources",
            "maxItems": 10,
            "type": "array",
            "description": "Official open-data APIs to read: EU Tenders Electronic Daily (TED: EU, EEA and partner countries), UK Find a Tender (above-threshold and Procurement Act 2023 notices) and UK Contracts Finder (English contracts, mostly lower value).",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "uk-find-a-tender",
                "uk-contracts-finder"
              ],
              "enumTitles": [
                "EU TED (Tenders Electronic Daily)",
                "UK Find a Tender",
                "UK Contracts Finder"
              ]
            },
            "default": [
              "ted",
              "uk-find-a-tender",
              "uk-contracts-finder"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 100,
            "type": "array",
            "description": "Keep notices that mention any of these words or phrases (whole words, any case). TED searches the full notice text, in the language it was written in, so add translations (software, Software, logiciel, oprogramowanie) or use CPV codes. On the UK sources the title, description and buyer are searched. At most 100, of up to 200 characters each.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 100,
            "type": "array",
            "description": "Drop notices whose title, description or buyer mentions any of these words or phrases, for example cleaning or catering. At most 100.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 100,
            "type": "array",
            "description": "Keep notices with a CPV code starting with any of these, for example 72 (IT services), 48 (software packages), 45 (construction works) or 79340000 (advertising and marketing). A full code with trailing zeros covers everything below it. At most 100.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "maxItems": 100,
            "type": "array",
            "description": "ISO country codes of the buyer, for example DE, FR, PL or GB (UK, EL and three-letter codes also work). Applies to TED. The UK sources only list UK buyers, so they are left out unless GB is in this list. Leave empty for all countries.",
            "items": {
              "type": "string"
            }
          },
          "stages": {
            "title": "Notice types",
            "type": "array",
            "description": "Tenders are open calls for bids (the default). Planned tenders are prior information and pipeline notices; contract awards say who won what and for how much.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "planning",
                "award"
              ],
              "enumTitles": [
                "Tenders (open calls for bids)",
                "Planned tenders",
                "Contract awards"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "minValue": {
            "title": "Minimum value (EUR)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Drop notices whose stated value is below this, converted to euros at approximate fixed rates (for example GBP 1 = EUR 1.15). Notices that state no value are kept. 0 keeps everything.",
            "default": 0
          },
          "publishedWithinDays": {
            "title": "Published or updated in the last (days)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How far back each run looks. For a monitor, use at least 3 days, because a weekday schedule does not run at weekends and a shorter window misses what was published then; 7 days leaves room for missed runs. A longer window costs more on the first run only.",
            "default": 7
          },
          "onlyNew": {
            "title": "Only new and updated notices since the last run",
            "type": "boolean",
            "description": "Turn on, save as a task and schedule it to get only notices you have not seen yet (new) and tenders whose deadline or value moved (changed). Monitoring returns and remembers only notices still open for bids (deadline not passed); after the first run, the UK sources are read from the last run onwards. The first run returns everything open in the window as new. Normal runs never touch this memory.",
            "default": false
          },
          "skipExistingOnFirstRun": {
            "title": "Start quietly: skip existing notices on the first run",
            "type": "boolean",
            "description": "Monitoring only: the first run records the notices in the window without returning or charging for them (you pay only the source checks), so you get only new ones from the second run on.",
            "default": false
          },
          "maxNoticesPerSource": {
            "title": "Max notices per source per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many rows from each source, to cap costs. When monitoring, new notices go out oldest first and those over the cap are held back for the next run (the status message says how many). If more new notices arrive per run than the cap allows, raise it or narrow the filters: a notice that leaves the window before it is delivered is not sent.",
            "default": 1000
          },
          "stateStoreName": {
            "title": "Monitoring memory name",
            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
            "maxLength": 63,
            "type": "string",
            "description": "Key-value store that remembers which notices you have already seen (lowercase letters, digits and hyphens). Each saved task and each combination of filters keeps its own memory inside it, so the default works for most people.",
            "default": "public-tenders-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}