{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Lookup & Change Monitor (GLEIF)",
    "description": "Look up LEI codes or search legal entities by name in GLEIF data: legal name, jurisdiction, entity and registration status, renewal dates, addresses, direct and ultimate parent or reporting exception, and change alerts between runs.",
    "version": "0.1",
    "x-build-id": "1rVxge2lr8u2OKqfI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~lei-gleif-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-lei-gleif-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/cliqtomedia~lei-gleif-lookup/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-lei-gleif-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/cliqtomedia~lei-gleif-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-lei-gleif-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": {
          "leis": {
            "title": "LEI codes",
            "maxItems": 1000,
            "type": "array",
            "description": "Up to 1,000 Legal Entity Identifiers (20 characters, e.g. HWUPKR0MPOU8FGXBT394). Lower case, spaces and duplicates are cleaned up; you can also paste several codes separated by commas or new lines into one entry. Codes with wrong check digits get an error row without any request. Leave empty to search by name only.",
            "items": {
              "type": "string"
            }
          },
          "legalName": {
            "title": "Search by entity name",
            "minLength": 2,
            "maxLength": 200,
            "type": "string",
            "description": "Optional. Finds entities whose legal name or other (trade, previous, transliterated) name contains this text, e.g. Deutsche Bank. Can be combined with LEI codes; LEIs already in the list are not repeated."
          },
          "country": {
            "title": "Country (legal address)",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Optional two-letter ISO country code of the legal address for the name search, e.g. DE, US, GB."
          },
          "registrationStatus": {
            "title": "LEI registration status",
            "enum": [
              "ANY",
              "ISSUED",
              "LAPSED",
              "PENDING_TRANSFER",
              "PENDING_ARCHIVAL",
              "MERGED",
              "RETIRED",
              "ANNULLED",
              "DUPLICATE",
              "TRANSFERRED",
              "CANCELLED"
            ],
            "type": "string",
            "description": "Optional filter for the name search. ISSUED = current registration; LAPSED = not renewed on time (the entity may still be active).",
            "default": "ANY"
          },
          "maxResults": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum entities returned by the name search (1–200). Default 10.",
            "default": 10
          },
          "includeParents": {
            "title": "Include direct and ultimate parent",
            "type": "boolean",
            "description": "Adds the direct and ultimate accounting-consolidation parent (LEI, name, country, registration status) or, when the entity reported none, the reporting exception reason (e.g. NATURAL_PERSONS, NON_CONSOLIDATING). A reporting exception is not proof that no parent exists. Default true.",
            "default": true
          },
          "monitorKey": {
            "title": "Monitor key (for scheduled runs)",
            "maxLength": 40,
            "type": "string",
            "description": "Optional name, 1–40 letters, digits or dashes, e.g. supplier-watchlist. The Actor stores what it saw under this key in your account; the next run with the same key marks each LEI new, updated (with the changed fields and previous values), unchanged or no_longer_found. The first run marks rows initial."
          },
          "previousDatasetId": {
            "title": "Compare with previous dataset",
            "type": "string",
            "description": "Optional ID of a dataset from an earlier run of this Actor. LEIs are marked new, updated or unchanged against it. Use either this or monitorKey."
          },
          "onlyChanges": {
            "title": "Only output changes",
            "type": "boolean",
            "description": "When comparing (monitorKey or previousDatasetId), skip unchanged LEI records so you only see changes. A skipped unchanged LEI costs the cheap LEI check event, not a full record. Not-found and error rows are always written. Default true. Has no effect without a comparison.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}