{
  "openapi": "3.0.1",
  "info": {
    "title": "GLEIF LEI Lookup API: Bulk Verify, Parents & Match",
    "description": "Verify LEIs in bulk, find direct and ultimate parents, match company names to LEIs with a score, and track new or changed LEIs, all from the official GLEIF API and golden-copy files. Check digits validated first; not-found rows free. CC0 data. $1.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "jppuP0ur8hy2db7XM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlwren~gleif-lei-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlwren-gleif-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/crawlwren~gleif-lei-lookup/runs": {
      "post": {
        "operationId": "runs-sync-crawlwren-gleif-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/crawlwren~gleif-lei-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-crawlwren-gleif-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": [
              "lookup",
              "search",
              "match",
              "changes"
            ],
            "type": "string",
            "description": "Look up LEIs, search the register, match company names to LEIs, or get new/changed LEIs from GLEIF's daily files.",
            "default": "lookup"
          },
          "leis": {
            "title": "LEI codes (lookup mode)",
            "type": "array",
            "description": "20-character LEI codes. Malformed codes and bad check digits are flagged without an API call. Every input gets a row; not-found rows are free.",
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Company names (match mode)",
            "type": "array",
            "description": "One company name per line. Each name returns its best LEI candidate(s) with a 0-1 match score.",
            "items": {
              "type": "string"
            }
          },
          "matchesPerName": {
            "title": "Candidates per name (match mode)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many LEI candidates to return per name.",
            "default": 1
          },
          "minMatchScore": {
            "title": "Minimum match score (match mode)",
            "type": "string",
            "description": "0 to 1. Candidates below this are not returned (and not charged); you get a free 'not found' row with the best candidate instead.",
            "default": "0.6"
          },
          "query": {
            "title": "Name / keyword (search and changes modes)",
            "type": "string",
            "description": "Search mode: GLEIF full-text search (names, addresses, identifiers) or legal-name search. Changes mode: legal name contains this text."
          },
          "queryField": {
            "title": "Search in",
            "enum": [
              "fulltext",
              "legalName"
            ],
            "type": "string",
            "description": "Full text (names, addresses, registration numbers) or the legal name only.",
            "default": "fulltext"
          },
          "countries": {
            "title": "Legal-address countries",
            "type": "array",
            "description": "ISO 3166 alpha-2 codes, e.g. DE, FR, US. Empty = all. In match mode this narrows candidates.",
            "items": {
              "type": "string"
            }
          },
          "headquartersCountries": {
            "title": "Headquarters countries",
            "type": "array",
            "description": "ISO alpha-2 codes for the headquarters address. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "entityStatus": {
            "title": "Entity status",
            "enum": [
              "any",
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "ACTIVE = the legal entity exists; INACTIVE = dissolved, merged, etc.",
            "default": "any"
          },
          "registrationStatuses": {
            "title": "LEI registration statuses",
            "type": "array",
            "description": "ISSUED = up to date; LAPSED = not renewed. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "ISSUED",
                "LAPSED",
                "PENDING_TRANSFER",
                "PENDING_ARCHIVAL",
                "RETIRED",
                "MERGED",
                "DUPLICATE",
                "ANNULLED",
                "CANCELLED",
                "TRANSFERRED"
              ]
            }
          },
          "entityCategories": {
            "title": "Entity categories",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL",
                "FUND",
                "BRANCH",
                "RESIDENT_GOVERNMENT_ENTITY",
                "INTERNATIONAL_ORGANIZATION",
                "SOLE_PROPRIETOR"
              ]
            }
          },
          "legalFormCodes": {
            "title": "Legal form codes (ELF)",
            "type": "array",
            "description": "ISO 20275 entity legal form codes, e.g. 2HBR (German GmbH). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "includeParents": {
            "title": "Add direct and ultimate parent",
            "type": "boolean",
            "description": "Adds the parent company LEI and name where GLEIF has reported one (lookup/search/match). Costs 1-2 extra API calls per record, so runs are slower; no extra charge.",
            "default": false
          },
          "changesPeriod": {
            "title": "Changes period (changes mode)",
            "enum": [
              "IntraDay",
              "LastDay",
              "LastWeek",
              "LastMonth",
              "Full"
            ],
            "type": "string",
            "description": "Which GLEIF golden-copy file to scan. Deltas are small and fast; Full is the whole register (~500 MB zip, give the run 2 GB memory).",
            "default": "LastDay"
          },
          "registeredSince": {
            "title": "Only LEIs first registered on/after (changes mode)",
            "type": "string",
            "description": "YYYY-MM-DD. Turns the change feed into a 'newly registered entities' feed."
          },
          "excludeSoleProprietors": {
            "title": "Exclude sole proprietors",
            "type": "boolean",
            "description": "Sole-proprietor LEIs are usually named after a private person. They are withheld by default.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many charged records (0 = no limit). Not-found rows don't count and are free.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}