{
  "openapi": "3.0.1",
  "info": {
    "title": "France Local Investment Grants — DETR, DSIL, DPV, DSID Projects",
    "description": "Projects of French communes, intercommunalities and départements funded by state investment grants (DETR, DSIL, DPV, DSID): title, cost, grant, rate. Filter by year, département, scheme or keyword, or aggregate.",
    "version": "1.0",
    "x-build-id": "7LEH17eAnCX4CkdRd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vespa-zzz~fr-local-investment-grants/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vespa-zzz-fr-local-investment-grants",
        "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/vespa-zzz~fr-local-investment-grants/runs": {
      "post": {
        "operationId": "runs-sync-vespa-zzz-fr-local-investment-grants",
        "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/vespa-zzz~fr-local-investment-grants/run-sync": {
      "post": {
        "operationId": "run-sync-vespa-zzz-fr-local-investment-grants",
        "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": {
          "years": {
            "title": "Budget years",
            "type": "array",
            "description": "Budget years (exercice), e.g. 2025, 2024. Data is available from 2018. Empty = the latest year.",
            "items": {
              "type": "integer",
              "minimum": 2018,
              "maximum": 2100
            }
          },
          "departments": {
            "title": "Départements",
            "type": "array",
            "description": "Département codes of the beneficiary, e.g. 1, 13, 75, 2A, 971 (Métropole de Lyon is 691). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "schemes": {
            "title": "Grant schemes",
            "type": "array",
            "description": "DETR (rural areas), DSIL (local investment support), DPV (urban policy), DSID (départements). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "DETR",
                "DSIL",
                "DPV",
                "DSID"
              ]
            }
          },
          "keywords": {
            "title": "Project title contains",
            "type": "array",
            "description": "Words in the project title (case-insensitive; type them without accents, as the source titles are mostly unaccented), e.g. ecole, gymnase, voirie, chaufferie, photovoltaique. Several words = any of them. %, _ and * are not allowed.",
            "items": {
              "type": "string"
            }
          },
          "beneficiaryTypes": {
            "title": "Beneficiary types",
            "type": "array",
            "description": "commune, epci, syndicat, departement, petr, collectivité à statut particulier, autre maître d'ouvrage. Empty = all. For other project owners, name and SIREN are shown only when the SIREN identifies a public-sector body.",
            "items": {
              "type": "string"
            }
          },
          "inseeCodes": {
            "title": "Commune INSEE codes",
            "type": "array",
            "description": "5-character INSEE codes of beneficiary communes, e.g. 69123 (Lyon).",
            "items": {
              "type": "string"
            }
          },
          "sirens": {
            "title": "Beneficiary SIREN numbers",
            "type": "array",
            "description": "9-digit SIREN of the beneficiary authority.",
            "items": {
              "type": "string"
            }
          },
          "minSubsidyEur": {
            "title": "Minimum grant (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only projects with a grant of at least this amount."
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "none",
              "department",
              "beneficiary",
              "scheme",
              "departmentScheme"
            ],
            "type": "string",
            "description": "none = one row per project. department / beneficiary / scheme / departmentScheme = totals (projects, cost, grant) per group and year.",
            "default": "none"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum number of output rows (projects or groups).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}