{
  "openapi": "3.0.1",
  "info": {
    "title": "Public Tenders Search: EU TED & UK Procurement API",
    "description": "Find public tenders, government contracts, contract notices and award winners from EU TED, UK Find a Tender and UK Contracts Finder in one search: keywords, CPV, countries, value in EUR, deadlines, winners, official links. Only-new-notices mode for tender alerts. Pay per notice.",
    "version": "0.1",
    "x-build-id": "C9hSmlYM4lVBrtDao"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainrows~public-tenders-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainrows-public-tenders-search",
        "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/plainrows~public-tenders-search/runs": {
      "post": {
        "operationId": "runs-sync-plainrows-public-tenders-search",
        "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/plainrows~public-tenders-search/run-sync": {
      "post": {
        "operationId": "run-sync-plainrows-public-tenders-search",
        "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": 200,
            "type": "array",
            "description": "One search per line, matched in the notice text (title, description, buyer, CPV labels). All words must appear; put a line in double quotes for an exact phrase (\"cyber security\"). TED also matches translations and words in the notice's own language, so add local-language terms for better coverage (e.g. logiciel, Software). Leave empty to get every notice matching the filters below. Up to 100 keywords.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "contract-notice = open calls for tenders (bid opportunities); award = contract awards with winners and values; prior-information = planned procurements and market engagement; other = modifications, direct-award intentions (VEAT), withdrawals.",
            "items": {
              "type": "string",
              "enum": [
                "contract-notice",
                "award",
                "prior-information",
                "other"
              ],
              "enumTitles": [
                "Contract notices (open tenders)",
                "Contract awards (winners)",
                "Prior information / pipeline",
                "Other (modifications, VEAT)"
              ]
            },
            "default": [
              "contract-notice"
            ]
          },
          "countries": {
            "title": "Buyer countries (optional)",
            "type": "array",
            "description": "Two-letter codes of the buyer's country, e.g. FR, DE, IT, ES, PL, NL, GB. Empty = all countries. TED covers EU/EEA buyers (and some neighbours); GB uses the two UK sources. Supported: AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, AL, BA, ME, MK, RS, XK, MD, UA, GE, TR, AD, MC, SM, AM, AZ.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (optional)",
            "type": "array",
            "description": "Common Procurement Vocabulary codes; a code covers its sub-codes (72000000 = all IT services, 79340000 = advertising and marketing). Check digits like \"-8\" are accepted. A notice matches when any of its CPV codes matches.",
            "items": {
              "type": "string"
            }
          },
          "publishedWithinDays": {
            "title": "Published in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Ignored when \"Published from\" is set.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "First publication date (YYYY-MM-DD). UK Find a Tender is searched over the last 31 days of the range at most."
          },
          "publishedTo": {
            "title": "Published to (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Last publication date (YYYY-MM-DD). Default: today."
          },
          "minValueEur": {
            "title": "Minimum value (EUR, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Keeps notices whose estimated value (or awarded value when there is no estimate) is at least this amount, converted to euros with the ECB reference rates of the day. Notices without a published value are removed when a value filter is set."
          },
          "maxValueEur": {
            "title": "Maximum value (EUR, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound, same rules as the minimum value."
          },
          "openForBidsOnly": {
            "title": "Only tenders still open for bids",
            "type": "boolean",
            "description": "Keeps contract notices whose submission deadline is in the future.",
            "default": false
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Official platforms to search. Empty = all three.",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "uk-find-a-tender",
                "uk-contracts-finder"
              ],
              "enumTitles": [
                "TED - Tenders Electronic Daily (EU/EEA)",
                "UK Find a Tender (above threshold)",
                "UK Contracts Finder (England, lower value)"
              ]
            },
            "default": [
              "ted",
              "uk-find-a-tender",
              "uk-contracts-finder"
            ]
          },
          "maxResults": {
            "title": "Max notices per keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Newest first, across all sources. Each notice returned is billed; see Pricing.",
            "default": 100
          },
          "includeDescription": {
            "title": "Include descriptions",
            "type": "boolean",
            "description": "Adds the notice description (up to 2,000 characters, e-mail addresses removed).",
            "default": true
          },
          "onlyNewNotices": {
            "title": "Only new notices (monitoring)",
            "type": "boolean",
            "description": "Return only notices this tool has never delivered to you (whatever the keyword). The first run returns the matching notices and remembers them; later runs (for example a daily schedule) return and bill only new notices.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name (optional)",
            "pattern": "^([a-z0-9][a-z0-9-]{0,61}[a-z0-9]|[a-z0-9])?$",
            "type": "string",
            "description": "Name of the key-value store in your Apify account that remembers delivered notices (default \"plainrows-tenders-monitor\"). Use a different name per alert to keep separate histories, or a new name to start over. Lowercase letters, digits and hyphens."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}