{
  "openapi": "3.0.1",
  "info": {
    "title": "TED Tenders: Romania & EU notices by CPV (official API)",
    "description": "Search EU public tenders from TED (Tenders Electronic Daily) by CPV code, buyer country, notice type and keywords. Clean JSON with provenance on every record, an incremental mode for daily alerts, and a daily self-check. Data from the official TED Search API.",
    "version": "0.1",
    "x-build-id": "1jOrxzdlXmLleVGRY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearsource~ted-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearsource-ted-tenders",
        "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/clearsource~ted-tenders/runs": {
      "post": {
        "operationId": "runs-sync-clearsource-ted-tenders",
        "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/clearsource~ted-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-clearsource-ted-tenders",
        "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 (any of)",
            "maxItems": 20,
            "type": "array",
            "description": "Full-text terms searched in all languages (TED FT ~). A notice matches if it contains any keyword.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 100,
            "type": "array",
            "description": "8-digit CPV codes, e.g. 72000000. Check digit optional.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries (ISO alpha-3)",
            "maxItems": 40,
            "type": "array",
            "description": "e.g. ROU, DEU, FRA.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all. Contract notices = cn-*. (List to be checked against the TED code list, unverified.)",
            "items": {
              "type": "string",
              "enum": [
                "cn-standard",
                "cn-social",
                "pin-only",
                "can-standard",
                "can-modif",
                "veat"
              ]
            }
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Earliest publication date to include: an absolute date (YYYY-MM-DD) or a relative one such as \"7 days\".",
            "default": "7 days"
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Latest publication date to include. Leave empty for up to today."
          },
          "scope": {
            "title": "Scope",
            "enum": [
              "ACTIVE",
              "LATEST",
              "ALL"
            ],
            "type": "string",
            "description": "Which notices TED searches: ACTIVE (still open), LATEST (latest version of each notice) or ALL.",
            "default": "ALL"
          },
          "language": {
            "title": "Title language",
            "enum": [
              "eng",
              "ron",
              "deu",
              "fra",
              "spa",
              "ita",
              "pol"
            ],
            "type": "string",
            "description": "Language used for notice titles in the output, when TED provides it (falls back to any available language).",
            "default": "eng"
          },
          "expertQuery": {
            "title": "Expert query (advanced, overrides filters above)",
            "maxLength": 2000,
            "type": "string",
            "description": "TED expert-search query. When set, it replaces the filters above. Cannot be combined with 'Only new notices since last run'."
          },
          "incremental": {
            "title": "Only new notices since last run",
            "type": "boolean",
            "description": "Return only notices not delivered by previous runs with the same state key. Use with a schedule (e.g. daily).",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional)",
            "type": "string",
            "description": "Name for the incremental state. Use a different key for each saved search; defaults to one derived from the filters."
          },
          "maxResults": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of notices returned (and charged) in this run.",
            "default": 1000
          },
          "dryRun": {
            "title": "Dry run (validate query only)",
            "type": "boolean",
            "description": "Build and validate the TED query without fetching or charging anything.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: maintainer health check. Not for normal use; requires a maintainer token. Allowed values: search, health (validated by the actor).",
            "default": "search"
          },
          "healthToken": {
            "title": "Internal token",
            "type": "string",
            "description": "Reserved for the maintainer's monitor."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}