{
  "openapi": "3.0.1",
  "info": {
    "title": "EU TED Public Procurement Notices & Awards",
    "description": "Search official EU TED notices and contract awards via the TED Search API v3. Nordic and industry presets (including Swedish HVAC/VVS and construction), dates, keywords, expert queries, and incremental daily runs for new publication numbers only.",
    "version": "1.0",
    "x-build-id": "tqDdWWnxZ2lx0wsoU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/immemorial_damask~eu-ted-tenders-official/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-immemorial_damask-eu-ted-tenders-official",
        "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/immemorial_damask~eu-ted-tenders-official/runs": {
      "post": {
        "operationId": "runs-sync-immemorial_damask-eu-ted-tenders-official",
        "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/immemorial_damask~eu-ted-tenders-official/run-sync": {
      "post": {
        "operationId": "run-sync-immemorial_damask-eu-ted-tenders-official",
        "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": "Search mode",
            "enum": [
              "active_tenders",
              "awards",
              "all",
              "custom_query"
            ],
            "type": "string",
            "description": "active_tenders uses scope=ACTIVE and form-type=competition. awards uses form-type=result (contract award notices). all returns matching notices of any form type. custom_query uses rawExpertQuery only.",
            "default": "active_tenders"
          },
          "regionPreset": {
            "title": "Region preset",
            "enum": [
              "none",
              "nordics",
              "dach",
              "benelux",
              "all_eu"
            ],
            "type": "string",
            "description": "ISO-3 buyer countries merged with any values in countries. nordics = SWE, NOR, DNK, FIN, ISL. dach = DEU, AUT, CHE. benelux = BEL, NLD, LUX. all_eu = EU-27.",
            "default": "none"
          },
          "countries": {
            "title": "Buyer countries (ISO-3)",
            "type": "array",
            "description": "Additional or standalone ISO 3166-1 alpha-3 buyer country codes, e.g. SWE, NOR, DEU. Merged with regionPreset and de-duplicated.",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "default": []
          },
          "industryPreset": {
            "title": "Industry preset",
            "enum": [
              "none",
              "hvac_vvs",
              "construction",
              "it_software",
              "energy_green",
              "healthcare",
              "transport"
            ],
            "type": "string",
            "description": "Official CPV 2008 parent codes, which TED matches hierarchically. hvac_vvs targets Swedish VVS / HVAC installation, equipment and maintenance. construction covers works (45000000) and related architectural/engineering services (71000000).",
            "default": "none"
          },
          "cpvCodes": {
            "title": "Custom CPV codes",
            "type": "array",
            "description": "Additional official 8-digit CPV codes (hyphen check digits and labels are stripped). Short prefixes are rejected by TED; use a parent such as 45000000 instead of 45.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional terms matched against notice-title and description-proc with TED's ~ operator. Combined with OR.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "publishedFrom": {
            "title": "Published from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive publication-date start, YYYY-MM-DD. Converted to TED's YYYYMMDD format."
          },
          "publishedTo": {
            "title": "Published to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive publication-date end, YYYY-MM-DD. Converted to TED's YYYYMMDD format."
          },
          "publishedLastDays": {
            "title": "Published in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Convenient window for daily schedules: publication-date >= today(-N) AND publication-date <= today(). Combined with publishedFrom / publishedTo if both are set."
          },
          "onlyOpenDeadlines": {
            "title": "Only open deadlines",
            "type": "boolean",
            "description": "Keep notices whose submission deadline is still in the future. Applied both in the expert query and again client-side, because TED's deadline field is often empty on frameworks and change notices.",
            "default": false
          },
          "minEstimatedValue": {
            "title": "Minimum estimated value",
            "minimum": 0,
            "type": "number",
            "description": "Optional client-side filter on the notice estimated value (numeric amount only; currency is not converted). Notices without an estimated value are dropped when this is set."
          },
          "maxEstimatedValue": {
            "title": "Maximum estimated value",
            "minimum": 0,
            "type": "number",
            "description": "Optional client-side filter on the notice estimated value (numeric amount only; currency is not converted)."
          },
          "rawExpertQuery": {
            "title": "Raw TED expert query",
            "type": "string",
            "description": "Official TED Search API v3 expert query. In custom_query mode this is the entire query. In other modes it is AND-combined with the generated clauses. Example: buyer-country = SWE AND classification-cpv = 45330000 AND publication-date >= today(-30)"
          },
          "language": {
            "title": "Preferred language",
            "enum": [
              "auto",
              "en",
              "sv",
              "de",
              "fr",
              "no",
              "da",
              "fi"
            ],
            "type": "string",
            "description": "Language used when flattening TED multilingual maps such as notice-title and buyer-name. auto picks the buyer country's language, then English, then any remaining value. Users never see raw {\"swe\":[\"...\"]} maps.",
            "default": "en"
          },
          "deduplicateByPublicationNumber": {
            "title": "Deduplicate by publication number",
            "type": "boolean",
            "description": "Drop repeated publication numbers within the same run before writing or charging.",
            "default": true
          },
          "incrementalStateStoreName": {
            "title": "Incremental Key-Value Store name",
            "type": "string",
            "description": "Optional named Apify Key-Value Store. Scheduled runs load previously emitted publication numbers and only write & charge for new ones. Create the store once and reuse the same name on a daily schedule."
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Hard cap on notices written to the dataset. Also respects the run's PPE budget (ACTOR_MAX_TOTAL_CHARGE_USD / ChargingManager). Default 100.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}