{
  "openapi": "3.0.1",
  "info": {
    "title": "France Public Purchase Projects: APProch Upcoming Tenders",
    "description": "Official APProch pipeline of planned French public purchases (Licence Ouverte 2.0): buyer SIREN and name, CPV, amount band, departments, reserved lots, planned dates. Filters and alert mode. Pay per project.",
    "version": "1.0",
    "x-build-id": "nHQ0ysd8rpSZx0LDE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacraft-studio~france-public-purchase-projects/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacraft-studio-france-public-purchase-projects",
        "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/datacraft-studio~france-public-purchase-projects/runs": {
      "post": {
        "operationId": "runs-sync-datacraft-studio-france-public-purchase-projects",
        "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/datacraft-studio~france-public-purchase-projects/run-sync": {
      "post": {
        "operationId": "run-sync-datacraft-studio-france-public-purchase-projects",
        "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": {
          "query": {
            "title": "Keyword search",
            "type": "string",
            "description": "Words that must all appear in the title or description (accents ignored)."
          },
          "buyerSirens": {
            "title": "Buying-entity SIREN",
            "type": "array",
            "description": "9-digit SIREN of the public buyer (e.g. a ministry or a local authority).",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Keep projects whose place of performance includes one of these department codes (e.g. 69, 13, 2A, 974). Nationwide projects that list every department are kept.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Purchase categories",
            "type": "array",
            "description": "Travaux, Services or Fournitures.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes or prefixes",
            "type": "array",
            "description": "Full CPV codes or prefixes (2 to 8 digits), e.g. 45 for construction, 72000000 for IT.",
            "items": {
              "type": "string"
            }
          },
          "minAmountEur": {
            "title": "Minimum estimated amount (€)",
            "type": "string",
            "description": "Keep projects whose amount band can reach at least this value. Example: 1000000 keeps 1M-5M€ and above."
          },
          "maxAmountEur": {
            "title": "Maximum estimated amount (€)",
            "type": "string",
            "description": "Keep projects whose amount band starts at or below this value. Example: 100000 keeps 0-40k€ and 40k-100k€."
          },
          "reservedOnly": {
            "title": "Reserved contracts only",
            "type": "boolean",
            "description": "Keep only projects reserved for inclusive structures (SIAE, adapted companies, SSE).",
            "default": false
          },
          "reservedKinds": {
            "title": "Reserved for",
            "type": "array",
            "description": "siae (inclusion structures), ea (adapted companies), eess (social and solidarity economy).",
            "items": {
              "type": "string"
            }
          },
          "socialConsiderations": {
            "title": "Social considerations only",
            "type": "boolean",
            "description": "Keep only projects that plan social considerations.",
            "default": false
          },
          "environmentalConsiderations": {
            "title": "Environmental considerations only",
            "type": "boolean",
            "description": "Keep only projects that plan environmental considerations.",
            "default": false
          },
          "messagingOpen": {
            "title": "Open messaging only",
            "type": "boolean",
            "description": "Keep only projects whose APProch exchange space is currently open.",
            "default": false
          },
          "upcomingOnly": {
            "title": "Upcoming publication dates only",
            "type": "boolean",
            "description": "Keep only projects whose planned tender publication date is today or later (Europe/Paris).",
            "default": false
          },
          "plannedFrom": {
            "title": "Planned publication from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only projects whose planned publication date is on or after this day."
          },
          "plannedTo": {
            "title": "Planned publication until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only projects whose planned publication date is on or before this day."
          },
          "hasConsultationUrl": {
            "title": "Only projects with a consultation link",
            "type": "boolean",
            "description": "Keep only projects that already publish a link to the tender consultation.",
            "default": false
          },
          "includeDescription": {
            "title": "Include the project description",
            "type": "boolean",
            "description": "Uncheck to deliver a shorter row without the free-text description.",
            "default": true
          },
          "includeBuyerName": {
            "title": "Resolve the buyer name (SIRENE)",
            "type": "boolean",
            "description": "Look up the official name of each buying entity. Director names are never requested. Disable only to skip the lookup.",
            "default": true
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "plannedDate",
              "plannedDateAsc",
              "plannedDateDesc",
              "amountDesc",
              "amountAsc",
              "title",
              "recent"
            ],
            "type": "string",
            "description": "plannedDate puts upcoming projects first (soonest first), then undated, then the most recent past dates.",
            "default": "plannedDate"
          },
          "onlyNew": {
            "title": "Alert mode (only new or changed)",
            "type": "boolean",
            "description": "Deliver only projects that are new or whose title, dates, amount, procedure or location changed since the last run.",
            "default": false
          },
          "stateStoreName": {
            "title": "Alert-mode state store name",
            "type": "string",
            "description": "Key-value store used by alert mode.",
            "default": "france-public-purchase-projects-state"
          },
          "maxItems": {
            "title": "Maximum projects to deliver",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on charged rows (default 1000). Use 0 for no cap (still limited by the run cost limit).",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}