{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Tender Data - Procurement Intelligence API",
    "description": "Lot-level EU public procurement intelligence from TED. Winner rankings, single-bid rates, competition analytics across 27 EU countries. Defense, energy, IT sectors. Auto-translated to English. First 10 lots free. From $0.10/lot.",
    "version": "1.0",
    "x-build-id": "6BtCrw8HucngDL2qo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/omarchydev~eu-tender-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-omarchydev-eu-tender-data",
        "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/omarchydev~eu-tender-data/runs": {
      "post": {
        "operationId": "runs-sync-omarchydev-eu-tender-data",
        "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/omarchydev~eu-tender-data/run-sync": {
      "post": {
        "operationId": "run-sync-omarchydev-eu-tender-data",
        "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",
              "bulk"
            ],
            "type": "string",
            "description": "Search: query TED API v3 on-demand with filters. Bulk: download and parse full daily/monthly XML packages.",
            "default": "search"
          },
          "cpvCodes": {
            "title": "CPV Codes",
            "type": "array",
            "description": "CPV code prefixes to filter by. Prefix match (e.g., '72' matches all IT services, '35' matches defense). Leave empty for all sectors.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes to filter by (e.g., DE, FR, IT). Leave empty for all EU countries.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date From",
            "type": "string",
            "description": "Publication date start (YYYY-MM-DD). Defaults to 30 days ago."
          },
          "dateTo": {
            "title": "Date To",
            "type": "string",
            "description": "Publication date end (YYYY-MM-DD). Defaults to today."
          },
          "minValueEur": {
            "title": "Min Value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated lot value in EUR. Only lots above this value are returned."
          },
          "maxValueEur": {
            "title": "Max Value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated lot value in EUR. Only lots below this value are returned."
          },
          "procedureTypes": {
            "title": "Procedure Types",
            "type": "array",
            "description": "Filter by procurement procedure type. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "restricted",
                "negotiated",
                "competitive_dialogue",
                "innovation_partnership"
              ]
            }
          },
          "documentTypes": {
            "title": "Document Types",
            "type": "array",
            "description": "cn = Contract Notice (open tenders). can = Contract Award Notice (who won). pin = Prior Information Notice.",
            "items": {
              "type": "string",
              "enum": [
                "cn",
                "can",
                "pin"
              ]
            },
            "default": [
              "cn",
              "can"
            ]
          },
          "maxLots": {
            "title": "Max Lots",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of lots to return. Controls cost. First 10 lots per run are free.",
            "default": 100
          },
          "enrichWithEntities": {
            "title": "Enrich with Entity Resolution",
            "type": "boolean",
            "description": "Validate buyer VAT numbers via EU VIES system and assign canonical entity IDs. Costs $0.01 per unique entity.",
            "default": false
          },
          "enrichWithWinners": {
            "title": "Enrich with Winner Intelligence",
            "type": "boolean",
            "description": "Attach historical winner rankings and procurement analytics (single-bid rate, avg bidders, timeline) to each lot. Costs $0.05/lot instead of $0.02.",
            "default": false
          },
          "intelligenceYearsBack": {
            "title": "Intelligence Lookback (years)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many years of historical award data to analyze for winner intelligence. More years = better rankings but slower.",
            "default": 3
          },
          "bulkPackageId": {
            "title": "Bulk Package ID",
            "type": "string",
            "description": "For bulk mode only. Daily package ID (e.g., '20260322001') or monthly (e.g., '2026-3'). See ted.europa.eu for available packages."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}