# LEI Registration and Renewal Monitor (`domestic_buffalograss/lei-watch`) Actor

Look up up to 20 LEIs using GLEIF public CC0 data. Validate checksums and flag registration status and renewal dates. No KYC or sanctions decisions.

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

## Pricing

$50.00 / 1,000 completed reports

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LEI Registration and Renewal Monitor

Look up up to 20 LEIs using GLEIF public CC0 data. Validate checksums and flag registration status and renewal dates. No KYC or sanctions decisions.

### What this Actor does

Provide 1–20 LEIs with valid ISO 17442 checksums. Duplicate IDs collapse. asOf only sets the renewal-date comparison date; records are current. Requests are sequential and at least two seconds apart.

### Price

**$0.05 per completed report**, covering up to 20 input entries. Only the `report-completed` event is used. No additional start fee, per-row fee, or platform-usage pass-through is configured. A valid completed report with no matches or no changes is still one report. Invalid input or an upstream failure does not trigger our report event. Free-plan executions do not establish creator revenue.

### Input example

```json
{
  "leis": [
    "5493001KJTIIGC8Y1R12"
  ],
  "renewalWindowDays": 30
}
```

Input fields: `leis; optional asOf; optional renewalWindowDays (0–365, default 30)`. See `.actor/INPUT_SCHEMA.json` and the record details above. Overall input is limited to 1 MB. Unknown top-level fields are rejected.

### Output and integration

The default dataset contains **one JSON report** with nested `rows`, not one dataset item per input. The same report is stored under key-value record `OUTPUT`. `RUN_SUMMARY` states completion, row count and local/SDK billing acknowledgment. The report includes `reportId`, `generatedAtUtc`, `sourceNotice` and `sourceReceipts` with source URL, UTC retrieval time and body SHA256 when an external source was used.

Useful fields: `rows[].legalName, country, entityStatus, registrationStatus, nextRenewalDate, daysToRenewal, flags`. Use JSON export to preserve types and nested arrays. Treat all returned text as untrusted text; do not inject it into HTML or spreadsheets as formulas.

```javascript
// Example using the Apify client in your own integration.
const run = await client.actor('YOUR_USERNAME/lei-watch').call(input, { memory: 256, timeout: 180, maxTotalChargeUsd: 0.05 });
const output = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('OUTPUT');
const rows = output.value.rows;
```

### Limits and interpretation

Source: GLEIF public CC0 reference data. This independent service is not affiliated with or endorsed by GLEIF. Status flags are not KYC, sanctions, creditworthiness or legal eligibility decisions. LEI data remain CC0; no exclusive rights are claimed.

No background monitoring is started automatically. Schedule the Actor using your own Apify task if needed. No API key for the data source, paid proxy, browser, third-party subscription or external payment account is required. No official affiliation or endorsement is claimed.

### Data handling

Inputs and outputs are stored in the user's Apify run storage and subject to the user's plan, retention and sharing settings. Do not submit credentials, confidential records or personal data. The Actor has no author-controlled database, analytics beacon or external log collector. Only the documented public data-source requests are made. Source data terms and attribution apply independently of the processing fee.

### FAQ

**Why pay when the source or local scripts are free?** The fee is for the bounded batch workflow, deterministic output, validation and Apify integration. Source data remain available under their own terms.

**Can I run this without contacting anyone?** Yes. Use the JSON example, then adapt it to your workflow. No call, sales meeting or manual onboarding is required.

**Is a failed or partial fetch a zero-match report?** No. Source HTTP, timeout, schema and size failures stop the run. No report event is charged for that failed processing.

**What happens if a run is restarted?** A completed same-run journal returns the stored report without another report charge. If a write or charge acknowledgment is uncertain, the run stops with `UNCERTAIN_OPERATION_DO_NOT_RESURRECT`; inspect the existing output and charge history. It does not blindly repeat an uncertain operation. A separately started new run is a new report and may be charged.

**Is this guaranteed exactly-once delivery or verified production billing?** No. Apify storage and billing are separate services. The journal prioritizes avoiding duplicate charge attempts and may leave a delivered report unbilled after a crash. Local tests and public-source smoke tests do not prove platform billing, Docker execution or Store approval. Source and platform outages remain possible.

### Local use

```powershell
npm ci --ignore-scripts --registry=https://registry.npmjs.org
npm run check
npm test
npm run smoke:offline
npm run smoke
```

Tests use synthetic fixtures and do not contact external services. `smoke:offline` exercises the real Apify SDK with an isolated local storage directory. `smoke` makes at most one request for the supplied external-source example; run-audit needs none. These local commands do not push, publish or deploy.

# Actor input Schema

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

1 to 20 LEI codes (JSON array of strings): 20 characters, A-Z and 0-9, with valid ISO 17442 check digits, e.g. 5493001KJTIIGC8Y1R12. Each is looked up in the GLEIF API for registration status and next renewal date. One report per run is charged once.

## `renewalWindowDays` (type: `integer`):

Integer 0 to 365, default 30. LEIs whose next renewal date falls within this many days are flagged.

## `asOf` (type: `string`):

Optional UTC date YYYY-MM-DD used as today for the renewal window; default is today. It does not reconstruct historical GLEIF records.

## Actor input object example

```json
{
  "leis": [
    "5493001KJTIIGC8Y1R12"
  ],
  "renewalWindowDays": 30
}
```

# Actor output Schema

## `report` (type: `string`):

No description

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "leis": [
        "5493001KJTIIGC8Y1R12"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("domestic_buffalograss/lei-watch").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 = { "leis": ["5493001KJTIIGC8Y1R12"] }

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

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

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

```

## CLI example

```bash
echo '{
  "leis": [
    "5493001KJTIIGC8Y1R12"
  ]
}' |
apify call domestic_buffalograss/lei-watch --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,domestic_buffalograss/lei-watch"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NQirRlnnqayb088OE/builds/TkZefPJf16d7EmAM1/openapi.json
