{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Tender Monitor (TED)",
    "description": "Monitor and track EU tender notices from TED (Tenders Electronic Daily). Supports filtering, change detection, and automation-ready output.",
    "version": "0.1",
    "x-build-id": "aRgctAVSMbbENsdza"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/certex~eu-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-certex-eu-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/certex~eu-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-certex-eu-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/certex~eu-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-certex-eu-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",
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Buyer country codes for discovery mode. Use codes such as POL, DEU, or FRA. Use countries when you want to search TED, not when you want persisted monitoring and diffing.",
            "default": [
              "POL"
            ],
            "items": {
              "type": "string"
            }
          },
          "noticeIds": {
            "title": "Notice IDs",
            "type": "array",
            "description": "Exact TED publication numbers to track directly, for example 136392-2025. Use this mode to monitor a fixed shortlist of up to 50 notices without search-window churn.",
            "items": {
              "type": "string"
            }
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "it",
              "construction",
              "consulting"
            ],
            "type": "string",
            "description": "Optional shortcut that adds common CPV codes and search terms for a topic."
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Optional exact 8-digit CPV codes. These are merged with preset values when a preset is used.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Optional terms sent to TED and matched against TED notice titles. These are merged with preset search terms when a preset is used.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional keywords used after fetch to intelligently rank tenders across EU languages and wording differences. Keyword phrases usually give the best results, for example school management system or student information system. Use keywords to improve result quality and reduce missed opportunities.",
            "items": {
              "type": "string"
            }
          },
          "tagRules": {
            "title": "Tag rules",
            "type": "array",
            "description": "Optional manual tagging rules. Each rule should contain a tag and a matchAny list of text or CPV terms."
          },
          "buyerNameContains": {
            "title": "Buyer name contains",
            "type": "string",
            "description": "Optional text filter for buyer names, such as city hospital or ministry."
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Optional shortcut for recent monitoring. If explicit publishedFrom or publishedTo is set, those dates take precedence over daysBack."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional lower bound for publication date in ISO-like format."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Optional upper bound for publication date in ISO-like format."
          },
          "activeOnly": {
            "title": "Active only",
            "type": "boolean",
            "description": "If true, the Actor requests only active TED notices."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 15000,
            "type": "integer",
            "description": "Maximum number of TED notices fetched in one run. Supports bulk runs up to 15000 notices in discovery mode. When keywords are used, maxResults must not exceed 1000 so keyword ranking stays predictable."
          },
          "enableDiff": {
            "title": "Enable diff",
            "type": "boolean",
            "description": "If true, compare the current run to the previous snapshot and produce change events. Diffing is supported only with noticeIds exact tracking."
          },
          "monitoringMode": {
            "title": "Monitoring mode",
            "type": "boolean",
            "description": "If true, return only new or changed tenders from the tracked noticeIds list. Requires noticeIds and a unique trackingName for that monitoring stream."
          },
          "generateTelegramMessages": {
            "title": "Generate Telegram payloads",
            "type": "boolean",
            "description": "If true, generate Telegram-friendly summary and item payloads in Actor output."
          },
          "telegramEnabled": {
            "title": "Telegram delivery enabled",
            "type": "boolean",
            "description": "If true and both telegramBotToken and telegramChatId are provided, the Actor sends Telegram messages after the run finishes."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Telegram Bot API token used for direct message delivery."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Target Telegram chat ID for direct alert delivery."
          },
          "telegramMessageMode": {
            "title": "Telegram message mode",
            "enum": [
              "summary",
              "items",
              "both"
            ],
            "type": "string",
            "description": "Choose whether to send only the summary, only item messages, or both."
          },
          "telegramDisablePreview": {
            "title": "Disable Telegram previews",
            "type": "boolean",
            "description": "If true, Telegram link previews are disabled in direct messages."
          },
          "failOnTelegramError": {
            "title": "Fail on Telegram error",
            "type": "boolean",
            "description": "If true, the Actor run fails when direct Telegram delivery fails."
          },
          "webhookMode": {
            "title": "Webhook mode",
            "type": "boolean",
            "description": "If true, generate compact webhook-friendly payloads for external automation tools."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional direct webhook endpoint for Zapier, Make, n8n, Slack-compatible webhooks, or custom HTTP receivers."
          },
          "webhookEnabled": {
            "title": "Webhook delivery enabled",
            "type": "boolean",
            "description": "If true and webhookUrl is provided, the Actor posts webhook payloads directly after the run finishes."
          },
          "webhookSecret": {
            "title": "Webhook secret",
            "type": "string",
            "description": "Optional shared secret sent in the X-Webhook-Secret header."
          },
          "webhookHeaders": {
            "title": "Webhook headers",
            "type": "object",
            "description": "Optional custom HTTP headers to include in the outbound webhook request."
          },
          "webhookPayloadMode": {
            "title": "Webhook payload mode",
            "enum": [
              "summary",
              "items",
              "both"
            ],
            "type": "string",
            "description": "Choose whether to send only the summary payload, only items, or both together."
          },
          "failOnWebhookError": {
            "title": "Fail on webhook error",
            "type": "boolean",
            "description": "If true, the Actor run fails when direct webhook delivery fails."
          },
          "includeUnchanged": {
            "title": "Include unchanged",
            "type": "boolean",
            "description": "If true, unchanged tenders are kept in the output even when monitoring mode is enabled."
          },
          "trackingName": {
            "title": "Tracking name",
            "type": "string",
            "description": "Unique name for this monitoring stream, such as customer-a-hospital-bids-2026-q1. Required for monitoringMode. Reusing the same trackingName means reusing the same saved monitoring history across runs, and another Actor user can accidentally overwrite or mix that history if they choose the same name."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}