{
  "openapi": "3.0.1",
  "info": {
    "title": "French Site Selection Score by Town: Market, Competition, Jobs",
    "description": "For a department, a list of towns or a radius, and a sector (NAF) or a job (ROME): a site-selection score per town, with a published method and its indicators (population, amenities, Sirene competitors, France Travail job offers and jobseekers).",
    "version": "0.0",
    "x-build-id": "ymnMBQQ2E4KF5FnyN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/geckostar~score-implantation-commune/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-geckostar-score-implantation-commune",
        "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/geckostar~score-implantation-commune/runs": {
      "post": {
        "operationId": "runs-sync-geckostar-score-implantation-commune",
        "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/geckostar~score-implantation-commune/run-sync": {
      "post": {
        "operationId": "run-sync-geckostar-score-implantation-commune",
        "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": {
          "clientId": {
            "title": "francetravail.io client ID",
            "type": "string",
            "description": "Optional. Client ID of YOUR application on francetravail.io (free, subscribed to the Marché du travail, Informations sur un territoire and Cadre de vie des communes APIs): lowest price and up to 200 towns. If you leave this field and the secret empty, the developer's key is used: higher price, 30 towns at most."
          },
          "clientSecret": {
            "title": "francetravail.io secret",
            "type": "string",
            "description": "Optional, with the client ID. Secret of your francetravail.io application. You entrust it to this tool for the duration of the run only: it is encrypted by Apify and never appears in the log or in the results."
          },
          "nafCodes": {
            "title": "NAF codes (your sector)",
            "type": "array",
            "description": "The business you want to open, used to count competing companies: 56.10A or 5610A (traditional restaurants), 96.02A (hairdressing), 47.73Z (pharmacies)… Up to 3. Give at least one NAF code or one ROME code.",
            "items": {
              "type": "string"
            }
          },
          "romeCode": {
            "title": "ROME code (job to hire for)",
            "type": "string",
            "description": "Optional. The key job you will need to hire for locally, used to measure how easy hiring is: G1603 (restaurant all-rounder), D1202 (hairdressing), J1506 (nursing)… Find a code: France Travail's MétierScope, https://candidat.francetravail.fr/metierscope/."
          },
          "departements": {
            "title": "Departments",
            "type": "array",
            "description": "Department codes: 31, 69, 2A, 974… Up to 5 (2 with the developer's key). One kind of area per run: departments, a list of towns, or a centre town and a radius.",
            "items": {
              "type": "string"
            }
          },
          "codesInsee": {
            "title": "Towns (INSEE codes)",
            "type": "array",
            "description": "INSEE codes of the towns to compare, not postcodes: 31555 (Toulouse), 69123 (Lyon), 75056 (Paris)… Up to 200 (30 with the developer's key).",
            "items": {
              "type": "string"
            }
          },
          "communeCentre": {
            "title": "Centre town (INSEE code)",
            "type": "string",
            "description": "With the radius: every town within this radius of the centre of this town. For example 31555 for Toulouse."
          },
          "rayonKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "From 1 to 50 km around the centre town (15 km if empty)."
          },
          "populationMin": {
            "title": "Minimum population",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "With departments or a radius: less populated towns are dropped before scoring (2,000 inhabitants if empty; 0 to keep them all). No effect on a list of towns."
          },
          "maxCommunes": {
            "title": "Maximum number of towns scored",
            "minimum": 2,
            "maximum": 200,
            "type": "integer",
            "description": "The most populated towns in the area are scored first. Prefilled with 10 for a first try. If empty: 50 with your credentials, 20 without. At most: 200 with your credentials, 30 without."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}