{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Tenders Monitor 🇪🇺 : TED Alerts, Filters & AI Scoring",
    "description": "Every EU public tender from TED with keyword, CPV code, country and deadline filters. Monitor mode charges only for new tenders, with Slack or webhook alerts and optional AI relevance scoring against your company profile. Official data, one clean schema.",
    "version": "0.1",
    "x-build-id": "E41CWTiIhmFvJxR2k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~ted-tenders-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-ted-tenders-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/tagadanar~ted-tenders-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-ted-tenders-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/tagadanar~ted-tenders-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-ted-tenders-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text terms matched in the tender full text (OR logic). Leave empty to get all recent tenders in your other filters. E.g. <code>software</code>, <code>cybersecurity</code>, <code>consulting</code>.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, e.g. <code>72000000</code> (IT services), <code>45000000</code> (construction). A short division like <code>72</code> also works. Empty = all categories.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Limit to tenders bought or performed in these countries. Use 2- or 3-letter codes: <code>DE</code>, <code>FR</code>, <code>NLD</code>, <code>ESP</code>. Empty = all of the EU/EEA.",
            "items": {
              "type": "string"
            }
          },
          "publishedWithinDays": {
            "title": "Published within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only return tenders published in this window.",
            "default": 7
          },
          "onlyOpen": {
            "title": "Only tenders still open for bids",
            "type": "boolean",
            "description": "Exclude tenders whose response deadline has already passed.",
            "default": true
          },
          "maxItems": {
            "title": "Max tenders",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap the number of tenders returned per run.",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitor mode (only NEW tenders)",
            "type": "boolean",
            "description": "Remember which tenders were already returned in previous runs and only output (and charge for) new ones. Perfect with an Apify Schedule: run daily, get only what's new.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Memory bucket for monitor mode. Use a different name per saved search (e.g. <code>it-germany</code>, <code>construction-benelux</code>) so each keeps its own history.",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Webhook / Slack URL",
            "pattern": "^https?://.+",
            "type": "string",
            "description": "POST new tenders to this URL after each run. Slack incoming-webhook URLs (<code>hooks.slack.com</code>) get a formatted digest message; any other URL gets a JSON payload. Leave empty to disable."
          },
          "companyProfile": {
            "title": "Company profile (optional, enables AI relevance scoring)",
            "type": "string",
            "description": "Optional, leave empty to get normal results (no API key needed, nothing extra billed). If filled: describe what your company sells and to whom (a few sentences, any language); each tender then gets <code>relevanceScore</code> (0-100), <code>relevanceReason</code> and a <code>bid/consider/skip</code> recommendation, sorted by score. Requires your Anthropic API key below."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (only needed if AI scoring is enabled)",
            "type": "string",
            "description": "Leave empty unless you filled in the company profile above. Get one at <code>console.anthropic.com</code>. Used only to score tenders against your profile; never stored. If empty, scoring is simply skipped."
          },
          "maxTendersToScore": {
            "title": "Max tenders to score per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on AI-scored tenders per run (each scored tender is a paid event).",
            "default": 50
          },
          "alertMinScore": {
            "title": "Alert threshold (min score)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Webhook/Slack alerts only include tenders with a relevance score at or above this value (unscored tenders always alert). 0 = alert on everything.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}