{
  "openapi": "3.0.1",
  "info": {
    "title": "EU VAT Number Validator (VIES) & LEI Lookup: Bulk Company Check",
    "description": "Validate EU VAT numbers in bulk with the official VIES service and look up LEIs in the official GLEIF database: valid or not, registered company name and address, LEI status, renewal date and parent companies. Unavailable answers are retried and never charged.",
    "version": "0.1",
    "x-build-id": "EKDSae0r0nsD2nWeI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latamdatatools~eu-vat-lei-validator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latamdatatools-eu-vat-lei-validator",
        "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/latamdatatools~eu-vat-lei-validator/runs": {
      "post": {
        "operationId": "runs-sync-latamdatatools-eu-vat-lei-validator",
        "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/latamdatatools~eu-vat-lei-validator/run-sync": {
      "post": {
        "operationId": "run-sync-latamdatatools-eu-vat-lei-validator",
        "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": {
          "identifiers": {
            "title": "VAT numbers and/or LEIs",
            "type": "array",
            "description": "One per line. EU VAT numbers with their country prefix (DE811569869, FR 40 303 265 045, ATU12345678, EL/GR, XI for Northern Ireland) and 20-character LEIs (506700GE1G29325QX363) can be mixed: each value is detected automatically. Spaces, dots and dashes are ignored.",
            "items": {
              "type": "string"
            }
          },
          "defaultCountry": {
            "title": "Default country for numbers without a prefix",
            "type": "string",
            "description": "Optional two-letter VIES code (DE, FR, ES, IT, NL, EL...) used when a VAT number has no country prefix."
          },
          "datasetId": {
            "title": "Dataset (from another Actor run)",
            "type": "string",
            "description": "Optional: check the VAT numbers / LEIs stored in an Apify dataset. Use \"Field\" to say which field holds them."
          },
          "csvUrl": {
            "title": "CSV file URL",
            "type": "string",
            "description": "Optional: a public URL of a CSV file with a header row (comma, semicolon, tab or | separated, up to 50 MB). Google Sheets links work if shared as \"Anyone with the link\"."
          },
          "identifierField": {
            "title": "Field",
            "type": "string",
            "description": "Field / CSV column that holds the VAT number or LEI, e.g. vat, vatNumber, lei, company.vat (dot notation for nested fields).",
            "default": "vat"
          },
          "keepFields": {
            "title": "Fields to keep from the source",
            "type": "array",
            "description": "Optional: copy these fields of each dataset record / CSV row into the output (under \"source\"), e.g. customerId, name.",
            "items": {
              "type": "string"
            }
          },
          "includeParents": {
            "title": "LEI: include direct and ultimate parent",
            "type": "boolean",
            "description": "For each LEI, read the direct and ultimate parent company reported to GLEIF (2 extra calls per LEI; GLEIF allows 60 calls per minute, so about 25 LEIs per minute with parents).",
            "default": true
          },
          "findLeiForVat": {
            "title": "VAT: find the company's LEI",
            "type": "boolean",
            "description": "For valid VAT numbers whose name VIES returns, look for an active LEI with exactly the same legal name in the same country (\"matchedLei\"). Left empty when there is no exact, single match.",
            "default": false
          },
          "requesterVatNumber": {
            "title": "Your own EU VAT number (for a consultation number)",
            "type": "string",
            "description": "Optional: your company's VAT number. VIES then returns a consultation number (\"consultationNumber\") for each valid check, which you can keep as proof that you verified your customer's VAT number on that date."
          },
          "maxConcurrency": {
            "title": "Parallel VIES checks",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Numbers of different countries are checked in parallel; numbers of the same country always go one at a time, at least 1 second apart, as VIES expects.",
            "default": 3
          },
          "maxRetries": {
            "title": "Retries when a country service is unavailable",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "VIES depends on each country's own system, which is sometimes down or busy (MS_UNAVAILABLE, MS_MAX_CONCURRENT_REQ). The Actor waits 5, 15, 30, 60 s between retries.",
            "default": 3
          },
          "retryUnavailableAtEnd": {
            "title": "Retry unavailable numbers once more at the end",
            "type": "boolean",
            "description": "Numbers that are still unavailable are retried one last time after the rest of the list (30 s later). Still unavailable = \"service_unavailable\", not charged.",
            "default": true
          },
          "maxItems": {
            "title": "Max checks",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper limit of VAT numbers + LEIs checked in one run. 0 = no limit (up to 50,000). Your max charge per run is respected too.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}