{
  "openapi": "3.0.1",
  "info": {
    "title": "Tender Relevance Scorer – AI Bid/No-Bid for EU Tenders",
    "description": "Describe what you sell (keywords, CPV codes, countries, budget) and get public tenders from TED (EU), BOAMP (France) and BZP (Poland) ranked 0-100 by fit, with plain-language reasons. Rules + AI. Can also score any tender dataset.",
    "version": "0.1",
    "x-build-id": "aGnCa6OrJ8rsHyenu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nebulosa~tender-relevance-scorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nebulosa-tender-relevance-scorer",
        "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/nebulosa~tender-relevance-scorer/runs": {
      "post": {
        "operationId": "runs-sync-nebulosa-tender-relevance-scorer",
        "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/nebulosa~tender-relevance-scorer/run-sync": {
      "post": {
        "operationId": "run-sync-nebulosa-tender-relevance-scorer",
        "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": {
          "buyerDescription": {
            "title": "What do you sell? (one or two sentences)",
            "type": "string",
            "description": "Plain-language description of your company and what you can deliver. Used by the AI scorer."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words that describe what you sell, in the tender languages you target (e.g. catering, comedor escolar, restauration, żywienie).",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Notices containing any of these lose 40 points (e.g. construction, obras).",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Full codes (55520000) or prefixes (555, 15). Exact matches score highest, shared prefixes score less.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries (ISO alpha-3)",
            "type": "array",
            "description": "e.g. ESP, PRT, FRA, POL. Empty = any.",
            "items": {
              "type": "string"
            }
          },
          "budgetMin": {
            "title": "Minimum contract value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "budgetMax": {
            "title": "Maximum contract value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Where to search. TED covers all EU/EEA above-threshold tenders. BOAMP = France, BZP = Poland national tenders.",
            "items": {
              "type": "string",
              "enum": [
                "TED",
                "BOAMP",
                "BZP"
              ],
              "enumTitles": [
                "TED (EU, all countries)",
                "BOAMP (France)",
                "BZP (Poland)"
              ]
            },
            "default": [
              "TED"
            ]
          },
          "frenchDepartments": {
            "title": "French départements (BOAMP only)",
            "type": "array",
            "description": "e.g. 75, 69, 13.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Days back.",
            "default": 14
          },
          "onlyOpen": {
            "title": "Only open calls",
            "type": "boolean",
            "description": "Skip awards and notices whose deadline has passed.",
            "default": true
          },
          "datasetId": {
            "title": "Score an existing dataset instead (optional)",
            "type": "string",
            "description": "ID of a dataset produced by any tender scraper (e.g. our TED/BOAMP/BZP actors). When set, sources are not searched; the notices in that dataset are scored."
          },
          "useAi": {
            "title": "Use AI scoring (TypeSafe Jev)",
            "type": "boolean",
            "description": "Adds an AI relevance judgement on top of the rules. Off = rules only (no AI fee).",
            "default": true
          },
          "typesafeApiKey": {
            "title": "Your own TypeSafe API key (optional)",
            "type": "string",
            "description": "With your own key you are not charged the AI fee and the per-run AI cap is higher."
          },
          "maxAiCalls": {
            "title": "Max AI-scored notices per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "The best rule-scored candidates get AI scoring. Max 500 with our key.",
            "default": 200
          },
          "minScore": {
            "title": "Minimum score to output",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "You only pay for notices at or above this score.",
            "default": 40
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Max results.",
            "default": 100
          },
          "maxCandidatesPerSource": {
            "title": "Max candidates per source",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "How many notices to pull and score per source (not charged).",
            "default": 300
          },
          "language": {
            "title": "TED text language",
            "enum": [
              "eng",
              "spa",
              "fra",
              "pol",
              "deu",
              "ita",
              "por",
              "nld"
            ],
            "type": "string",
            "description": "Language for TED titles (falls back to English).",
            "default": "eng"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}