{
  "openapi": "3.0.1",
  "info": {
    "title": "GLEIF LEI Company Records & Corporate Ownership Scraper",
    "description": "Scrape global company KYB records from the official LEI system: legal name, LEI code, national registration number, legal form, status, legal and HQ addresses, jurisdiction, dates and the direct and ultimate corporate parent. Search by name, LEI, number or country. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "kg6vIfdozbD0dl5ch"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~gleif-lei-company-records-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-gleif-lei-company-records-scraper",
        "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/scrapers_lat~gleif-lei-company-records-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-gleif-lei-company-records-scraper",
        "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/scrapers_lat~gleif-lei-company-records-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-gleif-lei-company-records-scraper",
        "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": {
          "names": {
            "title": "Company Names To Search",
            "type": "array",
            "description": "One or more company legal names to search (for example 'Nestle', 'Roche Holding'). Each name runs as its own search. You can also search by LEI, registration number or filters below.",
            "items": {
              "type": "string"
            }
          },
          "leiCodes": {
            "title": "LEI Codes (exact)",
            "type": "array",
            "description": "Optional. Look up exact 20-character LEI codes (for example '6488MUIO4T888G558V67'). Batched for speed.",
            "items": {
              "type": "string"
            }
          },
          "registrationNumbers": {
            "title": "National Registration Numbers",
            "type": "array",
            "description": "Optional. Look up by the national business-registry number the entity is registered as (for example a Swiss CHE number 'CHE-105.909.036', a French SIREN, a UK company number).",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (ISO-2)",
            "type": "string",
            "description": "Optional. Restrict to legal addresses in this country, as a 2-letter ISO code (for example 'CH', 'LU', 'DE', 'US'). Combine with a name search or use alone to browse a country."
          },
          "jurisdiction": {
            "title": "Jurisdiction (ISO-2)",
            "type": "string",
            "description": "Optional. Restrict to entities incorporated in this legal jurisdiction, as a 2-letter ISO code (for example 'LI', 'CH', 'DE')."
          },
          "entityStatus": {
            "title": "Entity Status",
            "enum": [
              "ANY",
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "Optional. Keep only active or inactive (dissolved) entities.",
            "default": "ANY"
          },
          "registrationStatus": {
            "title": "LEI Registration Status",
            "enum": [
              "ANY",
              "ISSUED",
              "LAPSED",
              "RETIRED",
              "MERGED",
              "ANNULLED",
              "DUPLICATE"
            ],
            "type": "string",
            "description": "Optional. Filter by the LEI registration status.",
            "default": "ANY"
          },
          "category": {
            "title": "Entity Category",
            "enum": [
              "ANY",
              "GENERAL",
              "FUND",
              "BRANCH",
              "SOLE_PROPRIETOR",
              "RESIDENT_GOVERNMENT_ENTITY",
              "INTERNATIONAL_ORGANIZATION"
            ],
            "type": "string",
            "description": "Optional. Filter by entity category.",
            "default": "ANY"
          },
          "includeCorporateHierarchy": {
            "title": "Include Corporate Hierarchy (parents)",
            "type": "boolean",
            "description": "Resolve and attach the direct parent and ultimate parent company (LEI + name) for every record. Adds a little time per record. On by default.",
            "default": true
          },
          "maxCompanies": {
            "title": "Max Companies To Scrape",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of company records to collect across all searches."
          },
          "withAiCompanySummary": {
            "title": "AI company summary (paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Adds a 1-2 sentence AI KYB profile of each entity. Charged per record only when a summary is produced. Requires a paid Apify plan.",
            "default": false
          },
          "withAiIndustry": {
            "title": "AI industry classification (paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Infers the industry sector and tags for each entity (LEI records have no industry code). Charged per record only when produced. Requires a paid Apify plan.",
            "default": false
          },
          "withAiRiskFlags": {
            "title": "AI KYB risk flags (paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Flags compliance/KYB risk signals (inactive, expired, lapsed registration, successor, jurisdiction) with a low/medium/high level. Charged per record only when produced. Requires a paid Apify plan.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}