{
  "openapi": "3.0.1",
  "info": {
    "title": "Tender Opportunity Intelligence",
    "description": "Normalize, deduplicate, rank, and track EU procurement opportunities from TED.",
    "version": "1.0",
    "x-build-id": "GqYE8Ym9XMxKcov9G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atlas-data~tender-opportunity-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atlas-data-tender-opportunity-intelligence",
        "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/atlas-data~tender-opportunity-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-atlas-data-tender-opportunity-intelligence",
        "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/atlas-data~tender-opportunity-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-atlas-data-tender-opportunity-intelligence",
        "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": "Run mode",
            "enum": [
              "full",
              "incremental",
              "diff"
            ],
            "type": "string",
            "description": "full emits every match as snapshot; incremental emits only new/updated matches; diff also emits unchanged matches.",
            "default": "incremental"
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 50,
            "type": "array",
            "description": "A notice matches when at least one keyword occurs in its normalized title or buyer name.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": []
          },
          "cpvPrefixes": {
            "title": "CPV prefixes",
            "maxItems": 100,
            "type": "array",
            "description": "Two to eight digits. Prefix matching lets 72 match the whole IT-services family.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,8}$"
            },
            "default": []
          },
          "buyerCountries": {
            "title": "Buyer countries",
            "maxItems": 50,
            "type": "array",
            "description": "TED/ISO alpha-3 country codes, for example DEU, FRA, or CZE.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "default": []
          },
          "placeCountries": {
            "title": "Place-of-performance countries",
            "maxItems": 50,
            "type": "array",
            "description": "TED/ISO alpha-3 country codes, for example DEU, FRA, or CZE.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "default": []
          },
          "publicationFrom": {
            "title": "Published from",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD. Defaults to 30 days before publicationTo."
          },
          "publicationTo": {
            "title": "Published through",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD. Defaults to today."
          },
          "deadlineFrom": {
            "title": "Deadline from",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep notices with at least one deadline on or after this YYYY-MM-DD."
          },
          "deadlineTo": {
            "title": "Deadline through",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Keep notices with at least one deadline on or before this YYYY-MM-DD."
          },
          "minimumValue": {
            "title": "Minimum estimated value",
            "minimum": 0,
            "type": "number",
            "description": "Keep notices with at least one estimate in minimumValueCurrency that reaches this amount. Must be supplied together with minimumValueCurrency; no FX conversion is performed."
          },
          "minimumValueCurrency": {
            "title": "Minimum value currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter currency code used for minimumValue comparisons, for example EUR. Must be supplied together with minimumValue."
          },
          "noticeTypes": {
            "title": "Notice types",
            "maxItems": 50,
            "type": "array",
            "description": "TED notice type codes, for example cn-standard.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,79}$"
            },
            "default": []
          },
          "language": {
            "title": "Preferred language",
            "pattern": "^[a-z]{3}$",
            "type": "string",
            "description": "Three-letter TED language code. Falls back to English, then the first available translation.",
            "default": "eng"
          },
          "maxItems": {
            "title": "Maximum matched items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Matched opportunities, not raw TED rows. Sparse searches continue behind rejected rows.",
            "default": 1000
          },
          "relevance": {
            "title": "Weighted relevance profile",
            "type": "object",
            "description": "Explainable positive and negative term weights. Base keyword and CPV matches add 10 and 8 points.",
            "properties": {
              "include": {
                "title": "Positive rules",
                "description": "Terms that add to an opportunity's score.",
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "term",
                    "fields",
                    "weight"
                  ],
                  "properties": {
                    "term": {
                      "title": "Term",
                      "description": "Case-insensitive text or code fragment to match.",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "fields": {
                      "title": "Fields",
                      "description": "Normalized fields in which this term should be matched.",
                      "type": "array",
                      "editor": "select",
                      "minItems": 1,
                      "uniqueItems": true,
                      "items": {
                        "type": "string",
                        "enum": [
                          "title",
                          "buyer",
                          "cpv",
                          "country",
                          "place",
                          "procedure"
                        ],
                        "enumTitles": [
                          "Title",
                          "Buyer",
                          "CPV",
                          "Buyer country",
                          "Performance place",
                          "Procedure"
                        ]
                      }
                    },
                    "weight": {
                      "title": "Weight",
                      "description": "Positive score contribution for a match.",
                      "type": "number",
                      "minimum": 0.1,
                      "maximum": 100
                    }
                  }
                },
                "default": []
              },
              "exclude": {
                "title": "Negative rules",
                "description": "Terms that subtract from an opportunity's score.",
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "term",
                    "fields",
                    "weight"
                  ],
                  "properties": {
                    "term": {
                      "title": "Term",
                      "description": "Case-insensitive text or code fragment to match.",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "fields": {
                      "title": "Fields",
                      "description": "Normalized fields in which this term should be matched.",
                      "type": "array",
                      "editor": "select",
                      "minItems": 1,
                      "uniqueItems": true,
                      "items": {
                        "type": "string",
                        "enum": [
                          "title",
                          "buyer",
                          "cpv",
                          "country",
                          "place",
                          "procedure"
                        ],
                        "enumTitles": [
                          "Title",
                          "Buyer",
                          "CPV",
                          "Buyer country",
                          "Performance place",
                          "Procedure"
                        ]
                      }
                    },
                    "weight": {
                      "title": "Weight",
                      "description": "Score penalty for a match.",
                      "type": "number",
                      "minimum": 0.1,
                      "maximum": 100
                    }
                  }
                },
                "default": []
              },
              "minimumScore": {
                "title": "Minimum score",
                "description": "Reject opportunities whose final score is below this value.",
                "type": "number",
                "minimum": -10000,
                "maximum": 10000,
                "default": 0
              },
              "requireIncludeMatch": {
                "title": "Require a positive profile match",
                "description": "Require at least one include rule to match.",
                "type": "boolean",
                "default": false
              }
            },
            "default": {
              "include": [],
              "exclude": [],
              "minimumScore": 0,
              "requireIncludeMatch": false
            },
            "additionalProperties": false
          },
          "pageSize": {
            "title": "TED page size",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Advanced. Official maximum is 250.",
            "default": 250
          },
          "maxPages": {
            "title": "Maximum pages per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop after this many fully handled TED pages and save a safe resume cursor.",
            "default": 100
          },
          "maxScannedItems": {
            "title": "Maximum TED rows scanned",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Bound raw source rows independently of the matched-item limit.",
            "default": 10000
          },
          "overlapDays": {
            "title": "Incremental overlap days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Rechecks recently published notices so later edits are detected.",
            "default": 3
          },
          "stateRetentionDays": {
            "title": "Digest retention days",
            "minimum": 7,
            "maximum": 730,
            "type": "integer",
            "description": "Forget digests older than this many days after a successful run.",
            "default": 180
          },
          "maxStateEntries": {
            "title": "Maximum digests per configuration",
            "minimum": 100,
            "maximum": 12000,
            "type": "integer",
            "description": "Keep state bounded by retaining only the most recently seen notice digests.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}