{
  "openapi": "3.0.1",
  "info": {
    "title": "LEI Lookup & Renewal Monitor: Bulk Legal Entity Identifier API",
    "description": "Bulk LEI lookup from official GLEIF data: status, renewal date, lapsed LEIs, parents, BIC. Daily watchlist monitor. MCP-ready, $1 per 1,000. Not affiliated with or endorsed by GLEIF.",
    "version": "1.0",
    "x-build-id": "Kll0fhHA7XGkXs3Fs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/optimistprime~lei-lookup-renewal-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-optimistprime-lei-lookup-renewal-monitor",
        "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/optimistprime~lei-lookup-renewal-monitor/runs": {
      "post": {
        "operationId": "runs-sync-optimistprime-lei-lookup-renewal-monitor",
        "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/optimistprime~lei-lookup-renewal-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-optimistprime-lei-lookup-renewal-monitor",
        "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"
            ],
            "type": "string",
            "description": "lookup = check the LEIs, BICs, ISINs or legal names you list. search = query the whole LEI register with the filters below (new LEIs, renewals due, lapsed, by country).",
            "default": "lookup"
          },
          "leis": {
            "title": "LEIs",
            "type": "array",
            "description": "Lookup mode. 20-character Legal Entity Identifiers, up to 5,000. Checked 200 per request. Invalid or unknown LEIs are reported in the run summary and not charged.",
            "default": [
              "HWUPKR0MPOU8FGXBT394",
              "529900W18LQJJN6SJ336",
              "5493001KJTIIGC8Y1R12"
            ],
            "items": {
              "type": "string"
            }
          },
          "bics": {
            "title": "BIC / SWIFT codes",
            "type": "array",
            "description": "Lookup mode. Find the LEI behind each BIC (8 or 11 characters), e.g. APLEUS66XXX. One request per BIC.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "isins": {
            "title": "ISINs",
            "type": "array",
            "description": "Lookup mode. Find the issuer LEI for each ISIN (12 characters), e.g. US0378331005. One request per ISIN.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Legal names",
            "type": "array",
            "description": "Lookup mode. Company or fund legal names. Name matching is fuzzy, so up to 'Matches per name' best matches are returned with matchQuery set. One request per name.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchesPerName": {
            "title": "Matches per name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Lookup mode, names only.",
            "default": 3
          },
          "countries": {
            "title": "Legal address countries",
            "type": "array",
            "description": "Search mode. ISO 3166 two-letter codes, e.g. US, GB, DE. Empty = all countries.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Entity categories",
            "type": "array",
            "description": "Search mode. Empty = all except sole proprietors (always excluded for privacy).",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL",
                "FUND",
                "BRANCH",
                "RESIDENT_GOVERNMENT_ENTITY",
                "INTERNATIONAL_ORGANIZATION"
              ]
            },
            "default": []
          },
          "registrationStatuses": {
            "title": "LEI registration status",
            "type": "array",
            "description": "Search mode. ISSUED = valid and renewed; LAPSED = renewal overdue; RETIRED/ANNULLED/DUPLICATE = no longer usable; PENDING_TRANSFER/PENDING_ARCHIVAL = in process. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "ISSUED",
                "LAPSED",
                "PENDING_TRANSFER",
                "PENDING_ARCHIVAL",
                "RETIRED",
                "ANNULLED",
                "DUPLICATE"
              ]
            },
            "default": []
          },
          "entityStatus": {
            "title": "Entity status",
            "enum": [
              "ANY",
              "ACTIVE",
              "INACTIVE"
            ],
            "type": "string",
            "description": "Search mode. ACTIVE or INACTIVE legal entity. ANY = both.",
            "default": "ANY"
          },
          "registeredWithinDays": {
            "title": "LEI first issued within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Search mode. New-LEI feed: only LEIs whose initial registration date is in the last N days (0 = off). Around 800-1,300 new LEIs are issued worldwide per weekday.",
            "default": 0
          },
          "updatedWithinDays": {
            "title": "Record updated within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Search mode. Only LEI records updated in the last N days (0 = off).",
            "default": 0
          },
          "renewalDueWithinDays": {
            "title": "Renewal due within N days",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "Search mode. Only ISSUED LEIs whose next renewal date falls in the next N days (0 = off), soonest first. Renewal-lead and compliance lists.",
            "default": 0
          },
          "renewalAlertDays": {
            "title": "Renewal alert window (days)",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Both modes. An ISSUED LEI whose renewal date is within this many days gets renewalState = renewal-due (and, in monitor mode, an alert when it enters the window).",
            "default": 30
          },
          "fullText": {
            "title": "Full-text search",
            "type": "string",
            "description": "Search mode. Optional words matched anywhere in the LEI record (names, addresses, identifiers).",
            "default": ""
          },
          "includeParents": {
            "title": "Include parent companies",
            "type": "boolean",
            "description": "Add the direct and ultimate parent (LEI, legal name, country) when reported. Costs up to 2 extra requests per row, so large lists take longer (about 20 rows per 45 s budget).",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only changes / new LEIs)",
            "type": "boolean",
            "description": "Lookup: return only LEIs that changed since the last run (status, renewal date, name, address, successor, parent, or crossing into renewal-due/overdue/lapsed). Unchanged LEIs cost $0.0002 each. Search: return only LEIs this monitor hasn't returned before. Schedule daily.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of the monitor state (letters, digits, dashes). Use different IDs for different watchlists.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows (0 = no limit). Lookup mode with a long list: set 0 or at least the list size.",
            "default": 100
          },
          "timeBudgetSeconds": {
            "title": "Time budget (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop fetching after this many seconds and return what was found so far (truncated: true). 0 = no limit. Keeps AI-agent calls fast.",
            "default": 45
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}