{
  "openapi": "3.0.1",
  "info": {
    "title": "EU + UK Public Tenders: TED & Find a Tender API",
    "description": "Search EU tenders (TED) and UK tenders (Find a Tender) in one run and get one normalised schema: buyer, CPV codes, values, deadlines, lots and award winners. Keyword, CPV, country, value and deadline filters, plus new-only alerts.",
    "version": "0.1",
    "x-build-id": "JUbNzTFfVjjhUcBbH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dougalpaw~eu-uk-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dougalpaw-eu-uk-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/dougalpaw~eu-uk-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-dougalpaw-eu-uk-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/dougalpaw~eu-uk-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-dougalpaw-eu-uk-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which procurement portals to search: TED (EU, EEA and partner countries) and/or Find a Tender (UK).",
            "items": {
              "type": "string",
              "enum": [
                "ted",
                "fts"
              ],
              "enumTitles": [
                "TED - Tenders Electronic Daily (EU)",
                "Find a Tender (UK)"
              ]
            },
            "default": [
              "ted",
              "fts"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep notices that mention any of these words or phrases. TED uses its full-text search (all languages of the notice); Find a Tender matches title, description and lots.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes. A parent code also matches its children, e.g. 72000000 matches all IT services.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Buyer countries",
            "type": "array",
            "description": "ISO country codes of the buyer (2 or 3 letters, e.g. DE, FR, IE, GB/UK). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Contract notices (open opportunities), contract award notices (who won) and prior information / planning notices. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "contract-notice",
                "award",
                "prior-info"
              ],
              "enumTitles": [
                "Contract notice (open tender)",
                "Award (result)",
                "Prior information / planning"
              ]
            }
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Earliest publication date (YYYY-MM-DD). Default: 7 days ago (see 'Lookback days')."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Latest publication date (YYYY-MM-DD). Default: today."
          },
          "minValueEur": {
            "title": "Minimum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices whose estimated value (or award value) is at least this much, converted to EUR with the ECB daily reference rates. Notices without a published value are excluded when this is set."
          },
          "deadlineAfter": {
            "title": "Submission deadline after",
            "type": "string",
            "description": "Only notices whose tender submission deadline is on or after this date (YYYY-MM-DD). Handy for 'still open' searches."
          },
          "maxItems": {
            "title": "Max notices per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of notices saved from each source (newest first). Controls cost.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Skip notices this search already delivered in an earlier run (remembered per combination of filters in a named key-value store). Ideal for scheduled tender alerts.",
            "default": false
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Add the notice's short description (Find a Tender only, plain text, emails and phone numbers removed, max 3,000 characters).",
            "default": false
          },
          "language": {
            "title": "Preferred language (TED)",
            "type": "string",
            "description": "Language for TED titles and names when the notice has several (ISO 639-1, e.g. en, de, fr). Falls back to English, then the original language.",
            "default": "en"
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "When 'Published from' is empty, search this many days back. With 'Only new since last run', the window starts at the previous run (minus 2 days) instead.",
            "default": 7
          },
          "maxPagesPerSource": {
            "title": "Max pages per source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on API pages fetched per source. Find a Tender has no server-side keyword/CPV filter, so narrow searches over long periods may need more pages (100 notices each).",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}