{
  "openapi": "3.0.1",
  "info": {
    "title": "EU VAT number validator + French company lookup (VIES, SIREN)",
    "description": "Validates EU VAT numbers against the official VIES registry and enriches French SIREN/SIRET identifiers via the official INSEE-backed recherche-entreprises API. Pay-per-event: one company-record charge per successfully verified identifier.",
    "version": "0.1",
    "x-build-id": "JSlg6qzFh1O2c1mjZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/garonne~eu-vat-siren-check/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-garonne-eu-vat-siren-check",
        "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/garonne~eu-vat-siren-check/runs": {
      "post": {
        "operationId": "runs-sync-garonne-eu-vat-siren-check",
        "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/garonne~eu-vat-siren-check/run-sync": {
      "post": {
        "operationId": "run-sync-garonne-eu-vat-siren-check",
        "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",
        "required": [
          "identifiers"
        ],
        "properties": {
          "identifiers": {
            "title": "Identifiers to check",
            "minItems": 1,
            "type": "array",
            "description": "List of company identifiers to verify, one per array item. Two formats are accepted, auto-detected per item: (1) an EU VAT number with its 2-letter country prefix, e.g. \"FR12345678901\", \"DE123456789\" (spaces, dots and dashes are stripped automatically) — validated live against the official VIES registry; (2) a French company number with no prefix: a 9-digit SIREN (e.g. \"552049447\") or a 14-digit SIRET (e.g. \"55204944700010\") — looked up on the French national business register. Any item that matches neither shape is returned as an error record (no charge). Do not mix multiple identifiers in one string; one identifier per array item.",
            "items": {
              "type": "string"
            }
          },
          "includeFrenchEnrichment": {
            "title": "Include French company enrichment",
            "type": "boolean",
            "description": "Controls the SECOND, cross-referencing lookup that is only possible for French identifiers; the FIRST lookup native to whatever format you supplied always runs regardless of this setting. If true (default): a French VAT number (FRxxxxxxxxxxx) also gets its legal name, registered address, NAF/APE code and active/closed status pulled from recherche-entreprises.api.gouv.fr (using the SIREN embedded in the VAT number); a bare SIREN/SIRET also gets its French VAT number derived and validated live against VIES, populating vatValid. If false: a French VAT number is checked for VIES validity only (legalName/address/naf/siren stay null); a bare SIREN/SIRET is checked against recherche-entreprises only (vatValid stays null, no VIES call is made). Non-French VAT numbers are never affected by this setting — they are always VIES-checked only, since no French company registry applies to them. NOT related to the DGFiP fallback (see README 'Limits & data sources'): if VIES is unreachable for a French VAT number, this Actor always attempts the recherche-entreprises fallback regardless of this setting, since that is a resilience mechanism, not optional enrichment — disabling this flag never disables it.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many identifiers to verify in parallel (never more than the number of identifiers you supplied, regardless of this value). Keep this conservative: the French recherche-entreprises API enforces a hard limit of 7 requests/second per IP address (HTTP 429 beyond that), and the EU VIES registry throttles bursts per member state (MS_MAX_CONCURRENT_REQ) and globally (GLOBAL_MAX_CONCURRENT_REQ) — both are retried automatically with patient backoff and jitter. On Apify, outbound IPs are shared across many concurrent customer runs, so VIES's per-member-state quota can be consumed by unrelated traffic; this Actor additionally serializes its own VIES calls per country code regardless of this setting (two checks for the same country never run at once, but different countries do run in parallel), so raising this mostly helps when checking many DIFFERENT countries or many French SIREN/SIRET at once. Default of 2 is deliberately conservative after a real contention failure was observed on the Apify platform.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}