{
  "openapi": "3.0.1",
  "info": {
    "title": "TED Tender Monitor – New EU Public Tenders & Award Alerts",
    "description": "Monitors EU public tenders on TED (Tenders Electronic Daily) with simple filters (keywords, CPV codes, countries, value) and outputs only what is new since the last run: new tenders, corrigenda, deadline changes, awards with winner and value, and deadline reminders.",
    "version": "0.1",
    "x-build-id": "NrDdygtP2aFffLjRW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/puchus-monitoring~ted-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-puchus-monitoring-ted-tender-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/puchus-monitoring~ted-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-puchus-monitoring-ted-tender-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/puchus-monitoring~ted-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-puchus-monitoring-ted-tender-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": [
          "monitorName"
        ],
        "properties": {
          "monitorName": {
            "title": "Monitor name",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "Identifier of this monitor, e.g. \"cleaning-spain\". The saved state is separated by this name: runs with the same name are compared with each other. Use one name per client or topic."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases searched in the title and description of the notices, in any language (e.g. \"limpieza\", \"cleaning services\"). A notice matches if it contains ANY keyword OR any of the CPV codes below. Multi-word keywords are searched as phrases; words are stemmed by TED.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, e.g. \"90910000\" (cleaning services). Prefixes are accepted: \"909\" matches every code starting with 909. Codes are hierarchical, so 90900000 also includes 90910000, 90911000, etc.",
            "items": {
              "type": "string"
            }
          },
          "buyerCountries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "Countries of the contracting authority, as ISO 3166-1 alpha-3 codes (e.g. \"ESP\", \"PRT\", \"FRA\", \"DEU\"). Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which kinds of notices you want to hear about. Contract notices and prior information notices are reported as NEW_TENDER; corrigenda (CORRIGENDUM, DEADLINE_CHANGED) and awards (AWARDED) are reported for the tenders this monitor already follows. Empty = all four.",
            "items": {
              "type": "string",
              "enum": [
                "contract-notice",
                "corrigendum",
                "award",
                "prior-information"
              ],
              "enumTitles": [
                "Contract notice (call for tenders)",
                "Corrigendum / change notice",
                "Contract award notice",
                "Prior information notice"
              ]
            }
          },
          "minEstimatedValue": {
            "title": "Minimum estimated value (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only report new tenders whose estimated value is at least this amount in euros. Values in other currencies are converted with approximate rates. Tenders that do not publish an estimated value are still reported. Empty = no minimum."
          },
          "deadlineAlertDays": {
            "title": "Deadline alert (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Send one DEADLINE_SOON event when a followed tender has this many days or fewer left to submit offers. 0 disables the alert.",
            "default": 7
          },
          "lookbackDays": {
            "title": "Lookback on the first run (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Only used on the first run of a monitor: how many days back to report as NEW_TENDER. Later runs continue from the last processed publication date.",
            "default": 7
          },
          "maxNoticesPerRun": {
            "title": "Max notices per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety limit on the number of notices read from TED in one run. If it is reached, the next run continues where this one stopped.",
            "default": 500
          },
          "includeAllAwards": {
            "title": "Report all matching awards",
            "type": "boolean",
            "description": "Also report award notices (AWARDED) that match your filters for tenders this monitor did not follow, e.g. to see which companies win contracts in your sector. Requires \"award\" in the notice types (or leaving them empty). Off by default: awards are then reported only for tenders this monitor found earlier.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}