{
  "openapi": "3.0.1",
  "info": {
    "title": "BOAMP, DECP & TED Scraper — EU Tender Renewal Radar",
    "description": "Detect public procurement contracts approaching expiry (3-18 months before renewal) across France (BOAMP, DECP) and Europe (TED v3). Extracts buyer IDs, incumbent winners, CPV codes, reconstructed end dates, and optional PDF contract durations for B2B GovTech & sales teams.",
    "version": "1.0",
    "x-build-id": "Jfsodb3ujgs7IrGRb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vesper_studio~eu-public-tender-renewal-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vesper_studio-eu-public-tender-renewal-radar",
        "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/vesper_studio~eu-public-tender-renewal-radar/runs": {
      "post": {
        "operationId": "runs-sync-vesper_studio-eu-public-tender-renewal-radar",
        "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/vesper_studio~eu-public-tender-renewal-radar/run-sync": {
      "post": {
        "operationId": "run-sync-vesper_studio-eu-public-tender-renewal-radar",
        "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": "Data sources",
            "type": "array",
            "description": "Official public procurement APIs to query. BOAMP and DECP cover France (national + sub-threshold + EU notices); TED v3 covers all EU/EEA above-threshold notices.",
            "items": {
              "type": "string",
              "enum": [
                "boamp",
                "decp",
                "ted"
              ],
              "enumTitles": [
                "BOAMP (France - DILA OpenDataSoft)",
                "DECP (France - Bercy Essential Data)",
                "TED v3 (EU/EEA - Official EU Journal)"
              ]
            },
            "default": [
              "boamp",
              "decp",
              "ted"
            ]
          },
          "cpvCodes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "Target sector CPV prefixes (2 to 8 digits). Examples: 9091 (cleaning), 7971 (security), 7200 or 72 (IT services), 5000 or 5070 (maintenance). Leave empty to scan all sectors.",
            "items": {
              "type": "string"
            },
            "default": [
              "9091"
            ]
          },
          "countries": {
            "title": "Target countries (ISO-2)",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes (e.g. FR, DE, BE, ES, IT, NL, PL). BOAMP & DECP only apply when FR is included; TED filters by all specified countries.",
            "items": {
              "type": "string"
            },
            "default": [
              "FR"
            ]
          },
          "minAmountEur": {
            "title": "Minimum contract amount (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum contract value in EUR. Contracts without a published value are excluded when this threshold is set > 0.",
            "default": 0
          },
          "expiryWindowMonths": {
            "title": "Expiry horizon (max months until renewal)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Maximum number of months from today until the estimated contract end date. Default 18 captures urgent_0_6m, pipeline_6_12m, and watch_12_18m windows.",
            "default": 18
          },
          "minExpiryMonths": {
            "title": "Minimum months until expiry",
            "minimum": 0,
            "maximum": 36,
            "type": "integer",
            "description": "Minimum months until expiry (use 3 for strict J-3 to J-18 prospecting, or 0 to include contracts expiring within the next 3 months too).",
            "default": 0
          },
          "parsePdfDuration": {
            "title": "Parse notice PDFs for missing durations (PyMuPDF)",
            "type": "boolean",
            "description": "When enabled, downloads official BOAMP/TED notice PDFs ONLY for contracts lacking explicit duration/end date in JSON and extracts duration/amount via multilingual FR/EN/DE regexes. Each parsed PDF bills one 'pdf-parsed' event.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new contracts (delta mode)",
            "type": "boolean",
            "description": "Skip contracts already delivered in previous runs using the Apify Key-Value Store ('seen_contracts'). State is checkpointed on completion and on graceful abort.",
            "default": false
          },
          "resolveSiretNames": {
            "title": "Resolve DECP SIRET IDs to organization names",
            "type": "boolean",
            "description": "Look up buyer and winner names for DECP records via the official French Annuaire des Entreprises API (cached per SIRET).",
            "default": true
          },
          "maxItems": {
            "title": "Maximum contract records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of expiring contract records to deliver across all selected sources. Each delivered contract bills one 'contract-record' event.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}