{
  "openapi": "3.0.1",
  "info": {
    "title": "GLEIF LEI Lookup — Counterparty Decision Engine",
    "description": "Turn GLEIF LEI data into onboarding decisions. Look up entities by name or LEI code and get a deterministic approve / review / EDD / reject verdict with risk scoring, ownership transparency, identity resolution, and cross-run monitoring. Built for KYB and counterparty screening.",
    "version": "1.6",
    "x-build-id": "OvQQ0IiNWUl5O7Nss"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~gleif-lei-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-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/ryanclinton~gleif-lei-lookup/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-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/ryanclinton~gleif-lei-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-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",
        "required": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Company name or LEI code to search for. Supports fuzzy name matching.",
            "default": "Apple"
          },
          "queries": {
            "title": "Bulk Queries",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Run several lookups in one pass. Each item is a company name or a 20-character LEI code. When set, this takes priority over the single Search Query.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country Code",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Filter by ISO 3166-1 alpha-2 country code (e.g. US, GB, DE, JP)"
          },
          "status": {
            "title": "Entity Status",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "Filter by entity status"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of LEI records to return",
            "default": 25
          },
          "outputProfile": {
            "title": "Output Profile",
            "enum": [
              "minimal",
              "decision",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "Shape of each record. 'minimal' = LEI, name, recommendedOutcome, riskBand, identityVerdict, opacity, summary (ideal for agents and dashboards). 'decision' = the full decision layer (decision, risk, identity, ownership, review queue) without raw registry detail. 'standard' and 'full' return every field.",
            "default": "standard"
          },
          "includeChildren": {
            "title": "Include child entity counts",
            "type": "boolean",
            "description": "Resolve how many direct and ultimate child entities each result owns. Adds up to two extra GLEIF count queries per record.",
            "default": false
          },
          "includeIsins": {
            "title": "Include mapped ISINs",
            "type": "boolean",
            "description": "Resolve ISIN securities identifiers mapped to each LEI (count plus a sample of up to 50). Adds one extra GLEIF query per record.",
            "default": false
          },
          "expandHierarchy": {
            "title": "Expand corporate hierarchy",
            "type": "boolean",
            "description": "Walk the parent chain up to the ultimate parent and list a sample of direct children. Adds several extra GLEIF calls per record.",
            "default": false
          },
          "maxHierarchyDepth": {
            "title": "Max hierarchy depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many levels to walk up the parent chain when 'Expand corporate hierarchy' is on (1-10).",
            "default": 5
          },
          "includeRelationships": {
            "title": "Include fund / branch relationships",
            "type": "boolean",
            "description": "Resolve fund-manager, umbrella-fund, master-fund, managed-funds, feeder-funds and head-office relationships when present.",
            "default": false
          },
          "includeReportingExceptions": {
            "title": "Include parent reporting exceptions",
            "type": "boolean",
            "description": "When a parent is not reported, resolve why (e.g. NATURAL_PERSONS, NON_PUBLIC, NO_KNOWN_PERSON). High value for KYB and compliance.",
            "default": false
          },
          "includeGraphEdges": {
            "title": "Emit graph edges",
            "type": "boolean",
            "description": "Also emit graph-edge records (source / target / relationship / weight) for parent and child links, ready for Neo4j, Gephi or Cytoscape.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name (change detection)",
            "type": "string",
            "description": "Optional. When set, the actor stores a snapshot per LEI and, on the next scheduled run with the same name, reports corporate events (status change, lapse, parent change, merger, successor) via changeFlags and changes. Leave blank for a one-off lookup."
          },
          "resolveCodes": {
            "title": "Resolve legal-form and authority codes",
            "type": "boolean",
            "description": "Resolve GLEIF ELF legal-form codes and registration-authority codes to human-readable names (e.g. XTIQ to Corporation). Cached, so it adds few extra calls. On by default.",
            "default": true
          },
          "subjectRegistrationNumber": {
            "title": "Subject registration number (identity check)",
            "type": "string",
            "description": "Optional. The home-registry number you expect the entity to have. When it matches the record's registeredAs, the actor adds registration_number_match evidence and raises identity confidence. Used only for a name search."
          },
          "policyProfile": {
            "title": "Decision Policy Profile",
            "enum": [
              "default",
              "vendor",
              "banking",
              "investment"
            ],
            "type": "string",
            "description": "Sets how strict the counterparty decision is. 'banking' rejects on lapsed/overdue/critical; 'vendor' is lenient (procurement); 'investment' is in between; 'default' is balanced. The decision is deterministic with a full decisionPath.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}