{
  "openapi": "3.0.1",
  "info": {
    "title": "France Company Registry Export (SIREN): No 10k Cap",
    "description": "Export every French company in a NAF code, departement or postcode segment from the official Annuaire des Entreprises API, past its 10,000-result cap: automatic splitting, SIREN dedupe, completeness report, prospecting opt-outs excluded, weekly diff mode. $2.90 per 1,000.",
    "version": "0.0",
    "x-build-id": "jFhtygSjzS2hCJWso"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/classier_linear~france-company-registry-export/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-classier_linear-france-company-registry-export",
        "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/classier_linear~france-company-registry-export/runs": {
      "post": {
        "operationId": "runs-sync-classier_linear-france-company-registry-export",
        "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/classier_linear~france-company-registry-export/run-sync": {
      "post": {
        "operationId": "run-sync-classier_linear-france-company-registry-export",
        "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": {
          "nafCodes": {
            "title": "NAF / APE activity codes",
            "type": "array",
            "description": "INSEE NAF rev. 2 codes of the company's main activity, for example 62.01Z (computer programming), 70.22Z (business consulting), 43.21A (electrical installation), 56.10A (traditional restaurants). 6201Z and 62.01z are accepted. Leave empty to export every activity in the chosen area (then add at least a departement, postcode, legal form or name).",
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "title": "NAF sections (optional)",
            "type": "array",
            "description": "Broad activity sections A to U instead of exact codes, for example F (construction), J (information and communication), M (professional, scientific and technical).",
            "items": {
              "type": "string"
            }
          },
          "departements": {
            "title": "Departements",
            "type": "array",
            "description": "Departement codes such as 75, 69, 13, 2A, 2B, 971 to 976. Leave empty (and postcodes empty) for all of France: the Actor then splits by departement automatically. Note: the API matches a company through ANY of its establishments, so use 'Headquarters in the area only' to keep companies whose head office is in these departements.",
            "items": {
              "type": "string"
            }
          },
          "postcodes": {
            "title": "Postcodes (optional)",
            "type": "array",
            "description": "5-digit postcodes, for example 75011 or 69002. Combined with departements as OR: companies matching either are exported once.",
            "items": {
              "type": "string"
            }
          },
          "headcountBands": {
            "title": "Headcount bands (optional)",
            "type": "array",
            "description": "INSEE employee bands (tranche d'effectif salarié). 11 = 10-19, 12 = 20-49, 21 = 50-99 employees. Leave empty for every size, including companies with no employees (NN), which are the large majority.",
            "items": {
              "type": "string",
              "enum": [
                "NN",
                "00",
                "01",
                "02",
                "03",
                "11",
                "12",
                "21",
                "22",
                "31",
                "32",
                "41",
                "42",
                "51",
                "52",
                "53"
              ],
              "enumTitles": [
                "NN: No employees (non-employer unit)",
                "00: 0 employees at year end",
                "01: 1-2 employees",
                "02: 3-5 employees",
                "03: 6-9 employees",
                "11: 10-19 employees",
                "12: 20-49 employees",
                "21: 50-99 employees",
                "22: 100-199 employees",
                "31: 200-249 employees",
                "32: 250-499 employees",
                "41: 500-999 employees",
                "42: 1,000-1,999 employees",
                "51: 2,000-4,999 employees",
                "52: 5,000-9,999 employees",
                "53: 10,000+ employees"
              ]
            }
          },
          "companyCategories": {
            "title": "Company categories (optional)",
            "type": "array",
            "description": "INSEE category. Many companies (often the newest) have no category yet and are left out when you pick one.",
            "items": {
              "type": "string",
              "enum": [
                "PME",
                "ETI",
                "GE"
              ],
              "enumTitles": [
                "PME: small and medium-sized",
                "ETI: intermediate-sized",
                "GE: large enterprise"
              ]
            }
          },
          "legalForms": {
            "title": "Legal forms (optional)",
            "type": "array",
            "description": "INSEE catégorie juridique codes, for example 5710 (SAS), 5720 (SASU), 5499 (SARL), 5498 (EURL), 1000 (sole proprietor).",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Name contains (optional)",
            "type": "string",
            "description": "Free-text search on company name or address, at least 3 characters. Leave empty for whole segments. Company rows only: the API also applies the text to the establishments it lists, so it cannot be combined with 'One row per: Establishment'."
          },
          "activeOnly": {
            "title": "Active companies only",
            "type": "boolean",
            "description": "Only companies whose legal unit is active (etat_administratif = A). In establishment mode closed establishments are also skipped.",
            "default": true
          },
          "hqOnly": {
            "title": "Headquarters in the area only",
            "type": "boolean",
            "description": "Keep only companies whose head office (siège) is in your departements or postcodes. Without it a Paris search also returns companies headquartered in Lyon or Lille that have one Paris establishment. Rows removed by this filter are never charged. Applies to company rows.",
            "default": true
          },
          "optOutHandling": {
            "title": "Prospecting opt-outs",
            "enum": [
              "exclude",
              "flag"
            ],
            "type": "string",
            "description": "Companies that opposed the reuse of their data for commercial prospecting (opposition_diffusion_commerciale, GDPR art. 21(2)). 'Exclude' drops them before output and never charges them; 'flag' keeps them with prospecting_opt_out = true for non-prospecting uses such as KYC or market sizing.",
            "default": "exclude"
          },
          "includeBirthYearMonth": {
            "title": "Include officers' birth year and month",
            "type": "boolean",
            "description": "Off by default: officers who are natural persons are output with name and role only. Turn on only if you have a lawful need for it.",
            "default": false
          },
          "outputLevel": {
            "title": "One row per",
            "enum": [
              "company",
              "establishment"
            ],
            "type": "string",
            "description": "Company: one row per SIREN with head-office address. Establishment: one row per matching establishment (SIRET) located in your departements or postcodes, with the company columns repeated.",
            "default": "company"
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows. 0 = no limit. Your run's 'Maximum cost per run' also caps the export. At the default pace a run covers about 45,000 API matches per hour; the default run timeout is 6 hours, and the Actor stops by itself 3 minutes before the timeout with a partial result and a saved report. Raise the timeout in Run options for bigger segments.",
            "default": 0
          },
          "requestsPerSecond": {
            "title": "Requests per second",
            "enum": [
              "0.5",
              "1",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Pace of calls to the government API (25 companies per call). The API documents 7 calls/s per IP and 30/s for all of Apify's cloud together, but in our tests it answered 'too many requests' at a steady 1/s after a few calls, and this Actor stops (keeping your data) rather than push past a refusal. Keep 0.5 unless you have a reason; faster settings risk an early partial stop.",
            "default": "0.5"
          },
          "diffMode": {
            "title": "Only new or changed companies (diff mode)",
            "type": "boolean",
            "description": "Remembers each company's key fields for these exact filters (in the named key-value store 'fr-registry-state') and outputs only new, changed and closed companies on later runs, with change_type and changed_fields. The first run outputs everything as new. Unchanged companies are never charged. Company rows only. Each run walks the whole segment again, so the segment must fit within the run timeout (about 45,000 API matches per hour at the default pace): a run stopped by the timeout cannot detect closed companies.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}