{
  "openapi": "3.0.1",
  "info": {
    "title": "GLEIF LEI Scraper — LEI Lookup, Lapsed Status & Parents",
    "description": "LEI lookup and bulk export from the official GLEIF Global LEI Index: search any LEI code or legal entity identifier for legal name, status, jurisdiction, addresses, national register ID, BIC/MIC codes, renewal dates and direct and ultimate parent companies. Screen for lapsed LEIs.",
    "version": "0.1",
    "x-build-id": "OtToaxTr87ga1a1qf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/publicdata~gleif-lei-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-publicdata-gleif-lei-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/publicdata~gleif-lei-scraper/runs": {
      "post": {
        "operationId": "runs-sync-publicdata-gleif-lei-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/publicdata~gleif-lei-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-publicdata-gleif-lei-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": {
          "query": {
            "title": "Search by name",
            "type": "string",
            "description": "Entity name to search for (fuzzy). Leave empty to browse using the filters below."
          },
          "leiList": {
            "title": "Look up specific LEIs",
            "type": "array",
            "description": "Exact 20-character LEI codes to fetch. Replaces the name search; the filters below still apply and are enforced by GLEIF, so codes that do not match them are not exported and not billed.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{20}$"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "ISO-3166-1 alpha-2 country codes of the legal address, e.g. CH, DE, FR, US. Not country names, not ISO-3 codes — GLEIF returns 0 matches for those instead of an error, so the run fails fast if a code is unknown. Empty = worldwide.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "entityStatus": {
            "title": "Entity status",
            "enum": [
              "all",
              "ACTIVE",
              "INACTIVE",
              "NULL"
            ],
            "type": "string",
            "description": "Filter by whether the legal entity is still active. 'All' really means all 3.41 M records, including the 249 K inactive and 9 K with no status recorded.",
            "default": "all"
          },
          "registrationStatus": {
            "title": "LEI registration status",
            "enum": [
              "all",
              "ISSUED",
              "LAPSED",
              "RETIRED",
              "ANNULLED",
              "DUPLICATE",
              "PENDING_TRANSFER",
              "PENDING_ARCHIVAL"
            ],
            "type": "string",
            "description": "ISSUED means the LEI is current; LAPSED means it was not renewed (a due-diligence red flag). MERGED is not offered: GLEIF accepts the value but no record in the index carries it.",
            "default": "all"
          },
          "category": {
            "title": "Entity category",
            "enum": [
              "all",
              "GENERAL",
              "FUND",
              "BRANCH",
              "SOLE_PROPRIETOR",
              "RESIDENT_GOVERNMENT_ENTITY",
              "INTERNATIONAL_ORGANIZATION"
            ],
            "type": "string",
            "description": "Restrict to a category of entity.",
            "default": "all"
          },
          "updatedFrom": {
            "title": "Updated from (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records whose LEI registration was last updated on or after this date, in YYYY-MM-DD form. Leave 'Updated to' empty for no upper bound. This is the field to use on a schedule: it returns the slice that actually changed instead of the first page of a set too large to page through."
          },
          "updatedTo": {
            "title": "Updated to (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records last updated on or before this date, in YYYY-MM-DD form. Leave empty for no upper bound."
          },
          "renewalFrom": {
            "title": "Next renewal from (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records whose next LEI renewal falls on or after this date, in YYYY-MM-DD form. Leave 'Next renewal to' empty for no upper bound — this is the 'everything still to come' query."
          },
          "renewalTo": {
            "title": "Next renewal to (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only records whose next LEI renewal falls on or before this date, in YYYY-MM-DD form. Combine with registrationStatus=ISSUED to catch LEIs about to expire."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "",
              "-registration.lastUpdateDate",
              "registration.lastUpdateDate",
              "-registration.nextRenewalDate",
              "registration.nextRenewalDate",
              "-registration.initialRegistrationDate",
              "entity.legalName",
              "lei"
            ],
            "type": "string",
            "description": "GLEIF's own ordering. Leave on default unless the cap matters: when more records match than the Actor can page through, the sort decides which ones you get.",
            "default": ""
          },
          "includeParents": {
            "title": "Include ownership tree",
            "type": "boolean",
            "description": "Fetch direct and ultimate parent companies. Adds up to two requests per entity. When on, every row carries all four parent columns, null where the entity reported no parent. If GLEIF fails a parent lookup, that row is dropped rather than exported with a misleading empty ownership tree — it is not charged, and the run status says how many were dropped.",
            "default": true
          },
          "includeIsins": {
            "title": "Include ISINs",
            "type": "boolean",
            "description": "Fetch securities (ISINs) issued by each entity. Adds one request per entity, and returns at most the first 200 ISINs per entity — enough for almost every issuer, but large banks have far more (UBS AG has 300,615, Deutsche Bank AG 21,824, measured 2026-08-21). Every row carries isinsTotal (the true count) and isinsTruncated, so a cut list is always visible instead of silent.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap (0 = as many as GLEIF will serve). GLEIF refuses page-based pagination past 10,000 results per query, so 0 means 'up to 10,000' — use the date windows above to cover a larger set in slices.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}