{
  "openapi": "3.0.1",
  "info": {
    "title": "TED Europa EU Tenders & Contracts Scraper (eForms API)",
    "description": "Scrape EU public procurement tenders, contract awards, multi-lot breakdowns, CPV codes, values, deadlines, buyers & winners from TED Europa without wrestling with eForms XML graphs. Built for B2B lead gen, tender tracking & AI Agents via Apify MCP.",
    "version": "1.0",
    "x-build-id": "bhzKpKAeVuZpql5Z0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/autotroph~ted-eu-eforms-normalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-autotroph-ted-eu-eforms-normalizer",
        "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/autotroph~ted-eu-eforms-normalizer/runs": {
      "post": {
        "operationId": "runs-sync-autotroph-ted-eu-eforms-normalizer",
        "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/autotroph~ted-eu-eforms-normalizer/run-sync": {
      "post": {
        "operationId": "run-sync-autotroph-ted-eu-eforms-normalizer",
        "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": "Ingestion Mode",
            "enum": [
              "search_api",
              "daily_bulk_xml"
            ],
            "type": "string",
            "description": "Choose 'search_api' for filtered live queries via TED Search API v3, or 'daily_bulk_xml' for full multi-lot UBL 2.3 eForms / Legacy TED_EXPORT XML parsing from official EU daily packages.",
            "default": "search_api"
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Free-text search keywords (e.g., 'software', 'cloud infrastructure', 'solar'). Used in search_api FT query or client-side filter in daily_bulk_xml mode.",
            "default": "software"
          },
          "countries": {
            "title": "Buyer Countries (ISO-3166-1 Alpha-3)",
            "type": "array",
            "description": "Optional list of 3-letter country codes (e.g., ['DEU', 'FRA', 'FIN', 'ESP', 'POL', 'NLD']). Empty = all EU/EEA countries.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "cpvPrefixes": {
            "title": "CPV Code Prefixes",
            "type": "array",
            "description": "Optional 2-to-8 digit CPV prefixes (e.g., ['72', '48'] for IT & software services, ['45'] for construction).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "formTypes": {
            "title": "Form Types",
            "type": "array",
            "description": "Filter by notice lifecycle stage: 'competition' (open tenders), 'result' (contract awards), 'planning' (prior information notices).",
            "default": [
              "competition",
              "result"
            ],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Publication Date From (YYYY-MM-DD)",
            "type": "string",
            "description": "Inclusive start publication date for search_api mode (e.g., '2026-01-01').",
            "default": "2026-01-01"
          },
          "dateTo": {
            "title": "Publication Date To (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional inclusive end publication date for search_api mode (e.g., '2026-12-31').",
            "default": ""
          },
          "customTedQuery": {
            "title": "Custom TED Expert Query (Optional Override)",
            "type": "string",
            "description": "Optional raw TED v3 expert query string (overrides keywords/countries/dateFrom/dateTo/formTypes when non-empty).",
            "default": ""
          },
          "ojsPackageId": {
            "title": "OJ S Daily Package ID (daily_bulk_xml mode)",
            "type": "string",
            "description": "9-digit Official Journal S daily package ID ({yyyynnnnn}, e.g., '202600001' for eForms or '202200001' for Legacy TED_EXPORT).",
            "default": "202600001"
          },
          "preferredLang": {
            "title": "Preferred Title Language (ISO-639-3)",
            "type": "string",
            "description": "Preferred 3-letter language code when multilingual titles are available (e.g., 'eng', 'deu', 'fra', 'spa'). Falls back to notice native language.",
            "default": "eng"
          },
          "maxItems": {
            "title": "Max Normalized Notices",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of normalized tender records to emit (1 to 10,000).",
            "default": 50
          },
          "strictValidation": {
            "title": "Drop Records With Integrity Errors",
            "type": "boolean",
            "description": "When true, records failing deterministic schema integrity checks are logged as warnings instead of billed/pushed to dataset.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}