{
  "openapi": "3.0.1",
  "info": {
    "title": "EU & UK Tender Match Monitor",
    "description": "Find, rank, normalize, and monitor official EU TED and UK Find a Tender notices.",
    "version": "0.1",
    "x-build-id": "gixy38Y4wtTVqOayG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~eu-uk-tender-match-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-eu-uk-tender-match-monitor",
        "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/fetchfinch~eu-uk-tender-match-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-eu-uk-tender-match-monitor",
        "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/fetchfinch~eu-uk-tender-match-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-eu-uk-tender-match-monitor",
        "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",
        "required": [
          "companyProfile"
        ],
        "properties": {
          "companyProfile": {
            "title": "What does the company sell?",
            "minLength": 5,
            "type": "string",
            "description": "A concrete description of distinctive capabilities, buyers, and deliverables. The Actor derives lower-weight supporting terms while ignoring generic standalone words.",
            "default": "We build cloud data platforms, analytics dashboards, API integrations, and data migration services for public-sector organizations."
          },
          "keywords": {
            "title": "Priority keywords",
            "type": "array",
            "description": "Optional exact words or phrases that should influence both retrieval and ranking. Use this to intentionally include broad terms that profile inference ignores.",
            "items": {
              "type": "string",
              "minLength": 2
            },
            "default": [
              "data platform",
              "analytics",
              "API integration"
            ]
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these terms in the title, description, or buyer name.",
            "items": {
              "type": "string",
              "minLength": 2
            },
            "default": []
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Optional 2-8 digit Common Procurement Vocabulary codes. Prefixes such as 72 match the wider IT family.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,8}$"
            },
            "default": [
              "72000000"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Optional ISO alpha-3 country codes such as DEU, FRA, or GBR. Empty means all covered countries.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "default": []
          },
          "sources": {
            "title": "Official sources",
            "type": "array",
            "description": "TED covers the EU/EEA market. UK_FTS covers the United Kingdom.",
            "items": {
              "type": "string",
              "enum": [
                "TED",
                "UK_FTS"
              ],
              "enumTitles": [
                "EU Tenders Electronic Daily",
                "UK Find a Tender"
              ]
            },
            "default": [
              "TED",
              "UK_FTS"
            ]
          },
          "stages": {
            "title": "Notice stages",
            "type": "array",
            "description": "Competition is the actionable default. Add planning for pipeline signals, result for awards, or change for amendments.",
            "items": {
              "type": "string",
              "enum": [
                "planning",
                "competition",
                "result",
                "change"
              ],
              "enumTitles": [
                "Planning",
                "Open competition",
                "Result / award",
                "Change / amendment"
              ]
            },
            "default": [
              "competition"
            ]
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional inclusive start date. If omitted, lookbackDays is used."
          },
          "publishedTo": {
            "title": "Published through",
            "type": "string",
            "description": "Optional inclusive end date. Defaults to today."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Used only when publishedFrom is omitted.",
            "default": 7
          },
          "minFitScore": {
            "title": "Minimum fit score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "0 returns everything retrieved; 15 includes broad CPV-only leads; the default 25 requires keyword support for broad CPV families; 40+ is selective.",
            "default": 25
          },
          "onlyFutureDeadlines": {
            "title": "Only future or unknown deadlines",
            "type": "boolean",
            "description": "Discard notices whose submission deadline has already passed.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum output items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum ranked records written to the dataset per run.",
            "default": 100
          },
          "scanLimit": {
            "title": "Maximum notices scanned per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety limit for notices downloaded from each selected API before local scoring.",
            "default": 500
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "Search emits current matches. Monitor persists a baseline and emits only new or changed matches.",
            "default": "search"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Optional stable ID for this saved search. Reuse it on scheduled runs. Changing filters with the same ID intentionally reuses the baseline."
          },
          "baselineBehavior": {
            "title": "First monitor run",
            "enum": [
              "emit",
              "store_only"
            ],
            "type": "string",
            "description": "Emit returns current matches on the first run. Store only creates a quiet baseline.",
            "default": "emit"
          },
          "emitUnchanged": {
            "title": "Emit unchanged matches",
            "type": "boolean",
            "description": "Usually leave disabled in monitor mode to avoid repeat records.",
            "default": false
          },
          "stateStoreName": {
            "title": "Named state store",
            "pattern": "^[A-Za-z0-9_-]{3,63}$",
            "type": "string",
            "description": "Named key-value store shared by scheduled runs. Advanced use only.",
            "default": "eu-uk-tender-monitor-state"
          },
          "preferredLanguage": {
            "title": "Preferred TED language",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter TED language code, for example eng, deu, or fra.",
            "default": "eng"
          },
          "expertQuery": {
            "title": "Additional TED expert query",
            "maxLength": 2000,
            "type": "string",
            "description": "Optional raw TED Search API clause ANDed with generated filters. It affects TED only."
          },
          "requestTimeoutSecs": {
            "title": "API timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Advanced network setting.",
            "default": 45
          },
          "maxRequestRetries": {
            "title": "API retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retry throttling, server errors, and transient network failures.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}