{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Public Tenders Monitor (TED)",
    "description": "Search and monitor EU public procurement notices from TED (Tenders Electronic Daily) via the official API: keywords, CPV codes, countries, notice types, deadlines. Monitoring mode returns only new notices.",
    "version": "1.0",
    "x-build-id": "e1oTf8iXgfon715nN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vespa-zzz~eu-ted-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vespa-zzz-eu-ted-tenders",
        "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/vespa-zzz~eu-ted-tenders/runs": {
      "post": {
        "operationId": "runs-sync-vespa-zzz-eu-ted-tenders",
        "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/vespa-zzz~eu-ted-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-vespa-zzz-eu-ted-tenders",
        "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 (any)",
            "type": "array",
            "description": "Full-text search over the notice (any language). Several keywords are combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes (8 digits, check digit optional). Matching is hierarchical: 72000000 also finds 72200000, 72212000 … e.g. 72000000 IT services, 45000000 construction, 33000000 medical equipment.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "ISO 3166 alpha-3 codes of the buyer's country, e.g. DEU, FRA, ITA, ESP, POL, NLD.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to these notice types. Contract notices (cn-…) are open calls for tenders. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "cn-standard",
                "cn-social",
                "cn-desg",
                "pin-only",
                "pin-cfc-standard",
                "pin-cfc-social",
                "pin-rtl",
                "can-standard",
                "can-social",
                "can-desg",
                "can-tran",
                "can-modif",
                "veat",
                "qu-sy",
                "subco",
                "pmc",
                "corr"
              ],
              "enumTitles": [
                "Contract notice",
                "Contract notice – social/other services",
                "Design contest notice",
                "Prior information notice (only)",
                "PIN used as call for competition",
                "PIN call for competition – social",
                "PIN shortening time limits",
                "Contract award notice",
                "Contract award notice – social",
                "Design contest result",
                "Contract award notice – transport (PSO)",
                "Contract modification notice",
                "Voluntary ex-ante transparency notice",
                "Qualification system",
                "Subcontracting notice",
                "Pre-market consultation",
                "Corrigendum"
              ]
            }
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Earliest publication date (YYYY-MM-DD). If no date and no custom query is given, the last 'Days back' days are searched."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Latest publication date (YYYY-MM-DD)."
          },
          "daysBack": {
            "title": "Days back (default window)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Used only when neither publication date nor a custom query is set.",
            "default": 7
          },
          "onlyOpen": {
            "title": "Only notices with an open deadline",
            "type": "boolean",
            "description": "Drop notices whose tender submission deadlines (date and time, all lots) have passed. Notices without a deadline are dropped too.",
            "default": false
          },
          "language": {
            "title": "Preferred language",
            "type": "string",
            "description": "3-letter code for titles, buyer names and links (eng, deu, fra, ita, spa, pol …). Falls back to English, then any available language.",
            "default": "eng"
          },
          "customQuery": {
            "title": "Custom TED expert query (advanced)",
            "type": "string",
            "description": "Optional extra condition in TED expert search syntax, combined with the filters above by AND, e.g. buyer-city = Wien."
          },
          "onlyNew": {
            "title": "Monitoring mode: only new notices",
            "type": "boolean",
            "description": "Remember notices already returned and output only new ones. Schedule daily with a short window (e.g. daysBack 3).",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring state key",
            "pattern": "^[a-zA-Z0-9_-]{1,50}$",
            "type": "string",
            "description": "Separate 'already seen' list per search. Letters, digits, - and _ only. Do not run two schedules with the same key at the same time.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of notices to output.",
            "default": 500
          },
          "requestIntervalMs": {
            "title": "Delay between API pages (ms)",
            "minimum": 2000,
            "type": "integer",
            "description": "Pause between search requests (100 notices per page).",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}