{
  "openapi": "3.0.1",
  "info": {
    "title": "French Public Contract Awards (DECP) – Who Won, Amount, Buyer",
    "description": "Search awarded French public contracts (DECP): winner companies, amounts, buyers, CPV, dates. Incremental monitor mode. Legal entities only. Unofficial, built on open data.",
    "version": "0.1",
    "x-build-id": "BbsHJxTs1WPUcf1RI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shadow-tools~french-public-procurement-awards-decp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shadow-tools-french-public-procurement-awards-decp",
        "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/shadow-tools~french-public-procurement-awards-decp/runs": {
      "post": {
        "operationId": "runs-sync-shadow-tools-french-public-procurement-awards-decp",
        "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/shadow-tools~french-public-procurement-awards-decp/run-sync": {
      "post": {
        "operationId": "run-sync-shadow-tools-french-public-procurement-awards-decp",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "Pick one. \"search\" = use when you have a question about past awards (who won, amounts, a buyer, a competitor, a CPV code): returns awards matching your filters, newest first. \"monitor\" = use only for a recurring (daily) job: returns awards published since the last run (or since 'since'), each delivered once; it keeps state between runs. Allowed values: search, monitor. Default: search.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords in the contract object",
            "type": "array",
            "description": "Words or phrases searched in the contract object (free text), e.g. [\"nettoyage\", \"logiciel\"]. ANY of them matches (OR). Case-insensitive but accents must match: add both \"ménage\" and \"menage\" if needed. Prefer precise keywords (fewer rows to scan, so a faster first call). Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "buyers": {
            "title": "Buyers (name or SIREN/SIRET)",
            "type": "array",
            "description": "Public buyers as a list: a name fragment (e.g. \"REGION OCCITANIE\") or a SIREN (9 digits, e.g. 217500016) or a SIRET (14 digits). ANY of them matches (OR). Empty = all buyers.",
            "items": {
              "type": "string"
            }
          },
          "winners": {
            "title": "Winner companies (name or SIREN/SIRET)",
            "type": "array",
            "description": "Winning companies as a list: a name fragment (e.g. \"VIDELIO\") or a SIREN (9 digits, e.g. 350093704) or a SIRET (14 digits); use it for competitor tracking. ANY of them matches (OR). Sole traders are never returned. Empty = all winners.",
            "items": {
              "type": "string"
            }
          },
          "cpvPrefixes": {
            "title": "CPV code prefixes",
            "type": "array",
            "description": "CPV (Common Procurement Vocabulary) code prefixes as a list of 2 to 8 digit strings, matched as a prefix, e.g. [\"72\"] = IT services, [\"90911\"] = cleaning services. ANY of them matches (OR).",
            "items": {
              "type": "string"
            }
          },
          "buyerDepartments": {
            "title": "Buyer departments",
            "type": "array",
            "description": "List of department codes of the buyer: 2 digits, 3 digits for overseas or 2A/2B for Corsica, e.g. [\"75\", \"69\", \"2A\", \"971\"]. ANY matches.",
            "items": {
              "type": "string"
            }
          },
          "buyerRegions": {
            "title": "Buyer regions",
            "type": "array",
            "description": "List of INSEE region codes of the buyer (2-3 digits), e.g. [\"11\"] = Ile-de-France, 84 = Auvergne-Rhone-Alpes, 93 = Provence-Alpes-Cote d'Azur, 75 = Nouvelle-Aquitaine, 76 = Occitanie. ANY matches.",
            "items": {
              "type": "string"
            }
          },
          "winnerDepartments": {
            "title": "Winner departments",
            "type": "array",
            "description": "List of department codes of the winner's registered establishment: 2 digits, 3 digits for overseas or 2A/2B, e.g. [\"59\"]. ANY matches.",
            "items": {
              "type": "string"
            }
          },
          "procedures": {
            "title": "Award procedures",
            "type": "array",
            "description": "Keep only these award procedures; choose from the allowed values (exact French spelling), e.g. [\"Appel d'offres ouvert\"]. Empty = all procedures.",
            "items": {
              "type": "string",
              "enum": [
                "Appel d'offres ouvert",
                "Appel d'offres restreint",
                "Procédure adaptée",
                "Procédure avec négociation",
                "Dialogue compétitif",
                "Marché passé sans publicité ni mise en concurrence préalable"
              ],
              "enumTitles": [
                "Open call for tenders",
                "Restricted call for tenders",
                "Adapted procedure (below EU thresholds)",
                "Procedure with negotiation",
                "Competitive dialogue",
                "Negotiated without prior publication"
              ]
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Keep only these contract types; allowed values: Travaux (works), Services, Fournitures (supplies), e.g. [\"Services\"]. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "Travaux",
                "Services",
                "Fournitures"
              ],
              "enumTitles": [
                "Works",
                "Services",
                "Supplies"
              ]
            }
          },
          "minAmount": {
            "title": "Minimum amount (EUR)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep awards of at least this amount in EUR excl. VAT as declared, integer 0 or more, e.g. 100000. Awards without a declared amount are excluded when a bound is set."
          },
          "maxAmount": {
            "title": "Maximum amount (EUR)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Keep awards of at most this amount in EUR, integer 0 or more, e.g. 500000. Awards without a declared amount are excluded when a bound is set."
          },
          "excludeAmountAnomalies": {
            "title": "Exclude suspect amounts",
            "type": "boolean",
            "description": "Set true to drop amounts the dataset flags as suspect or aberrant (compared with similar contracts). Default false: they are kept and the flag is in the field amountFlag."
          },
          "notifiedFrom": {
            "title": "Notified from (date)",
            "type": "string",
            "description": "Search mode: earliest contract notification date. Format YYYY-MM-DD, example 2026-01-01. Empty = use 'Look-back period' (sinceDays). An invalid date makes the run fail with a clear error."
          },
          "notifiedTo": {
            "title": "Notified until (date)",
            "type": "string",
            "description": "Search mode: latest contract notification date. Format YYYY-MM-DD, example 2026-06-30. Empty = no upper bound."
          },
          "sinceDays": {
            "title": "Look-back period (days)",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Search mode, used when notifiedFrom is empty: how many days back to search, integer 0-36500, e.g. 30 (applied when empty). Keep it small for a fast answer. 0 = the whole history (slow, only with precise filters). The open data lags the real world by about 1 to 2 weeks."
          },
          "since": {
            "title": "Monitor: published since (date)",
            "type": "string",
            "description": "Monitor mode only: first run starts at this publication date. Format YYYY-MM-DD, example 2026-10-01 (empty = 14 days ago). Later runs resume automatically after the last delivered award."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of award records returned, integer 1-10000, default 20 (keep it small, e.g. 20; raise it only if the run SUMMARY says capped: true). Applies per keyword/buyer/winner/CPV combination, then the union is cut to this total. Your run cost limit also applies.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}