{
  "openapi": "3.0.1",
  "info": {
    "title": "UK & EU Public Tenders: Find a Tender, Contracts Finder & TED",
    "description": "Every UK and EU public tender as clean JSON from the official Find a Tender, Contracts Finder and TED APIs. Filter by keyword, CPV, country, value and deadline. Daily bid alerts. No API key.",
    "version": "1.0",
    "x-build-id": "SFecpygYg3JGUkcPm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/optimistprime~uk-eu-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-optimistprime-uk-eu-public-tenders",
        "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/optimistprime~uk-eu-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-optimistprime-uk-eu-public-tenders",
        "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/optimistprime~uk-eu-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-optimistprime-uk-eu-public-tenders",
        "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",
            "maxItems": 50,
            "type": "array",
            "description": "Return notices matching ANY of these words or phrases (case-insensitive) in the title or description. Leave empty for all. Tip: EU notices are often in the buyer's language, so add local terms (e.g. 'Software', 'logiciel') or use CPV codes for language-independent matching.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "maxItems": 100,
            "type": "array",
            "description": "Common Procurement Vocabulary codes (2-8 digits, optional check digit like '72000000-5'). Matching is hierarchical: '72' or '72000000' matches all IT services (72xxxxxx). A notice matches if its main or any additional CPV matches. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "maxItems": 40,
            "type": "array",
            "description": "ISO 3166-1 alpha-2 codes of the buying organisation's country, e.g. ['GB','DE','FR','IE']. 'GB' (or 'UK') enables the UK sources. Leave empty for all UK + EU/EEA notices.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official sources to query. Default: all three.",
            "items": {
              "type": "string",
              "enum": [
                "uk-fts",
                "uk-cf",
                "eu-ted"
              ],
              "enumTitles": [
                "UK Find a Tender (above-threshold)",
                "UK Contracts Finder (below-threshold, England)",
                "EU TED (Tenders Electronic Daily)"
              ]
            },
            "default": [
              "uk-fts",
              "uk-cf",
              "eu-ted"
            ]
          },
          "stages": {
            "title": "Notice stages",
            "type": "array",
            "description": "'tender' = live calls for bids. 'planning' = early-warning notices of upcoming procurements.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "planning"
              ],
              "enumTitles": [
                "Open opportunities (calls for tender)",
                "Planned procurements (prior information / pipeline)"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Start of the publication window (YYYY-MM-DD, or relative like '7 days'). Default: 2 days ago (keeps the default run under 2 minutes: the UK APIs allow only a few requests per minute). Max window: 92 days. UK Find a Tender filters on last-updated time, so older notices updated in the window also appear."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "End of the publication window (YYYY-MM-DD, inclusive). Default: today."
          },
          "onlyOpen": {
            "title": "Only open (deadline not passed)",
            "type": "boolean",
            "description": "Drop tender-stage notices whose submission deadline is before today (UTC). Notices without a deadline are kept. Ignored for planning notices.",
            "default": true
          },
          "deadlineWithinDays": {
            "title": "Deadline within N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Only notices whose deadline is within the next N days (0 = no limit).",
            "default": 0
          },
          "minValue": {
            "title": "Minimum estimated value",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices with an estimated value at or above this amount, in the notice's own currency (no FX conversion). Notices without a published value are kept unless 'Exclude notices without value' is on."
          },
          "excludeWithoutValue": {
            "title": "Exclude notices without value",
            "type": "boolean",
            "description": "Drop notices that publish no estimated value.",
            "default": false
          },
          "includeUpdates": {
            "title": "Include updates and cancellations",
            "type": "boolean",
            "description": "Also return amended or cancelled notices (flagged with noticeKind 'update' or 'cancellation').",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Description length",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Truncate descriptions to this many characters (0 = omit descriptions).",
            "default": 1500
          },
          "preferredLanguage": {
            "title": "Preferred language (EU notices)",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "pt",
              "sv",
              "da",
              "fi",
              "cs",
              "ro",
              "hu",
              "el",
              "bg",
              "hr",
              "sk",
              "sl",
              "lt",
              "lv",
              "et",
              "ga",
              "mt"
            ],
            "type": "string",
            "description": "For TED notices, use this language for title/description/buyer name when the notice has it, else the original language. 'titleEn' is always filled when TED provides an English title.",
            "default": "en"
          },
          "monitorMode": {
            "title": "Monitor mode (only new or changed notices)",
            "type": "boolean",
            "description": "Return only notices not returned in a previous run with the same Monitor ID (or whose deadline, value, status or title changed). Schedule daily for bid alerts. You only pay for returned notices.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "pattern": "^[a-zA-Z0-9-]{1,40}$",
            "type": "string",
            "description": "Name of the saved monitor state (letters, digits, '-'). Use one ID per saved search.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many notices are returned (0 = no limit). Default 50 (prefilled 5 so a first try costs under $0.02). While UK and EU sources both run, each lane gets a fair share, so one fast source can't crowd out the other. You are charged per returned notice.",
            "default": 50
          },
          "timeBudgetSeconds": {
            "title": "Time budget (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop fetching after this many seconds and return the notices found so far (0 = unlimited). Default 60 keeps AI-agent/MCP and quick calls to about a minute. The UK APIs allow only a few requests per minute, so for a full UK pull (e.g. 7 or 31 days) run the Actor normally with 0. UK sources are searched newest first and matches are pushed page by page, so a quick call returns the most recent notices. When the budget ends the run summary has truncated: true plus pagesFetched and the date range covered (coveredFrom/coveredTo); you are charged only for the notices returned, and monitor mode only remembers notices it actually fetched.",
            "default": 60
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Verbose logging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}