{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Lookup: GLEIF Company Search by Name, LEI, ISIN, BIC",
    "description": "Find the LEI for a company name, or look up LEIs, ISINs and BICs in bulk from the official GLEIF index: legal name, status, address, legal form and direct and ultimate parent. Not-found rows are free. From $1.10 per 1k.",
    "version": "0.1",
    "x-build-id": "naRX7jxy00gmn8AHq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/swillz~lei-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-swillz-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/swillz~lei-lookup/runs": {
      "post": {
        "operationId": "runs-sync-swillz-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/swillz~lei-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-swillz-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": {
          "queries": {
            "title": "LEIs, company names, ISINs or BICs",
            "type": "array",
            "description": "Required unless datasetId is set. One per line; the type is auto-detected. Examples: \"HWUPKR0MPOU8FGXBT394\" (LEI), \"Siemens AG | DE\" (name with optional country), \"US0378331005\" (ISIN), \"DEUTDEFFXXX\" (BIC). Force a type with a prefix: \"name: ...\", \"lei: ...\", \"isin: ...\", \"bic: ...\".",
            "items": {
              "type": "string"
            }
          },
          "includeParents": {
            "title": "Include parent companies",
            "type": "boolean",
            "description": "Add the direct and ultimate accounting parent (LEI, name, country) when reported to GLEIF. Costs 1-2 extra API calls per record, so large runs take longer. Default true.",
            "default": true
          },
          "maxMatchesPerName": {
            "title": "Matches per name",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "For company-name searches, return up to this many best matches (1-10, default 1). Each returned record is charged.",
            "default": 1
          },
          "minNameScore": {
            "title": "Minimum name score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only return name matches scoring at least this (0-100, default 80). Lower it for loose matching; misses are free not_found rows.",
            "default": 80
          },
          "onlyActive": {
            "title": "Only active entities",
            "type": "boolean",
            "description": "Skip entities whose status is not ACTIVE (e.g. merged or dissolved). Default false.",
            "default": false
          },
          "defaultCountry": {
            "title": "Default country for names",
            "type": "string",
            "description": "Optional ISO 2-letter code (e.g. \"DE\") applied to name searches without a \"| XX\" hint.",
            "default": ""
          },
          "maxQueries": {
            "title": "Max queries",
            "minimum": 1,
            "type": "integer",
            "description": "Run at most this many unique queries (default 2000). Aliases: maxItems, limit, maxResults.",
            "default": 2000
          },
          "datasetId": {
            "title": "Or: dataset ID from another Actor",
            "type": "string",
            "description": "Optional. Read LEIs or company names from another run's dataset. In an integration the triggering run's dataset is used automatically."
          },
          "queryField": {
            "title": "Query field in that dataset",
            "type": "string",
            "description": "Field holding the LEI or company name (dot paths work). Leave empty to auto-detect: lei, LEI, isin, bic, companyName, name, company, legalName."
          },
          "countryField": {
            "title": "Country field in that dataset",
            "type": "string",
            "description": "Optional field with a 2-letter country code used as the name-search hint."
          },
          "datasetMaxItems": {
            "title": "Max values from the dataset",
            "minimum": 1,
            "type": "integer",
            "description": "Read at most this many values from the dataset (default 1000).",
            "default": 1000
          },
          "includeLegalFormName": {
            "title": "Resolve legal form names",
            "type": "boolean",
            "description": "Turn ELF codes like \"H1UM\" into names like \"For-Profit Corporation General Stock\" (cached; one call per distinct code). Default true.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}