{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Public Tenders Scraper (TED) + AI Bid Summaries",
    "description": "Search EU public procurement tenders from TED (Tenders Electronic Daily) via the official API: buyer, country, CPV, estimated value, deadline, documents and submission links. Optional AI adds English summaries, requirements and a bid-fit score.",
    "version": "1.0",
    "x-build-id": "BOxd7qeMKuTTdSLfy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-drip~eu-tenders-ted-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-drip-eu-tenders-ted-ai",
        "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/data-drip~eu-tenders-ted-ai/runs": {
      "post": {
        "operationId": "runs-sync-data-drip-eu-tenders-ted-ai",
        "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/data-drip~eu-tenders-ted-ai/run-sync": {
      "post": {
        "operationId": "run-sync-data-drip-eu-tenders-ted-ai",
        "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": "string",
            "description": "Full-text search across the whole notice in any EU language. Every word must match; wrap phrases in quotes, e.g. \"machine learning\". Leave empty to filter only by country, CPV and dates."
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "Optional. ISO country codes of the contracting authority, 2 or 3 letters (ES or ESP, DE, FR, IT, NL...). Several countries are OR-ed.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (sector)",
            "type": "array",
            "description": "Optional. Common Procurement Vocabulary codes; parent codes include all children (72000000 = all IT services, 48000000 = software packages, 45000000 = construction). Several codes are OR-ed.",
            "items": {
              "type": "string"
            }
          },
          "noticeType": {
            "title": "Notice type",
            "enum": [
              "competition",
              "result",
              "planning",
              "all"
            ],
            "type": "string",
            "description": "Which kind of TED notices to return.",
            "default": "competition"
          },
          "onlyOpen": {
            "title": "Only tenders still open",
            "type": "boolean",
            "description": "For calls for tender, keep only notices whose submission deadline is today or later.",
            "default": true
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only notices published on or after this date (YYYY-MM-DD). Defaults to the last 30 days."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Only notices published on or before this date."
          },
          "expertQuery": {
            "title": "Expert query (optional)",
            "type": "string",
            "description": "Raw TED expert-search syntax, AND-ed with the filters above, e.g. procedure-type=open AND contract-nature=services."
          },
          "language": {
            "title": "Preferred language",
            "enum": [
              "eng",
              "deu",
              "fra",
              "spa",
              "ita",
              "nld",
              "pol",
              "por",
              "swe",
              "dan",
              "fin",
              "ces",
              "ron",
              "ell",
              "hun",
              "bul",
              "slk",
              "slv",
              "hrv",
              "est",
              "lav",
              "lit",
              "mlt",
              "gle"
            ],
            "type": "string",
            "description": "Language for the translated title, buyer name and city when TED provides it.",
            "default": "eng"
          },
          "maxResults": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of notices to return (newest first).",
            "default": 100
          },
          "enableAi": {
            "title": "Enable AI bid summaries",
            "type": "boolean",
            "description": "Add an English summary, English title, sector, key requirements and red flags for each notice, plus a 0-100 fit score if you describe your company below. Requires your own OpenAI or OpenRouter key.",
            "default": false
          },
          "companyProfile": {
            "title": "Your company profile (for fit scoring)",
            "type": "string",
            "description": "Optional. One or two sentences on what you sell and where, e.g. 'Spanish cloud consultancy, Azure and data platforms, projects EUR 50k-2M'. The AI scores each tender's fit against it."
          },
          "llmProvider": {
            "title": "LLM provider",
            "enum": [
              "openai",
              "openrouter"
            ],
            "type": "string",
            "description": "Which API your key belongs to.",
            "default": "openai"
          },
          "llmApiKey": {
            "title": "LLM API key",
            "type": "string",
            "description": "Your OpenAI or OpenRouter API key. Stored encrypted."
          },
          "llmModel": {
            "title": "Model",
            "type": "string",
            "description": "Defaults to gpt-4o-mini (OpenAI) or openai/gpt-4o-mini (OpenRouter)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}