{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Lookup: GLEIF Legal Entity Identifier Search & Watch",
    "description": "Look up GLEIF Legal Entity Identifier records (CC0) by LEI (up to 1,000 a run), name, or status and country, and list an LEI's subsidiaries. Watch mode reports lapses, overdue renewals, renames and parent changes. Recognised sole proprietors' details are withheld. Not affiliated with GLEIF.",
    "version": "0.1",
    "x-build-id": "Kxxzw4ifucOic01xW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yappman~lei-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yappman-lei-lookup",
        "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/yappman~lei-lookup/runs": {
      "post": {
        "operationId": "runs-sync-yappman-lei-lookup",
        "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/yappman~lei-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-yappman-lei-lookup",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "lei",
              "name",
              "status",
              "watch",
              "children"
            ],
            "type": "string",
            "description": "Which job to run. Allowed values: lei (look up leis), name (search by legal name), status (list one registration status in one country), watch (changes in leis since the last run with this watchId), children (the subsidiaries GLEIF lists under each of leis, one row per child). Default lei. Lookup and children rows cost $0.002 (entity), or $0.004 (entity_enriched) when enriched; watch change rows cost $0.02 (change); the first watch run is free. Free-plan prices; higher Apify plans pay less.",
            "default": "lei"
          },
          "leis": {
            "title": "LEIs (lei, watch and children modes)",
            "maxItems": 1000,
            "type": "array",
            "description": "LEIs to look up (lei mode), to watch (watch mode), or whose children to list (children mode: 1 to 20 root LEIs); ignored in name and status modes. 1 to 1,000 codes of 20 characters (ISO 17442), for example [\"2138002P5RNKC5W2JZ46\"]; no default. A malformed LEI is refused on its own and an unknown one is listed as not found; neither is charged. In watch mode give the same list each run: an LEI left out is forgotten, and one added starts with no event.",
            "items": {
              "type": "string"
            }
          },
          "watchId": {
            "title": "Watch name (watch mode)",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$",
            "type": "string",
            "description": "Watch mode only; required there. A name for the saved state (your store lei-watch-<watchId>): 1 to 40 characters of a-z, 0-9 and \"-\" (not first or last). The first run records the starting state and charges nothing. Later runs return one row per change (lapsed, renewalOverdue, renamed, and parentChanged with includeParents) at $0.02 on the Free plan, and stop before each batch of up to 200 LEIs once the run's maximum charge cannot pay one more change."
          },
          "name": {
            "title": "Name (name mode)",
            "type": "string",
            "description": "Name mode only, required there; no default. An entity's legal name or words from it, 2 to 255 characters, for example \"Tesco\". If nothing matches, similar names are tried and those rows have matchType similar. Each entity returned costs $0.002 (entity), or $0.004 (entity_enriched) when enriched, up to maxItems. Free-plan prices; higher Apify plans pay less."
          },
          "status": {
            "title": "Registration status",
            "enum": [
              "ISSUED",
              "LAPSED",
              "ANNULLED",
              "PENDING_TRANSFER",
              "PENDING_ARCHIVAL",
              "DUPLICATE",
              "MERGED",
              "RETIRED",
              "ANY"
            ],
            "type": "string",
            "description": "Registration status. Allowed values: ISSUED, LAPSED, ANNULLED, PENDING_TRANSFER, PENDING_ARCHIVAL, DUPLICATE, MERGED, RETIRED, or ANY (no filter, name mode only). Name mode: optional, default ISSUED. Status mode: required, no default. Ignored in lei and watch modes. No cost of its own; it narrows which entities are returned."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter ISO 3166 code of the entity's legal address, for example GB. Name mode: optional, no default (any country). Status mode: required. Ignored in lei and watch modes. No cost of its own; it narrows which entities are returned."
          },
          "category": {
            "title": "Category (status mode)",
            "enum": [
              "GENERAL",
              "BRANCH",
              "FUND",
              "RESIDENT_GOVERNMENT_ENTITY",
              "INTERNATIONAL_ORGANIZATION"
            ],
            "type": "string",
            "description": "Status mode only, optional; no default (every category). Allowed values: GENERAL, BRANCH, FUND, RESIDENT_GOVERNMENT_ENTITY, INTERNATIONAL_ORGANIZATION. Recognised sole proprietors are left out. Ignored in the other modes. No cost of its own; it narrows which entities are returned."
          },
          "includeParents": {
            "title": "Include parents",
            "type": "boolean",
            "description": "Lookup and watch modes; refused in children mode. Default false. true adds the direct and ultimate parent (LEI and name) and parentStatus, with direct and ultimate values: REPORTED, NOT_REPORTED, PARENT_WITHHELD (recognised as a person; not output) or GLEIF's reason code for reporting none. Cost: $0.004 (entity_enriched) instead of $0.002 (entity), only when an add-on needed an extra request and every add-on was answered. In watch mode it also reports parentChanged when a watched LEI's direct or ultimate parent or parentStatus changes, charged $0.02 (change) like every change row and never entity_enriched; the first run with it records the parents with no row.",
            "default": false
          },
          "includeIsinCount": {
            "title": "Include ISIN count",
            "type": "boolean",
            "description": "Lookup modes only; ignored in watch mode and refused in children mode. Default false. true adds isinCount: how many ISINs GLEIF links to the LEI (the codes are not output). A record with no ISIN link gets 0 without an extra request. Cost: $0.004 (entity_enriched) instead of $0.002 (entity), only when an add-on needed an extra request and every add-on was answered.",
            "default": false
          },
          "maxEnriched": {
            "title": "Max enriched entities",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Lookup modes, and watch mode with includeParents; not read in children mode. Whole number 1 to 600, default 100. Lookup modes (checked even with both add-ons off; used only when includeParents or includeIsinCount is true): how many entities in the run may be enriched, counted across a restart of the same run. Each needs up to 3 more requests, about 4.5 seconds. Entities beyond it are returned with the add-on fields set to null and charged $0.002 (entity), not $0.004 (entity_enriched). Watch mode (read only with includeParents): how many watched LEIs have their parents read this run (about 500 at most within the run's 25-minute limit), never-read and longest-unread first; the rest keep their saved parents until a later run reads them. Reading parents is not charged in watch mode; only change rows are.",
            "default": 100
          },
          "relation": {
            "title": "Relation (children mode)",
            "enum": [
              "direct",
              "ultimate",
              "both"
            ],
            "type": "string",
            "description": "Children mode only; ignored in the other modes. Allowed values: direct (entities whose direct parent, as reported to GLEIF, is the root), ultimate (entities whose ultimate parent is the root), both. Default direct. With both, a child that is both is one row (relation direct, alsoUltimate true), charged once. Each child returned costs $0.002 (entity), up to maxItems; recognised sole proprietors and arrangements named after a person are left out and not charged. Free-plan prices; higher Apify plans pay less.",
            "default": "direct"
          },
          "maxItems": {
            "title": "Max entities",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Name, status and children modes; ignored in lei and watch modes. Hard cap on entities returned. Name mode: 1 to 200, default 10. Status mode: 1 to 10,000, default 100. Children mode: 1 to 4,000 across all roots, default 100. Each entity returned is charged entity ($0.002), or entity_enriched ($0.004) when enriched. Free-plan prices; higher Apify plans pay less."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}