{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Public Tenders Scraper (TED)",
    "description": "Filter and extract public procurement notices from the EU's official TED tender portal - contract notices, awards, values, deadlines and buyer details.",
    "version": "0.1",
    "x-build-id": "yuBcH4BCwh5awl1ne"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataservice_comp~eu-public-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataservice_comp-eu-public-tenders-scraper",
        "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/dataservice_comp~eu-public-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataservice_comp-eu-public-tenders-scraper",
        "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/dataservice_comp~eu-public-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataservice_comp-eu-public-tenders-scraper",
        "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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes of the contracting authority, e.g. DE, FR, NL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeCountries": {
            "title": "Exclude countries",
            "type": "array",
            "description": "Country codes to exclude from results.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nutsCodes": {
            "title": "NUTS region codes",
            "type": "array",
            "description": "Optional regional targeting, finer than country level. Example: DE212 for Munich. End a code with * to match a whole region group, e.g. DE21* for the Oberbayern group.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "CPV classification codes. With prefix matching, '72' covers all IT services.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpvMatchMode": {
            "title": "CPV match mode",
            "enum": [
              "prefix",
              "exact"
            ],
            "type": "string",
            "description": "Prefix matches any code starting with the value. Exact requires a full match.",
            "default": "prefix"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to search in title and description. Note that notices are written in the buyer's own language, so keyword filters alone will miss results.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatchMode": {
            "title": "Keyword match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a notice must match any one of the keywords or all of them.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "relativeDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Shortcut for recent notices. Overrides the absolute publication dates below when set.",
            "default": 7
          },
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "ISO 8601 date, e.g. 2026-07-01. Ignored when 'Last N days' is set."
          },
          "publishedUntil": {
            "title": "Published until",
            "type": "string",
            "description": "ISO 8601 date. Defaults to today."
          },
          "deadlineAfter": {
            "title": "Deadline after",
            "type": "string",
            "description": "Only notices whose submission deadline falls after this date."
          },
          "deadlineBefore": {
            "title": "Deadline before",
            "type": "string",
            "description": "Only notices whose submission deadline falls before this date."
          },
          "onlyOpen": {
            "title": "Only open tenders",
            "type": "boolean",
            "description": "Exclude notices whose submission deadline has already passed.",
            "default": false
          },
          "minValueEur": {
            "title": "Minimum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated contract value."
          },
          "maxValueEur": {
            "title": "Maximum value (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum estimated contract value."
          },
          "includeUnknownValue": {
            "title": "Include notices with no stated value",
            "type": "boolean",
            "description": "Many authorities do not publish a budget. Turning this off alongside a minimum value removes a large share of otherwise relevant notices.",
            "default": true
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Contract notices are open opportunities. Contract awards show who won.",
            "items": {
              "type": "string",
              "enum": [
                "prior-information",
                "contract-notice",
                "contract-award",
                "modification",
                "design-contest"
              ],
              "enumTitles": [
                "Prior information notice",
                "Contract notice (open opportunity)",
                "Contract award (result)",
                "Contract modification",
                "Design contest"
              ]
            },
            "default": [
              "contract-notice"
            ]
          },
          "procedureTypes": {
            "title": "Procedure types",
            "type": "array",
            "description": "Restrict results to specific procurement procedure types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "restricted",
                "negotiated",
                "competitive-dialogue",
                "innovation-partnership"
              ],
              "enumTitles": [
                "Open",
                "Restricted",
                "Negotiated",
                "Competitive dialogue",
                "Innovation partnership"
              ]
            },
            "default": []
          },
          "contractNature": {
            "title": "Contract nature",
            "type": "array",
            "description": "Restrict results to works, supplies or services contracts. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "works",
                "supplies",
                "services"
              ],
              "enumTitles": [
                "Works",
                "Supplies",
                "Services"
              ]
            },
            "default": []
          },
          "buyerType": {
            "title": "Buyer type",
            "type": "array",
            "description": "Type of contracting authority, using TED's raw legal-type codes, e.g. la (local authority), cga (central government), ra (regional authority), body-pl (body governed by public law). Passed directly to TED, so an unknown code returns zero results rather than an error - leave empty for all buyer types.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on rows returned. Protects you from an unexpectedly large and expensive run.",
            "default": 1000
          },
          "language": {
            "title": "Preferred language",
            "type": "string",
            "description": "Preferred language for text fields, as a 2-letter (en, de, fr) or 3-letter (eng, deu, fra) code. Falls back to English, then to whatever language the notice was actually published in, when no translation exists.",
            "default": "en"
          },
          "includeLots": {
            "title": "Include lot details",
            "type": "boolean",
            "description": "Attach a 'lots' array to each notice with the per-lot title, description, estimated value and deadline.",
            "default": true
          },
          "includeDocuments": {
            "title": "Include document links",
            "type": "boolean",
            "description": "Attach a 'documentUrls' array with direct links to the tender documents of each lot.",
            "default": true
          },
          "includeContactPerson": {
            "title": "Include contact person details",
            "type": "boolean",
            "description": "Notices may contain the name, email and phone of a contact at the authority. If enabled, you are responsible for handling this data in line with GDPR.",
            "default": false
          },
          "includeRawXml": {
            "title": "Include raw XML",
            "type": "boolean",
            "description": "Attach the source XML to each row. Increases output size significantly. For debugging only.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Return only notices published since the previous run with the same state key.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Use different keys to maintain separate watchlists.",
            "default": "default"
          },
          "deduplicate": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Skip notice IDs already returned in earlier runs.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}