{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Records Scraper: Legal Entity Identifier Lookup API",
    "description": "Legal Entity Identifier (LEI) records from the Global LEI Index, read through the public GLEIF API: legal name, legal form, register number, addresses, status, renewal date and parent companies. Filter by country, name, category and dates. No sole traders, no personal data.",
    "version": "1.0",
    "x-build-id": "zdvVXvsop8hs4MS7H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowcraft~lei-records-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowcraft-lei-records-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/rowcraft~lei-records-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rowcraft-lei-records-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/rowcraft~lei-records-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rowcraft-lei-records-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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries of the legal address (or of the headquarters, see below), one per line: English name or ISO two-letter code (Germany or DE). Empty = the whole world.",
            "items": {
              "type": "string"
            }
          },
          "registeredAfter": {
            "title": "LEI first registered after",
            "type": "string",
            "description": "Only entities whose LEI was first issued on or after this day: a date (2026-10-01), today, yesterday, or a relative value such as 7 days, 3 months. New LEIs are usually new companies, funds and special-purpose vehicles."
          },
          "registeredBefore": {
            "title": "LEI first registered before",
            "type": "string",
            "description": "Only entities whose LEI was first issued on or before this day."
          },
          "search": {
            "title": "Search text",
            "type": "string",
            "description": "Words searched in every field of the record (names, addresses, register numbers): bank, Siemens, Wien."
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities of the legal address (or headquarters), one per line, as written in the record: Berlin, MÜNCHEN, Warszawa.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Entity category",
            "type": "array",
            "description": "Empty = every category except sole proprietors, which are never delivered.",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL",
                "BRANCH",
                "FUND",
                "RESIDENT_GOVERNMENT_ENTITY",
                "INTERNATIONAL_ORGANIZATION"
              ],
              "enumTitles": [
                "General (companies and other legal entities)",
                "Branch",
                "Fund",
                "Government entity",
                "International organisation"
              ]
            }
          },
          "entityStatus": {
            "title": "Entity status",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "ANY"
            ],
            "type": "string",
            "description": "Active entities, inactive ones (dissolved, merged), or both.",
            "default": "ACTIVE"
          },
          "registrationStatuses": {
            "title": "LEI registration status",
            "type": "array",
            "description": "ISSUED (renewed on time), LAPSED (not renewed), RETIRED, MERGED, ANNULLED... Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "ISSUED",
                "LAPSED",
                "PENDING_TRANSFER",
                "PENDING_ARCHIVAL",
                "RETIRED",
                "MERGED",
                "ANNULLED",
                "DUPLICATE",
                "TRANSFERRED",
                "PENDING_VALIDATION"
              ],
              "enumTitles": [
                "Issued",
                "Lapsed",
                "Pending transfer",
                "Pending archival",
                "Retired",
                "Merged",
                "Annulled",
                "Duplicate",
                "Transferred",
                "Pending validation"
              ]
            }
          },
          "renewalAfter": {
            "title": "Renewal due after",
            "type": "string",
            "description": "Only LEIs whose next renewal date is on or after this day: a date, today, \"7 days\" (ago) or \"in 30 days\"."
          },
          "renewalBefore": {
            "title": "Renewal due before",
            "type": "string",
            "description": "Only LEIs whose next renewal date is on or before this day, for example \"in 30 days\" with Renewal due after = today: the LEIs due for renewal in the next month."
          },
          "updatedAfter": {
            "title": "Record updated after",
            "type": "string",
            "description": "Only records changed on or after this day (a date or \"7 days\"): name, address, status or renewal changes."
          },
          "createdAfter": {
            "title": "Entity founded after",
            "type": "string",
            "description": "Only entities whose legal creation date is on or after this day (not every record has one)."
          },
          "legalForms": {
            "title": "Legal form codes (ELF)",
            "type": "array",
            "description": "ISO 20275 entity legal form codes, one per line: 2HBR (German GmbH), 6QQB (German AG), XHN1 (Romanian SRL). Every row shows its code and name.",
            "items": {
              "type": "string"
            }
          },
          "registerNumbers": {
            "title": "Business register numbers",
            "type": "array",
            "description": "Company numbers as registered with the local business register, one per line, written exactly as in the record's registerNumber field (for example HRB 3508). Register numbers repeat across registers, so add a country.",
            "items": {
              "type": "string"
            }
          },
          "countryOf": {
            "title": "Countries and cities refer to",
            "enum": [
              "legal",
              "headquarters"
            ],
            "type": "string",
            "description": "The legal (registered) address or the headquarters address.",
            "default": "legal"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "updated",
              "renewal",
              "name",
              "none"
            ],
            "type": "string",
            "description": "Order of the results when you take fewer than all matching records.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many LEI records. 0 = all matching records.",
            "default": 500
          },
          "includeLabels": {
            "title": "Add legal form and register names",
            "type": "boolean",
            "description": "Adds legalFormName (GmbH, Societate cu răspundere limitată...) and registrationAuthorityName (the business register). One small lookup per new code, cached for the run.",
            "default": true
          },
          "includeParents": {
            "title": "Add parent companies (slower)",
            "type": "boolean",
            "description": "Adds the direct and the ultimate parent (LEI and name), or the reason the entity gave for not reporting one. Two to four extra requests per record, so about 3 seconds per record.",
            "default": false
          },
          "leis": {
            "title": "Look up specific LEIs",
            "type": "array",
            "description": "LEI codes (529900T8BM49AURSDO55) or GLEIF search links, one per line. When set, every filter above is ignored.",
            "items": {
              "type": "string"
            }
          },
          "countOnly": {
            "title": "Count only (free check)",
            "type": "boolean",
            "description": "Only count how many rows match your filters and estimate the cost at your price tier. Nothing is delivered and nothing is charged apart from the start event. Turn it off to get the data.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new rows since the last run",
            "type": "boolean",
            "description": "Remember the rows already delivered to you (in a key-value store in your Apify account) and deliver only rows that appeared since the last run with the same state key. The first run delivers everything that matches; later runs cost only the new rows. Ideal for schedules.",
            "default": false
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "Name of the memory used by \"Only new rows\". Use a different name for each schedule or search (for example `stockholm-python`) so they do not share one memory.",
            "default": "default"
          },
          "notifyUrl": {
            "title": "Notify this URL when the run ends",
            "type": "string",
            "description": "A webhook address that receives one JSON POST with the number of new rows and links to the dataset: a Slack or Discord incoming webhook, a Make, n8n or Zapier catch hook, or your own endpoint. The message is also in the `text` (Slack) and `content` (Discord) fields."
          },
          "notifyWhenEmpty": {
            "title": "Notify also when there are no new rows",
            "type": "boolean",
            "description": "By default the notification is sent only when at least one row was delivered.",
            "default": false
          },
          "requestIntervalMs": {
            "title": "Delay between API requests (ms)",
            "minimum": 1000,
            "maximum": 10000,
            "type": "integer",
            "description": "Default 1000 ms (one request per second); GLEIF allows 60 requests per minute. Each search request returns up to 200 records.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}