{
  "openapi": "3.0.1",
  "info": {
    "title": "EU TED Tender Monitor – CPV & Keyword Alerts",
    "description": "Monitor EU public tenders from the official TED Search API (Publications Office of the EU). Filter by CPV code, keyword, country and notice type; get only new tenders on a schedule. Contact persons, e-mails, phones and street addresses are excluded by design.",
    "version": "0.1",
    "x-build-id": "YWQbf65yBEbeD42FO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendatalabs~eu-ted-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendatalabs-eu-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/opendatalabs~eu-ted-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-opendatalabs-eu-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/opendatalabs~eu-ted-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-opendatalabs-eu-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",
        "properties": {
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes to match, e.g. 72000000 (IT services) or 45000000 (construction). Check digits like 72000000-5 and short prefixes like 72 are accepted. A code matches itself and everything under it (72000000 covers 72222000).",
            "items": {
              "type": "string"
            }
          },
          "cpvMatch": {
            "title": "CPV matching",
            "enum": [
              "main",
              "any"
            ],
            "type": "string",
            "description": "main (recommended) = keep a notice only if its notice-level MAIN CPV code is one of your codes or under it. any = TED's raw match, which also returns notices where your code appears only as an additional or lot-level code (e.g. a wound-dressings tender listing one IT sub-code under 72000000).",
            "default": "main"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Full-text phrases matched anywhere in the notice (any language). Several keywords are combined with OR. Letters, digits, spaces and basic punctuation only.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "Buyer country codes, ISO 3166 alpha-2 (DE) or alpha-3 (DEU). Leave empty for all countries publishing on TED.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "TED notice types to include. For open tenders you can bid on, use cn-standard (and cn-social). Leave empty for every type.",
            "items": {
              "type": "string",
              "enum": [
                "cn-standard",
                "cn-social",
                "cn-desg",
                "pin-only",
                "pin-cfc-standard",
                "pin-cfc-social",
                "pin-rtl",
                "qu-sy",
                "veat",
                "can-standard",
                "can-social",
                "can-desg",
                "can-modif",
                "corr"
              ],
              "enumTitles": [
                "Contract notice (standard)",
                "Contract notice (social/light regime)",
                "Design contest notice",
                "Prior information notice (info only)",
                "PIN used as call for competition (standard)",
                "PIN used as call for competition (social)",
                "PIN reducing time limits",
                "Qualification system notice",
                "Voluntary ex-ante transparency notice",
                "Contract award notice (standard)",
                "Contract award notice (social)",
                "Design contest result",
                "Contract modification notice",
                "Corrigendum"
              ]
            }
          },
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Only notices published on or after this date (YYYY-MM-DD). Defaults to 7 days ago (3 days for the empty-input demo)."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "all",
              "new"
            ],
            "type": "string",
            "description": "all = every matching notice in the window. new = only notices not delivered by a previous run with the same filters (state kept in a named key-value store). Use new on a schedule.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max tenders",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on tenders delivered per run, keeping the first run cheap. Default 10; maximum 10,000. Empty-input demo runs are always capped at 10.",
            "default": 10
          },
          "expertQuery": {
            "title": "Advanced: TED expert query",
            "type": "string",
            "description": "Optional extra clause in TED expert-query syntax, AND-ed with the filters above, e.g. procedure-type IN (open). See docs.ted.europa.eu for field names."
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that remembers delivered notices for mode new. Each distinct filter set gets its own key, so schedules can share one store.",
            "default": "eu-ted-tender-monitor-state"
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Notices requested per TED API call (max 250, the API limit). Larger pages mean fewer requests.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Client-side rate limit for the TED Search API. TED fair use allows 700 per minute; this Actor defaults to 60 and never exceeds 300.",
            "default": 60
          },
          "maxRetries": {
            "title": "Max attempts per request",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Total attempts for a TED request on timeouts, 429 and 5xx, with exponential backoff and Retry-After support.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout for calls to the TED Search API before a retry is attempted.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}