{
  "openapi": "3.0.1",
  "info": {
    "title": "EU TED Tenders & Contract Awards Monitor",
    "description": "Search and monitor EU public tenders, RFPs and contract awards from the official TED API. Track deadlines, buyers, winners, CPV codes and changes.",
    "version": "0.1",
    "x-build-id": "PvpFeJI4Yq2Sgv29B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/surefeed~eu-ted-tenders-awards-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-surefeed-eu-ted-tenders-awards-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/surefeed~eu-ted-tenders-awards-monitor/runs": {
      "post": {
        "operationId": "runs-sync-surefeed-eu-ted-tenders-awards-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/surefeed~eu-ted-tenders-awards-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-surefeed-eu-ted-tenders-awards-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": [
          "maxResults"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or exact phrases to find in the full notice text. Multiple values must all match.",
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "default": []
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Optional Common Procurement Vocabulary codes. Prefixes such as 72* are accepted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "countries": {
            "title": "Countries of performance",
            "type": "array",
            "description": "Three-letter country codes used by TED, for example DEU, FRA, ITA, or ESP.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "default": []
          },
          "formType": {
            "title": "Notice stage",
            "enum": [
              "any",
              "competition",
              "result"
            ],
            "type": "string",
            "description": "Competition finds open/planned opportunities; result finds award notices.",
            "default": "any"
          },
          "publishedWithinDays": {
            "title": "Published within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Uses UTC calendar dates. Keep this small for cheap recurring monitoring.",
            "default": 30
          },
          "deadlineAfter": {
            "title": "Tender deadline on or after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD). Notices without a matching lot deadline may be excluded by TED."
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard output and cost limit for this run.",
            "default": 100
          },
          "onlyChanges": {
            "title": "Monitor: output only new or changed notices",
            "type": "boolean",
            "description": "Stores a snapshot in the persistent eu-ted-monitor-state key-value store. Reuse the same filters and monitor name on later checks.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "maxLength": 100,
            "type": "string",
            "description": "Optional stable name when multiple monitors share one key-value store."
          },
          "baselineMode": {
            "title": "First monitor run",
            "enum": [
              "silent",
              "emit"
            ],
            "type": "string",
            "description": "Silent saves the first snapshot without output or charges. Emit returns the initial matches.",
            "default": "silent"
          },
          "rawExpertQuery": {
            "title": "Advanced TED query",
            "maxLength": 5000,
            "type": "string",
            "description": "Optional raw TED expert-mode expression combined with the filters above using AND. Use this when a convenience filter does not expose the TED field you need."
          },
          "includeRaw": {
            "title": "Include raw TED response per notice",
            "type": "boolean",
            "description": "Adds the original TED fields to each saved record. Leave disabled for smaller, cleaner datasets.",
            "default": false
          },
          "maxPages": {
            "title": "Maximum API pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety limit. TED returns at most 250 notices per page.",
            "default": 20
          },
          "requestTimeoutSeconds": {
            "title": "API request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one TED API request before a bounded retry or explicit failure.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}