{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Tenders & TED — Public Procurement, Appels d'Offres (MCP)",
    "description": "TED monitoring for public procurement in Europe: tenders & appels d'offres from the official EU journal — buyer, CPV, deadlines, values, buyer e-mail. Monitor mode returns only NEW or changed notices. Aanbesteding, Ausschreibung, marchés publics. MCP-ready for AI agents.",
    "version": "0.0",
    "x-build-id": "sNU80ZjKFDJ84gicx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amygraphics~eu-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amygraphics-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/amygraphics~eu-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-amygraphics-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/amygraphics~eu-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-amygraphics-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "search = return every matching notice in the date window. monitor = compare with the previous run (stored in the Apify key-value store) and flag what is new or changed.",
            "default": "search"
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "ISO 3-letter buyer country codes, e.g. FRA, DEU, ESP, ITA, POL, NLD. Leave empty for all countries covered by TED (EU + EEA + partner countries).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords (full text)",
            "type": "array",
            "description": "Search terms matched against the full text of the notice (all languages published). Terms are OR-combined by default; set 'Match all keywords' to require every term. E.g. solar, 'data center', traduction, logiciel.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "matchAllKeywords": {
            "title": "Match all keywords (AND instead of OR)",
            "type": "boolean",
            "description": "If enabled, a notice must contain ALL keywords. Default: any keyword is enough (better recall for monitoring).",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop any notice whose title or English description contains one of these terms (case-insensitive). Useful to cut noise from a broad query.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvPrefixes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "CPV (Common Procurement Vocabulary) codes to filter on. A prefix matches the whole family: '45' = construction, '72' = IT services, '30200000' = computers. Digits only.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Notice types to include. cn-standard = contract notices (the live opportunities to bid on); can-standard = contract award notices (who won, at what price); can-modif = award modifications; corr = corrections/corrigenda; veat = voluntary ex-ante transparency; pin-only/pin-buyer = prior information; cn-social/can-social = social & other services; cn-desg/can-desg = design contests; can-tran = subcontracted contracts; subco = subcontracting notice. Default: cn-standard only.",
            "items": {
              "type": "string",
              "enum": [
                "cn-standard",
                "can-standard",
                "can-modif",
                "corr",
                "veat",
                "pin-only",
                "pin-buyer",
                "cn-social",
                "cn-desg",
                "can-social",
                "can-desg",
                "can-tran",
                "subco"
              ]
            },
            "default": [
              "cn-standard"
            ]
          },
          "dateFrom": {
            "title": "Publication date from",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only notices published on or after this date (YYYY-MM-DD). Leave empty for a default window: last 7 days in search mode, last 2 days in monitor mode.",
            "default": ""
          },
          "dateTo": {
            "title": "Publication date to",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only notices published on or before this date (YYYY-MM-DD). Leave empty for today.",
            "default": ""
          },
          "deadlineFrom": {
            "title": "Tender deadline from",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only notices whose submission deadline is on or after this date (YYYY-MM-DD). Use it to get only opportunities you can still bid on.",
            "default": ""
          },
          "deadlineTo": {
            "title": "Tender deadline to",
            "pattern": "^$|^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only notices whose submission deadline is on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "minValue": {
            "title": "Minimum estimated value",
            "type": "integer",
            "description": "Drop notices below this estimated contract value (in the currency of the notice, usually EUR). Filtered on the smallest lot value when per-lot values are published."
          },
          "maxValue": {
            "title": "Maximum estimated value",
            "type": "integer",
            "description": "Drop notices above this estimated contract value. Notices without any published value are kept when a minimum is set only."
          },
          "sort": {
            "title": "Sort results",
            "enum": [
              "newest",
              "oldest",
              "deadline",
              "value-desc"
            ],
            "type": "string",
            "description": "newest = most recently published first (default). deadline = soonest submission deadline first. value-desc = biggest estimated value first. oldest = oldest publication first.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Max notices per run",
            "type": "integer",
            "description": "Hard cap on the number of rows saved in this run (1-5000). Each notice (or lot, when 'One row per lot' is on) is one billed event.",
            "default": 200
          },
          "rowPerLot": {
            "title": "One row per lot",
            "type": "boolean",
            "description": "When a notice contains several lots, output one row per lot with that lot's title, deadline and estimated value. Each row is billed.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw TED payload",
            "type": "boolean",
            "description": "Add the full raw notice object (every field requested from TED) under the 'raw' key of each row.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor state key",
            "type": "string",
            "description": "Monitor mode only. Name of the memory slot used to remember what you already saw. Use a different key per saved query; leave empty to derive it from the filters automatically.",
            "default": ""
          },
          "onlyChanges": {
            "title": "Only new & changed (monitor)",
            "type": "boolean",
            "description": "Monitor mode only. When enabled, unchanged notices are skipped, so a daily schedule sends you only what actually moved. Disable it to see everything with isNew/isUpdated flags.",
            "default": true
          },
          "chargedEventName": {
            "title": "Billable event name",
            "type": "string",
            "description": "Pay-per-event name to charge for each extracted notice. Keep the default unless you have a custom reason.",
            "default": "notice-extracted"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}