{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Corporate Tree: GLEIF Parents & Subsidiaries",
    "description": "Look up legal entity identifiers (LEIs) by code or company name and get each entity's legal data, direct and ultimate parent (or the reason none is reported), subsidiaries up to 3 levels, BIC and ISIN codes, and a one-line KYC summary. Official GLEIF data, CC0.",
    "version": "1.0",
    "x-build-id": "hiclIWaZ64djA6U4H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/offerastudio~gleif-lei-corporate-tree/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-offerastudio-gleif-lei-corporate-tree",
        "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/offerastudio~gleif-lei-corporate-tree/runs": {
      "post": {
        "operationId": "runs-sync-offerastudio-gleif-lei-corporate-tree",
        "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/offerastudio~gleif-lei-corporate-tree/run-sync": {
      "post": {
        "operationId": "run-sync-offerastudio-gleif-lei-corporate-tree",
        "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": {
          "leis": {
            "title": "LEIs",
            "type": "array",
            "description": "Legal Entity Identifiers, 20 characters each, one per line (up to 5,000). Invalid or unknown LEIs get a free error row.",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Search by name instead of LEI, one name per line (up to 500), e.g. \"Siemens AG\" or \"Unilever PLC\". Legal forms such as AG and Aktiengesellschaft count as the same. Each match is scored 0–100; see the match settings below.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (for name search)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional 2-letter country code (ISO 3166-1, e.g. DE, GB, US). Name search then only returns entities whose legal address is in that country."
          },
          "maxMatchesPerName": {
            "title": "Matches per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of the best matches to return for each name. Each match is a row (and is charged), so keep this small.",
            "default": 3
          },
          "minMatchScore": {
            "title": "Minimum match score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Matches below this score are left out. 100 = same name (legal form aside), 95 = same name with another legal form, 80–94 = close (typos, word order, extra words).",
            "default": 80
          },
          "includeParents": {
            "title": "Include parents (direct and ultimate)",
            "type": "boolean",
            "description": "Adds each entity's direct and ultimate accounting-consolidation parent (LEI, name, country), or the reporting exception the entity gave instead (for example \"controlled by natural persons\"). Free: shown inside the row.",
            "default": true
          },
          "parentsAsRows": {
            "title": "Also return parents as their own rows",
            "type": "boolean",
            "description": "Returns the full record of each direct and ultimate parent as a separate row (charged like any entity). Off: parents are only summarised inside the row (free).",
            "default": false
          },
          "includeChildren": {
            "title": "Include subsidiaries",
            "type": "boolean",
            "description": "Lists subsidiaries (entities that report this entity as their direct parent), breadth first, up to the depth and limit below. Turn off to look up only the entities you entered.",
            "default": true
          },
          "childrenDepth": {
            "title": "Subsidiary levels",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "1 = direct subsidiaries, 2 = also their subsidiaries, 3 = one level more.",
            "default": 1
          },
          "maxChildren": {
            "title": "Maximum subsidiaries per entity",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit for each entity from your input, across all levels. Large groups have hundreds of subsidiaries with an LEI.",
            "default": 10
          },
          "childrenAsRows": {
            "title": "Return subsidiaries as their own rows",
            "type": "boolean",
            "description": "On: every subsidiary gets a full row (charged as an entity) and is also listed in its parent's \"children\". Off: subsidiaries are only listed inside the input entity's row (LEI, name, country, level), which is free.",
            "default": true
          },
          "includeIsins": {
            "title": "Include ISINs",
            "type": "boolean",
            "description": "Adds the securities (ISINs) mapped to each entity in GLEIF's ISIN-to-LEI data, up to 100 per entity, plus the total. BIC codes are always included when GLEIF has them.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}