# LEI Entity Lifecycle Watch Report (`taroyamada/lei-entity-lifecycle-watch-report`) Actor

Monitor GLEIF public LEI records for source-linked entity status, registration, renewal, and legal-name changes, then produce portfolio reports.

- **URL**: https://apify.com/taroyamada/lei-entity-lifecycle-watch-report.md
- **Developed by:** [naoki anzai](https://apify.com/taroyamada) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 lei entity rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## LEI Entity Lifecycle Watch Report

Entity-reference, procurement, treasury, and research teams provide LEI codes, legal names, or country filters; this actor reads the public GLEIF LEI API. It returns a source-linked portfolio report first, followed by lifecycle alerts, normalized entity rows, and an optional export manifest. No API key or login is required.

### Store Quickstart

1. Run the first example with `initialRunMode: "baseline_only"`; the first run stores a snapshot and intentionally produces zero rows and zero charges.
2. Run the same `monitorKey` again with `generateReport: true` and `emitUnchanged: false`; only changed records produce a report and alerts.
3. Set `generateExport: true` when a changed portfolio should also produce the normalized export manifest. `maxChargeUsd` is checked before any billable row is delivered.

### Run the next report

- For as-filed corporate disclosure facts, use [SEC EDGAR Material Disclosure Watch Scraper](https://apify.com/taroyamada/sec-edgar-material-disclosure-watch-scraper).
- For public procurement opportunity alerts, use [Government Tender & Grants Monitor](https://apify.com/taroyamada/government-tender-grants-monitor).
- For domain, DNS, and public security signals, use [Company Domain Tech DNS Security Audit](https://apify.com/taroyamada/company-enrichment-intelligence).

### Input Examples

#### 1. Baseline a known LEI portfolio

```json
{
  "leis": [
    "INR2EJN1ERAN0W5ZP974"
  ],
  "monitorKey": "treasury-portfolio",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "generateExport": false,
  "emitRawRows": false,
  "emitUnchanged": false,
  "maxChargeUsd": 25,
  "dryRun": false
}
````

#### 2. Generate a changed portfolio report and export

```json
{
  "leis": [
    "INR2EJN1ERAN0W5ZP974"
  ],
  "monitorKey": "treasury-portfolio",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "generateExport": true,
  "emitRawRows": true,
  "emitUnchanged": false,
  "maxChargeUsd": 25,
  "dryRun": false
}
```

#### 3. Search by legal name or country

```json
{
  "leis": [],
  "legalNames": [
    "MICROSOFT CORPORATION"
  ],
  "countries": [
    "US"
  ],
  "pageSize": 10,
  "monitorKey": "us-issuer-reference-watch",
  "initialRunMode": "emit_backfill",
  "generateReport": true,
  "generateExport": true,
  "emitRawRows": false,
  "emitUnchanged": false,
  "maxChargeUsd": 25,
  "dryRun": false
}
```

#### 4. Inspect all billing event shapes without a live call

```json
{
  "dryRun": true,
  "generateReport": true,
  "generateExport": true,
  "emitRawRows": true,
  "maxChargeUsd": 25
}
```

### Sample Output

The first row of a changed run is `lei-portfolio-report`. It is followed by `lei-lifecycle-change-alert` rows, optional `lei-entity-row` rows, and an optional `lei-export` manifest. Each row contains `sourceUrl`, retrieval time, GLEIF attribution, limitations, and prohibited interpretations. See `docs/sample-output.json` for a complete example.

### Output Fields

- `lei`, `legalName`, `entityStatus`, `registrationStatus`, and address summaries describe the observed GLEIF record.
- `changeTypes`, `previous`, and `current` explain lifecycle field differences from the saved portfolio snapshot.
- `sourceUrl`, `sourceMethod`, `authorizationBasis`, and `cc0Attribution` preserve provenance.
- `billingEventName` identifies the configured PAY\_PER\_EVENT event.
- `limitations` and `prohibitedInterpretations` prevent the output from being presented as certification or advice.

### Pricing

- `lei-entity-row`: `$0.005`
- `lei-lifecycle-change-alert`: `$0.20`
- `lei-portfolio-report`: `$10`
- `lei-export`: `$6`

The actor checks the estimated total against `maxChargeUsd` before delivery and fails closed if the limit would be exceeded. The first `baseline_only` run and an unchanged monitoring run emit zero dataset rows and zero billable events. `dryRun` emits one sample of each billable type but skips charging.

### Compliance Guardrails

- Source access is limited to the official public GLEIF API. No key, login, private data, or access bypass is used.
- GLEIF attribution and source links are retained. Public-data availability or CC0 terms do not imply GLEIF affiliation or endorsement.
- An LEI record is a reference-data observation. This actor does not provide identity or KYC certification, sanctions clearance, credit assessment, legal advice, investment advice, or a guarantee about an entity.
- The actor does not extract contacts or create outreach lists. Users remain responsible for their own review of source records and applicable data-use rules.

# Actor input Schema

## `leis` (type: `array`):

Up to 200 20-character LEI codes to monitor directly.

## `legalNames` (type: `array`):

Optional legal-name filters sent to the GLEIF search endpoint.

## `countries` (type: `array`):

Optional two-letter country filters for legal addresses.

## `entityStatuses` (type: `array`):

Optional entity status filters such as ACTIVE or INACTIVE.

## `registrationStatuses` (type: `array`):

Optional LEI registration status filters such as ISSUED, LAPSED, or RETIRED.

## `pageSize` (type: `integer`):

Maximum records returned for each name or country search.

## `monitorKey` (type: `string`):

Stable name for this portfolio. Keep it unchanged for recurring no-change detection.

## `initialRunMode` (type: `string`):

baseline\_only stores the first snapshot with zero rows; emit\_backfill emits the initial portfolio.

## `generateReport` (type: `boolean`):

Emit the report row first when a baseline or lifecycle change is available.

## `generateExport` (type: `boolean`):

Emit a normalized export manifest on a changed run. No file is created outside the actor output.

## `emitRawRows` (type: `boolean`):

Emit the normalized entity row alongside lifecycle alerts. Report output remains first.

## `emitUnchanged` (type: `boolean`):

Leave false for recurring monitoring so an unchanged run has zero rows and zero charges.

## `maxChargeUsd` (type: `number`):

The actor refuses delivery before any row is pushed if the configured event prices exceed this amount.

## `dryRun` (type: `boolean`):

Emit one sample of every billable event without external calls, state writes, or charges.

## Actor input object example

```json
{
  "leis": [
    "INR2EJN1ERAN0W5ZP974"
  ],
  "legalNames": [],
  "countries": [],
  "entityStatuses": [],
  "registrationStatuses": [],
  "pageSize": 25,
  "monitorKey": "default-lei-portfolio",
  "initialRunMode": "baseline_only",
  "generateReport": true,
  "generateExport": false,
  "emitRawRows": false,
  "emitUnchanged": false,
  "maxChargeUsd": 25,
  "dryRun": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("taroyamada/lei-entity-lifecycle-watch-report").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("taroyamada/lei-entity-lifecycle-watch-report").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call taroyamada/lei-entity-lifecycle-watch-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=taroyamada/lei-entity-lifecycle-watch-report",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LEI Entity Lifecycle Watch Report",
        "description": "Monitor GLEIF public LEI records for source-linked entity status, registration, renewal, and legal-name changes, then produce portfolio reports.",
        "version": "0.1",
        "x-build-id": "bKxjpOCi3HpiQ85nG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/taroyamada~lei-entity-lifecycle-watch-report/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-taroyamada-lei-entity-lifecycle-watch-report",
                "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/taroyamada~lei-entity-lifecycle-watch-report/runs": {
            "post": {
                "operationId": "runs-sync-taroyamada-lei-entity-lifecycle-watch-report",
                "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/taroyamada~lei-entity-lifecycle-watch-report/run-sync": {
            "post": {
                "operationId": "run-sync-taroyamada-lei-entity-lifecycle-watch-report",
                "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",
                        "type": "array",
                        "description": "Up to 200 20-character LEI codes to monitor directly.",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9]{20}$"
                        },
                        "default": [
                            "INR2EJN1ERAN0W5ZP974"
                        ]
                    },
                    "legalNames": {
                        "title": "Legal names",
                        "type": "array",
                        "description": "Optional legal-name filters sent to the GLEIF search endpoint.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "countries": {
                        "title": "Countries",
                        "type": "array",
                        "description": "Optional two-letter country filters for legal addresses.",
                        "items": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 2
                        },
                        "default": []
                    },
                    "entityStatuses": {
                        "title": "Entity statuses",
                        "type": "array",
                        "description": "Optional entity status filters such as ACTIVE or INACTIVE.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "registrationStatuses": {
                        "title": "Registration statuses",
                        "type": "array",
                        "description": "Optional LEI registration status filters such as ISSUED, LAPSED, or RETIRED.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "pageSize": {
                        "title": "Page size",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum records returned for each name or country search.",
                        "default": 25
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Stable name for this portfolio. Keep it unchanged for recurring no-change detection.",
                        "default": "default-lei-portfolio"
                    },
                    "initialRunMode": {
                        "title": "Initial run mode",
                        "enum": [
                            "baseline_only",
                            "emit_backfill"
                        ],
                        "type": "string",
                        "description": "baseline_only stores the first snapshot with zero rows; emit_backfill emits the initial portfolio.",
                        "default": "baseline_only"
                    },
                    "generateReport": {
                        "title": "Generate portfolio report",
                        "type": "boolean",
                        "description": "Emit the report row first when a baseline or lifecycle change is available.",
                        "default": true
                    },
                    "generateExport": {
                        "title": "Generate export manifest",
                        "type": "boolean",
                        "description": "Emit a normalized export manifest on a changed run. No file is created outside the actor output.",
                        "default": false
                    },
                    "emitRawRows": {
                        "title": "Emit entity rows for changed records",
                        "type": "boolean",
                        "description": "Emit the normalized entity row alongside lifecycle alerts. Report output remains first.",
                        "default": false
                    },
                    "emitUnchanged": {
                        "title": "Emit unchanged rows",
                        "type": "boolean",
                        "description": "Leave false for recurring monitoring so an unchanged run has zero rows and zero charges.",
                        "default": false
                    },
                    "maxChargeUsd": {
                        "title": "Maximum run charge",
                        "minimum": 0.005,
                        "maximum": 500,
                        "type": "number",
                        "description": "The actor refuses delivery before any row is pushed if the configured event prices exceed this amount.",
                        "default": 25
                    },
                    "dryRun": {
                        "title": "Dry run",
                        "type": "boolean",
                        "description": "Emit one sample of every billable event without external calls, state writes, or charges.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
