{
  "openapi": "3.0.1",
  "info": {
    "title": "EU & UK Public Tenders API (TED + Find a Tender)",
    "description": "Read EU TED and UK Find a Tender in one run. One row per notice with title, buyer, CPV codes, value, deadline, winner and links, straight from the official open JSON APIs. No API key. $0.60 per 1,000 notices.",
    "version": "0.1",
    "x-build-id": "ahbTsAketeXcp35vG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/subimpact~public-tenders-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-subimpact-public-tenders-api",
        "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/subimpact~public-tenders-api/runs": {
      "post": {
        "operationId": "runs-sync-subimpact-public-tenders-api",
        "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/subimpact~public-tenders-api/run-sync": {
      "post": {
        "operationId": "run-sync-subimpact-public-tenders-api",
        "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": {
          "portals": {
            "title": "Portals",
            "minItems": 1,
            "maxItems": 2,
            "type": "array",
            "description": "Which portals to read. Allowed values: ted_eu (EU TED, all EU member states) and uk_fts (UK Find a Tender, including Scotland and Wales notices published there). An unsupported name is reported as its own uncharged error row and the other portals still run.",
            "items": {
              "type": "string"
            },
            "default": [
              "ted_eu",
              "uk_fts"
            ]
          },
          "keywords": {
            "title": "Keywords (optional)",
            "maxItems": 20,
            "type": "array",
            "description": "Words or phrases to search for. On EU TED they become the server-side full-text filter (FT ~ \"...\", any keyword matches). On UK Find a Tender they are matched case-insensitively against the notice title and description, because that API has no keyword parameter. Leave empty to get everything published in the window.",
            "items": {
              "type": "string"
            }
          },
          "noticeStage": {
            "title": "Notice stage",
            "enum": [
              "tender",
              "award",
              "all"
            ],
            "type": "string",
            "description": "tender returns calls for competition (TED cn-standard, Find a Tender stage tender). award returns contract award notices with the winner (TED can-standard, Find a Tender stage award). all returns both; on Find a Tender this also includes planning notices, which may carry less data.",
            "default": "tender"
          },
          "countryCodes": {
            "title": "Buyer countries (optional, TED only)",
            "type": "array",
            "description": "ISO 3166-1 alpha-3 buyer country codes for EU TED, for example IRL, DEU, FRA or POL. Find a Tender is UK-only, so these are ignored for uk_fts.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (optional)",
            "type": "array",
            "description": "Common Procurement Vocabulary codes, 2 to 8 digits. On EU TED they are a server-side filter. On UK Find a Tender they are a prefix match on the release's CPV codes, so 72 matches 72000000.",
            "items": {
              "type": "string"
            }
          },
          "publishedFrom": {
            "title": "Published from (UTC date)",
            "type": "string",
            "description": "First day to read, as YYYY-MM-DD. Leave empty for the last 7 days, which is the default. On Find a Tender this becomes the feed's updatedFrom filter."
          },
          "publishedTo": {
            "title": "Published to (UTC date, optional)",
            "type": "string",
            "description": "Last day to read, as YYYY-MM-DD. Leave empty to read up to now. On Find a Tender this becomes updatedTo at 23:59:59."
          },
          "maxResultsPerPortal": {
            "title": "Max notices per portal",
            "minimum": 1,
            "maximum": 15000,
            "type": "integer",
            "description": "Hard cap on notice rows delivered from each portal in one run, 1 to 15000. The default 25 per portal is 50 rows and $0.03 at $0.60 per 1,000. The actor stops cleanly at the cap.",
            "default": 25
          },
          "includeContactDetails": {
            "title": "Include buyer contact details",
            "type": "boolean",
            "description": "When on, buyer email and contact name from the portal feed are included (public procurement contact data, which can be personal data under GDPR). Turn it off to null those fields in every row.",
            "default": true
          },
          "tedQueryOverride": {
            "title": "TED expert query override (optional)",
            "type": "string",
            "description": "Replace the generated TED expert query with your own, for example notice-type = cn-standard AND PD >= 20261115. The other TED filters above are then ignored. An invalid query becomes one uncharged error row and the UK portal still runs."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct requests are the default and both portals answered them when this actor was built. Enable Apify proxy only if your runs are rate limited. A proxy failure fails the request; it never falls back to a direct one.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}