{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Public Tenders Scraper — TED + national bulletins",
    "description": "Scrape EU public tenders (appels d offres, marches publics, Ausschreibungen) from TED plus national bulletins like BOAMP, which carry below-threshold contracts TED never publishes. Lot-level CPV codes and deadlines from eForms. Deduplicated: ~28% appear twice, you pay once.",
    "version": "0.1",
    "x-build-id": "cycTpQLvxgrmL4x6Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/baptsg~eu-public-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-baptsg-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/baptsg~eu-public-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-baptsg-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/baptsg~eu-public-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-baptsg-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": {
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Only return notices published on or after this date (YYYY-MM-DD). Defaults to the last 7 days — the useful window for a daily watch."
          },
          "publishedUntil": {
            "title": "Published until",
            "type": "string",
            "description": "Only return notices published on or before this date (YYYY-MM-DD). Leave empty for 'up to now'. Use it with 'Published since' to analyse a past period."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Which countries to cover. Leave empty for the whole EU + EEA — that is TED's natural scope. Accepts ISO codes or common names: FRA, FR, France, DEU, Germany… France additionally pulls BOAMP, the national bulletin, which carries below-EU-threshold contracts that TED never publishes.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Which kinds of notices to return. 'tender' = open calls you can still bid on. 'award' = who won, and for how much.",
            "items": {
              "type": "string",
              "enum": [
                "tender",
                "award",
                "correction",
                "prior-information",
                "cancellation",
                "modification"
              ],
              "enumTitles": [
                "Tender (open call for bids)",
                "Award (contract granted)",
                "Correction",
                "Prior information notice",
                "Cancellation",
                "Modification"
              ]
            },
            "default": [
              "tender"
            ]
          },
          "onlyOpenTenders": {
            "title": "Drop notices whose deadline has passed",
            "type": "boolean",
            "description": "Keep only notices you can still respond to. Turn off to include expired ones for market analysis.",
            "default": true
          },
          "cpvCodes": {
            "title": "CPV codes",
            "type": "array",
            "description": "Filter by CPV code or prefix. Use a division to catch a whole sector: 45 = construction works, 72 = IT services, 85 = health and social care, 90 = waste and environment.",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "French departments",
            "type": "array",
            "description": "Two- or three-digit department codes, e.g. 75, 13, 974. France only — applied to both sources, TED via its NUTS region codes.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text terms matched against the notice subject. Any match is enough.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "BOAMP is the French national bulletin; TED is the EU journal. Above EU thresholds a contract appears in BOTH — keeping both and letting the actor deduplicate gives the widest coverage without paying twice for the same notice.",
            "items": {
              "type": "string",
              "enum": [
                "boamp",
                "ted"
              ],
              "enumTitles": [
                "BOAMP (France)",
                "TED (European Union)"
              ]
            },
            "default": [
              "boamp",
              "ted"
            ]
          },
          "maxItems": {
            "title": "Maximum notices to return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on the number of deduplicated notices returned — and therefore on what you are charged.",
            "default": 500
          },
          "enrichLots": {
            "title": "Extract lots from eForms",
            "type": "boolean",
            "description": "Parse the full eForms/UBL document behind each TED notice to extract its lots, each with its own CPV code and deadline. This is what bidders actually respond to, and TED’s search API does not expose it. Adds about one request per returned notice; turn it off for the fastest possible run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}