{
  "openapi": "3.0.1",
  "info": {
    "title": "EU TED Tender Lots & Award Outcomes Collector",
    "description": "Collect EU procurement opportunities and award outcomes from the official TED Search API and TED Open Data. Get one typed row per explicitly linked tender lot or award outcome, plus exact notice versions, winners, no-award reasons, change relationships, and coverage receipts. No login or API key.",
    "version": "0.1",
    "x-build-id": "uacI1cP8st6iQXqM5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/8tp~eu-ted-tender-lot-award-collector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-8tp-eu-ted-tender-lot-award-collector",
        "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/8tp~eu-ted-tender-lot-award-collector/runs": {
      "post": {
        "operationId": "runs-sync-8tp-eu-ted-tender-lot-award-collector",
        "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/8tp~eu-ted-tender-lot-award-collector/run-sync": {
      "post": {
        "operationId": "run-sync-8tp-eu-ted-tender-lot-award-collector",
        "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": {
          "search_mode": {
            "title": "Records to collect",
            "enum": [
              "opportunities",
              "awards",
              "both"
            ],
            "type": "string",
            "description": "Collect open/competition opportunities, result notices, or both.",
            "default": "opportunities"
          },
          "lookback_days": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Inclusive rolling publication window ending yesterday, matching the normal TED Open Data publication lag. A paired explicit date window takes precedence.",
            "default": 7
          },
          "published_after": {
            "title": "Published after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD start. Must be supplied with Published before; paired explicit dates take precedence over Lookback days."
          },
          "published_before": {
            "title": "Published before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD end. The explicit window can span at most 366 days."
          },
          "countries": {
            "title": "Buyer countries",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional exact three-letter TED/EU country codes, for example DEU or FRA.",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          },
          "cpv_codes": {
            "title": "Main CPV codes",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional exact eight-digit Common Procurement Vocabulary codes.",
            "items": {
              "type": "string",
              "pattern": "^\\d{8}$"
            }
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional bounded full-text terms. Operators are escaped; raw TED expert queries are not accepted.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          },
          "scope": {
            "title": "TED scope",
            "enum": [
              "ACTIVE",
              "LATEST",
              "ALL"
            ],
            "type": "string",
            "description": "ACTIVE follows TED's active-version scope. LATEST or ALL may include notices that are no longer active.",
            "default": "ACTIVE"
          },
          "only_latest_versions": {
            "title": "Only latest notice versions",
            "type": "boolean",
            "description": "Keep enabled for normal discovery. Disable only when version history is required.",
            "default": true
          },
          "preferred_language": {
            "title": "Preferred language",
            "pattern": "^[a-z]{2,3}$",
            "type": "string",
            "description": "Lowercase ISO 639-1 or ISO 639-2 language code used for multilingual source fields. Two- and three-letter TED-language aliases are normalized consistently. Falls back deterministically to English, then the first available language.",
            "default": "en"
          },
          "page_size": {
            "title": "Notices per request",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Bounded below TED's field-per-page limit.",
            "default": 5
          },
          "max_notices": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Hard cap on notice versions selected by Search before one or two RDF enrichment families, each queried in fixed-graph batches of at most five notices.",
            "default": 5
          },
          "max_lot_records": {
            "title": "Maximum opportunity lots",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on exact RDF lot records retained in the dataset.",
            "default": 500
          },
          "max_award_records": {
            "title": "Maximum award outcomes",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on exact RDF LotAwardOutcome records, including no-award outcomes.",
            "default": 500
          },
          "max_change_records": {
            "title": "Maximum notice changes",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on self-contained notice change records.",
            "default": 100
          },
          "max_issue_records": {
            "title": "Maximum source issues",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on machine-readable source and relationship qualification records.",
            "default": 200
          },
          "max_output_records": {
            "title": "Maximum total dataset records",
            "minimum": 25,
            "maximum": 10000,
            "type": "integer",
            "description": "Final bound across summaries, notice metadata, lots, outcomes, changes, issues, receipts, and run metadata. It must be large enough to retain all planned receipts.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}