{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tender Monitor — EU (TED) + UK, new since last run",
    "description": "Monitor EU public procurement (TED) and UK tenders (Contracts Finder, Find a Tender) with keywords, CPV codes and buyer countries. Returns clean, English-titled notices with buyer, deadline, value and links, and only what is new since your last run. Official APIs, no scraping.",
    "version": "0.1",
    "x-build-id": "cu1acyftHBbhi0d7T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/handa-labs~public-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-handa-labs-public-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/handa-labs~public-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-handa-labs-public-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/handa-labs~public-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-handa-labs-public-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": {
          "keywords": {
            "title": "Keywords (full text)",
            "type": "array",
            "description": "Words or phrases searched in the full text of the notice (any language). Notices matching ANY keyword are returned. Leave empty to filter by CPV / country only.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, e.g. 72000000 (IT services), 48000000 (software), 45000000 (construction). A trailing * matches a prefix (72* = all IT services).",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries (ISO 3166-1 alpha-3)",
            "type": "array",
            "description": "e.g. DEU, FRA, NLD, ESP, ITA, POL, SWE, BEL, AUT, IRL. Empty = all countries.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which procurement journals to search. TED = EU (all member states + EEA). UK sources are skipped automatically when the countries filter excludes GBR.",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "uk-contracts-finder",
                "uk-find-a-tender"
              ],
              "enumTitles": [
                "TED — EU (official API)",
                "UK Contracts Finder (OCDS)",
                "UK Find a Tender (OCDS)"
              ]
            },
            "default": [
              "ted",
              "uk-contracts-finder",
              "uk-find-a-tender"
            ]
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "monitor",
              "snapshot"
            ],
            "type": "string",
            "description": "\"monitor\" (default): remember what was returned and emit only changes on later runs. \"snapshot\": return everything matching, every run, no memory.",
            "default": "monitor"
          },
          "watchlistId": {
            "title": "Watchlist ID",
            "type": "string",
            "description": "Label for this watchlist (e.g. \"roofing-wa\"). Runs with the same ID share memory; use different IDs for independent watchlists.",
            "default": "default"
          },
          "emitBaseline": {
            "title": "Return the full set on the first run",
            "type": "boolean",
            "description": "The first monitor run establishes a free baseline and returns only counts. Turn this on to also receive (and pay for) every current item on that first run.",
            "default": false
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "TED notice types to include. Default: contract notices (calls for competition). Use pin-* for prior information notices, can-* for contract award notices.",
            "default": [
              "cn-standard",
              "cn-social",
              "cn-desg"
            ],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only notices published within the last N days.",
            "default": 7
          },
          "sinceLastRun": {
            "title": "(legacy) sinceLastRun",
            "type": "boolean",
            "description": "Legacy switch. Prefer \"mode\". false = snapshot mode.",
            "default": true
          },
          "maxNotices": {
            "title": "Max notices per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap on the number of notices fetched from TED per run.",
            "default": 500
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Adds up to 1500 characters of the procedure/lot description (original language).",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used to remember already-seen notices.",
            "default": "tender-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}