{
  "openapi": "3.0.1",
  "info": {
    "title": "Contracts Finder, Find a Tender and TED Monitor",
    "description": "Returns UK and EU public tender notices from Contracts Finder, Find a Tender and TED as JSON: title, buyer, country, value in EUR, deadline, CPV codes, a fit score with reasons and the notice link. Filter by sector, value and deadline; schedule it to get only new notices.",
    "version": "0.2",
    "x-build-id": "QiV3PLceAf2GAvCEv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/omargnagy~tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-omargnagy-tender-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/omargnagy~tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-omargnagy-tender-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/omargnagy~tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-omargnagy-tender-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",
        "properties": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which tender sources to read. Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "contractsfinder",
                "findatender",
                "ted"
              ],
              "enumTitles": [
                "UK Contracts Finder",
                "UK Find a Tender",
                "EU TED (Tenders Electronic Daily)"
              ]
            },
            "default": []
          },
          "lookbackDays": {
            "title": "Lookback window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days back to read. 8 fits a weekly schedule and 2 a daily one, each with a day of overlap. 3 makes a quick first run.",
            "default": 8
          },
          "keywordRegex": {
            "title": "Keyword regex",
            "type": "string",
            "description": "Optional. Case-insensitive regex over the notice's own title. A notice qualifies when its title matches this or one of its CPV codes starts with a prefix below. Empty uses the built-in IT and digital list (software, SaaS, websites, apps, cloud, data, cyber security, AI and more). An invalid pattern fails the run."
          },
          "cpvPrefixes": {
            "title": "CPV prefixes that count as a match",
            "type": "array",
            "description": "A notice qualifies when any of its CPV codes starts with one of these. Default: 72 (IT services), 48 (software), 7934 (market research), 7241 and 9231. For another sector use its division, for example 45 for construction or 85 for health.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,8}$"
            },
            "default": [
              "72",
              "48",
              "7934",
              "7241",
              "9231"
            ]
          },
          "tedCpv": {
            "title": "TED CPV codes to query",
            "type": "array",
            "description": "CPV codes sent to the TED search. Each covers everything under it, so 72000000 is all IT services. A prefix such as 45 is padded to 45000000. TED only.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,8}(-[0-9])?$"
            },
            "default": [
              "72000000",
              "72200000",
              "72212000",
              "72400000",
              "72500000",
              "72600000",
              "48000000",
              "79340000"
            ]
          },
          "tedCountries": {
            "title": "TED buyer countries",
            "type": "array",
            "description": "Optional. Two-letter country codes such as DE, FR or IE to limit TED to buyers there. Empty means every country. TED only.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2,3}$"
            },
            "default": []
          },
          "maxValue": {
            "title": "Maximum contract value",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "A notice that states a higher value is dropped. Other currencies are converted with ECB rates. A notice with no value, a placeholder under 500 EUR or a currency with no rate is kept and scored lower. 0 means no cap.",
            "default": 100000
          },
          "maxValueCurrency": {
            "title": "Currency of the maximum value",
            "enum": [
              "EUR",
              "GBP",
              "USD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "RON"
            ],
            "type": "string",
            "description": "The currency of the maximum value.",
            "default": "EUR"
          },
          "maxContractMonths": {
            "title": "Maximum contract length (months)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "A notice that states a longer contract is dropped. Notices with no stated length are kept.",
            "default": 24
          },
          "minDeadlineDays": {
            "title": "Minimum days to the deadline",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "A notice that closes sooner than this is dropped. Notices with no stated deadline are kept.",
            "default": 10
          },
          "applyDefaultExclude": {
            "title": "Apply the default exclude list",
            "type": "boolean",
            "description": "On: drop construction, hardware supply, catering, cleaning, vehicles, staffing and similar by keyword, and notices whose main CPV is 30, 45, 50 (except 503) or 90. Turn it off when you monitor one of those sectors.",
            "default": true
          },
          "excludeRegex": {
            "title": "Extra exclude regex",
            "type": "string",
            "description": "Optional. Case-insensitive regex over title and description; a match drops the notice. Example: licen[cs]e|subscription skips software licence purchases. An invalid pattern fails the run."
          },
          "excludeCpvPrefixes": {
            "title": "Extra CPV prefixes to exclude",
            "type": "array",
            "description": "Optional. A notice whose main CPV code starts with one of these is dropped, in any language.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{1,8}$"
            },
            "default": []
          },
          "requireSme": {
            "title": "Require an explicit SME-suitable flag",
            "type": "boolean",
            "description": "Off: an SME-suitable flag adds score and never drops a notice. On: keep only flagged notices, which removes most of Find a Tender because it rarely publishes the flag.",
            "default": false
          },
          "dropFrameworks": {
            "title": "Drop frameworks and purchasing systems",
            "type": "boolean",
            "description": "Drops framework agreements, dynamic purchasing systems and supplier lists. A text check over title and description.",
            "default": true
          },
          "dropClearance": {
            "title": "Drop lots that require a security clearance",
            "type": "boolean",
            "description": "Drops lots that need a security clearance (SC, DV, BPSS, List X and similar). A text check.",
            "default": true
          },
          "onlyNew": {
            "title": "Only return notices not delivered before",
            "type": "boolean",
            "description": "Turn on for a scheduled monitor: each run returns only notices no earlier run delivered, remembered in the named store below in your account. Off: every run returns every match in the window.",
            "default": false
          },
          "dedupeStore": {
            "title": "Store name for remembered notices",
            "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
            "type": "string",
            "description": "Used only when onlyNew is on. A named key-value store in your account: lowercase letters, digits and hyphens. Use a different name for each monitor.",
            "default": "tender-monitor-seen"
          },
          "resetSeen": {
            "title": "Forget remembered notices before this run",
            "type": "boolean",
            "description": "Used only when onlyNew is on. Clears the store first, so every match counts as new. Useful after you change the filter.",
            "default": false
          },
          "seenKeepDays": {
            "title": "Days a notice stays remembered",
            "minimum": 30,
            "maximum": 1095,
            "type": "integer",
            "description": "Older entries are pruned so the store stays small.",
            "default": 180
          },
          "digestTitle": {
            "title": "Digest title",
            "type": "string",
            "description": "Optional. The first line of the plain-text digest saved as the DIGEST record. Defaults to Tender digest."
          },
          "digestFooter": {
            "title": "Digest footer",
            "type": "string",
            "description": "Optional. A closing line added to every digest."
          },
          "digestTop": {
            "title": "Notices shown in the digest",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the best-scoring notices the digest lists. Every delivered notice is in the dataset either way.",
            "default": 15
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Each source is read 100 notices a page, one page a second. TED is read newest first, so a cap drops its oldest notices. A busy 8-day TED window needs 13 to 15 pages. If a source held more than was read, the status message, OUTPUT and digest say so.",
            "default": 15
          },
          "pageLimit": {
            "title": "Notices requested per page",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "The three APIs cap a page at 100, so a higher value does nothing and a lower one only costs more requests.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}