{
  "openapi": "3.0.1",
  "info": {
    "title": "TED Tenders API: EU Public Procurement Search",
    "description": "Search EU public tenders and award notices from TED's official API. Filter by keyword, CPV, country, value and deadline. No scraping, proxy or login.",
    "version": "0.2",
    "x-build-id": "TLT46HJkjjDO4RrzQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~ted-tenders-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-ted-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/rastriq~ted-tenders-api/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-ted-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/rastriq~ted-tenders-api/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-ted-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": {
          "freeText": {
            "title": "Keywords",
            "type": "string",
            "description": "Words to find in the full notice text. Example: `software`. For several terms or exclusions use Guided filters (`filters.text.include` / `exclude`)."
          },
          "buyerCountry": {
            "title": "Buyer countries",
            "type": "array",
            "description": "Three-letter TED country codes of the contracting authority. Example: `ESP`, `FRA`, `DEU`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Common Procurement Vocabulary codes (what is being bought). Example: `72000000` (IT services), `45000000` (construction works).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOpenDeadlines": {
            "title": "Only notices still open for bids",
            "type": "boolean",
            "description": "Keep only notices whose tender deadline is today or later. Useful to find live opportunities.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum notices",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many notices. Start small (10) to test. Default 1000; set 0 only for an intentional full backfill.",
            "default": 1000
          },
          "publicationDateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First publication date, `YYYY-MM-DD`. Example: `2026-10-01`. If every filter is empty the last 7 days are used."
          },
          "publicationDateTo": {
            "title": "Published to",
            "type": "string",
            "description": "Last publication date (inclusive), `YYYY-MM-DD`. Example: `2026-10-31`."
          },
          "noticeType": {
            "title": "Notice types",
            "type": "array",
            "description": "TED notice-type codes. Examples: `cn-standard` (contract notice), `can-standard` (contract award), `pin-only` (prior information).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "procedureType": {
            "title": "Procedure types",
            "type": "array",
            "description": "TED procedure codes. Examples: `open`, `restricted`, `neg-w-call`, `neg-wo-call`, `comp-dial`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "contractNature": {
            "title": "Contract natures",
            "type": "array",
            "description": "One or more of `services`, `supplies`, `works`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nutsCodes": {
            "title": "Places of performance (NUTS)",
            "type": "array",
            "description": "NUTS region or country codes where the contract is performed. Example: `ES51` (Cataluna), `ESP`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum total value",
            "minimum": 0,
            "type": "number",
            "description": "Minimum total contract value in the notice currency. Example: `100000`. Combine with Currencies for comparable values."
          },
          "maxValue": {
            "title": "Maximum total value",
            "minimum": 0,
            "type": "number",
            "description": "Maximum total contract value in the notice currency. Example: `5000000`."
          },
          "currencies": {
            "title": "Currencies",
            "type": "array",
            "description": "Currency codes for the value filters. Example: `EUR`.",
            "items": {
              "type": "string"
            }
          },
          "expertQuery": {
            "title": "Expert TED query",
            "type": "string",
            "description": "Full TED expert-search expression instead of the filters above. Example: `FT=\"software\" AND buyer-country=ESP`. Multiple values use spaces: `buyer-country IN (ESP FRA)`."
          },
          "filters": {
            "title": "Guided filters (JSON)",
            "type": "object",
            "description": "Grouped filters. Example: {\"text\":{\"include\":[\"cloud\"],\"exclude\":[\"hardware\"]},\"deadline\":{\"from\":\"2026-11-01\"}}. Cannot be combined with Expert query."
          },
          "advancedFilters": {
            "title": "Advanced field filters (JSON)",
            "type": "array",
            "description": "List of {\"field\",\"operator\",\"value\"}. Example: [{\"field\":\"buyer-name\",\"operator\":\"=\",\"value\":\"Ayuntamiento\"}]. Operators: =, IN, >=, <=, >, <. Contact/PII fields are rejected.",
            "default": []
          },
          "fieldsPreset": {
            "title": "Output fields",
            "enum": [
              "opportunities",
              "awards",
              "custom"
            ],
            "type": "string",
            "description": "Opportunities: tender fields. Awards: adds winner and awarded value. Custom: use the Custom fields list.",
            "default": "opportunities"
          },
          "fields": {
            "title": "Custom TED fields (JSON)",
            "type": "array",
            "description": "Only for the Custom preset. Example: [\"publication-number\",\"notice-title\",\"buyer-name\"]. Contact/PII fields are rejected.",
            "default": []
          },
          "preferredLanguages": {
            "title": "Preferred display languages",
            "type": "array",
            "description": "Three-letter TED language codes, in order of preference, used for the readable title, buyer and description. Example: `eng`, `spa`. Raw multilingual values are always kept.",
            "default": [
              "eng"
            ],
            "items": {
              "type": "string"
            }
          },
          "withDetails": {
            "title": "Include lot details",
            "type": "boolean",
            "description": "Adds a `details` object with the public lot-level values TED returned. Never includes contact data.",
            "default": false
          },
          "scope": {
            "title": "Search scope",
            "enum": [
              "ALL",
              "ACTIVE",
              "LATEST"
            ],
            "type": "string",
            "description": "ALL = every notice, ACTIVE = notices still open, LATEST = newest versions.",
            "default": "ALL"
          },
          "onlyLatestVersions": {
            "title": "Only latest notice versions",
            "type": "boolean",
            "description": "Skip superseded corrections of the same notice.",
            "default": true
          },
          "pageSize": {
            "title": "Results per API page",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "1-250. Leave at 100 unless TED times out; it is capped to Maximum notices on small runs.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}