{
  "openapi": "3.0.1",
  "info": {
    "title": "France Town Demographics: Age, Jobs & Housing (INSEE Census)",
    "description": "Official INSEE census 2023 key figures for any French town, EPCI, department or region: population growth, age structure, households, owners vs renters, social housing, vacant and second homes, unemployment, diplomas and occupations. Pay per area.",
    "version": "1.0",
    "x-build-id": "KToTlTtTIppdBNM9T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacraft-studio~france-town-demographics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacraft-studio-france-town-demographics",
        "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-town-demographics/runs": {
      "post": {
        "operationId": "runs-sync-datacraft-studio-france-town-demographics",
        "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-town-demographics/run-sync": {
      "post": {
        "operationId": "run-sync-datacraft-studio-france-town-demographics",
        "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": {
          "geoLevel": {
            "title": "Geographic level",
            "enum": [
              "COM",
              "ARM",
              "EPCI",
              "DEP",
              "REG",
              "FRANCE"
            ],
            "type": "string",
            "description": "Level of the areas returned.",
            "default": "COM"
          },
          "codes": {
            "title": "Area codes",
            "type": "array",
            "description": "Official INSEE codes at the chosen level, e.g. 69123 (Lyon) for towns, 75056 (Paris), 200046977 for an EPCI, 69 for a department, 84 for a region.",
            "items": {
              "type": "string"
            }
          },
          "townNames": {
            "title": "Town or area names",
            "type": "array",
            "description": "Exact names at the chosen level, e.g. Villeurbanne. Add the department in brackets to avoid homonyms: Saint-Denis (93).",
            "items": {
              "type": "string"
            }
          },
          "postalCodes": {
            "title": "Postal codes",
            "type": "array",
            "description": "5-digit postal codes (towns or districts only), resolved with geo.api.gouv.fr.",
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "All towns (or districts, EPCIs) of these departments, e.g. 69, 2A, 974.",
            "items": {
              "type": "string"
            }
          },
          "minPopulation": {
            "title": "Minimum population",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only areas with at least this census population. With geoLevel COM and no other selection, scans all of France (e.g. 10000 = about 1,000 towns)."
          },
          "maxPopulation": {
            "title": "Maximum population",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only areas with at most this census population."
          },
          "minPopulationGrowthPct": {
            "title": "Minimum population growth since previous census (%)",
            "minimum": -100,
            "maximum": 1000,
            "type": "number",
            "description": "Population change between the previous census (2017) and 2023, in %."
          },
          "maxPopulationGrowthPct": {
            "title": "Maximum population growth since previous census (%)",
            "minimum": -100,
            "maximum": 1000,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minUnemploymentRate": {
            "title": "Minimum unemployment rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Census unemployment rate of 15-64 year olds (self-declared, higher than the ILO rate). France: about 11.4%."
          },
          "maxUnemploymentRate": {
            "title": "Maximum unemployment rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minSeniorsPct": {
            "title": "Minimum share of people aged 65+ (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of residents aged 65 or more. France: about 21%."
          },
          "maxSeniorsPct": {
            "title": "Maximum share of people aged 65+ (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minVacancyRate": {
            "title": "Minimum vacant dwellings (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of vacant dwellings in all dwellings. France: about 7.8%."
          },
          "maxVacancyRate": {
            "title": "Maximum vacant dwellings (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minSecondaryHomesPct": {
            "title": "Minimum second homes (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of second homes and occasional dwellings in all dwellings."
          },
          "maxSecondaryHomesPct": {
            "title": "Maximum second homes (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minOwnersPct": {
            "title": "Minimum owner-occupiers (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of main residences occupied by their owner."
          },
          "maxOwnersPct": {
            "title": "Maximum owner-occupiers (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minSocialHousingPct": {
            "title": "Minimum social housing tenants (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of main residences rented in the social (HLM) sector."
          },
          "maxSocialHousingPct": {
            "title": "Maximum social housing tenants (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "minHigherEducationPct": {
            "title": "Minimum higher-education graduates (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Share of non-students aged 15+ with a higher-education diploma."
          },
          "maxHigherEducationPct": {
            "title": "Maximum higher-education graduates (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper bound for the same indicator."
          },
          "includeNoData": {
            "title": "Include areas without census data",
            "type": "boolean",
            "description": "Areas missing from the census release (e.g. towns created after 2023) are skipped and not charged by default; tick to receive them with empty values (charged).",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "population_desc",
              "population_asc",
              "growth_desc",
              "growth_asc",
              "unemployment_desc",
              "unemployment_asc",
              "seniors_desc",
              "young_adults_desc",
              "vacancy_desc",
              "secondary_homes_desc",
              "owners_desc",
              "renters_desc",
              "higher_education_desc",
              "executives_desc",
              "code"
            ],
            "type": "string",
            "description": "Order of the rows before the maxItems limit.",
            "default": "population_desc"
          },
          "maxItems": {
            "title": "Maximum areas",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of areas returned (each one is charged). Up to 3,000 areas are analysed per run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}