{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Tenders API & TED Procurement Monitor",
    "description": "Search and monitor official EU TED procurement notices by keyword, CPV code, buyer country, date, or expert query. Get normalized multilingual tender records, deadlines, direct document links, and only-new state for scheduled alerts.",
    "version": "0.1",
    "x-build-id": "wTZR5y95jP6KCgshB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xerophylous_mercy_0wn~eu-tender-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xerophylous_mercy_0wn-eu-tender-radar",
        "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/xerophylous_mercy_0wn~eu-tender-radar/runs": {
      "post": {
        "operationId": "runs-sync-xerophylous_mercy_0wn-eu-tender-radar",
        "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/xerophylous_mercy_0wn~eu-tender-radar/run-sync": {
      "post": {
        "operationId": "run-sync-xerophylous_mercy_0wn-eu-tender-radar",
        "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 or phrases",
            "maxItems": 20,
            "type": "array",
            "description": "Full-text terms to match across TED notices. Leave empty to search by the other filters.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword matching",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match any keyword or require all keywords.",
            "default": "any"
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 50,
            "type": "array",
            "description": "Eight-digit Common Procurement Vocabulary codes, for example 33696500 for laboratory reagents.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "buyerCountries": {
            "title": "Buyer countries",
            "maxItems": 40,
            "type": "array",
            "description": "Three-letter country codes used by TED, for example FRA, DEU, ESP, or ITA.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "noticeTypes": {
            "title": "TED notice type codes",
            "maxItems": 30,
            "type": "array",
            "description": "Optional TED notice-type codes such as cn-standard. Leave empty for all notice types.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "lookbackDays": {
            "title": "Lookback window in days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Used when explicit publication dates are not provided.",
            "default": 30
          },
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Optional inclusive start date in YYYY-MM-DD format."
          },
          "publishedUntil": {
            "title": "Published until",
            "type": "string",
            "description": "Optional inclusive end date in YYYY-MM-DD format. Defaults to today."
          },
          "scope": {
            "title": "TED search scope",
            "enum": [
              "ACTIVE",
              "LATEST",
              "ALL"
            ],
            "type": "string",
            "description": "Active notices are the best default for commercial opportunity monitoring.",
            "default": "ACTIVE"
          },
          "expertQuery": {
            "title": "TED expert query",
            "maxLength": 4000,
            "type": "string",
            "description": "Optional. When set, this replaces the structured query. Example: classification-cpv IN (33696500) AND buyer-country IN (FRA DEU)."
          },
          "preferredLanguage": {
            "title": "Preferred output language",
            "enum": [
              "eng",
              "fra",
              "deu",
              "spa",
              "ita",
              "nld",
              "por",
              "pol",
              "ces",
              "dan",
              "est",
              "ell",
              "gle",
              "hrv",
              "lav",
              "lit",
              "hun",
              "mlt",
              "ron",
              "slk",
              "slv",
              "fin",
              "swe",
              "bul"
            ],
            "type": "string",
            "description": "TED language code used for titles, buyer names, and links. English is used as fallback.",
            "default": "eng"
          },
          "onlyNew": {
            "title": "Emit only newly seen notices",
            "type": "boolean",
            "description": "Persist publication numbers and suppress repeats on scheduled runs.",
            "default": true
          },
          "firstRunMode": {
            "title": "First run behavior",
            "enum": [
              "emit_recent",
              "baseline_only"
            ],
            "type": "string",
            "description": "Emit the current matches or create a quiet baseline for future alerts.",
            "default": "emit_recent"
          },
          "maxResults": {
            "title": "Maximum notices per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard output and API pagination ceiling.",
            "default": 100
          },
          "pageSize": {
            "title": "TED API page size",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Notices requested per TED API page. TED allows at most 250.",
            "default": 100
          },
          "stateStoreName": {
            "title": "Persistent state store",
            "minLength": 1,
            "maxLength": 63,
            "type": "string",
            "description": "Named Apify key-value store used for new-notice detection.",
            "default": "eu-tender-radar-state"
          },
          "stateNamespace": {
            "title": "State namespace",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "Change this to maintain a separate baseline for the same search.",
            "default": "default"
          },
          "requestTimeoutSecs": {
            "title": "TED request timeout in seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Total deadline for each request to the official TED Search API.",
            "default": 30
          },
          "maxRetries": {
            "title": "Transient request retries",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Retry timeouts, rate limits, and temporary TED server errors with bounded backoff.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}