business.lei
Look up or search the global LEI (Legal Entity Identifier) registry — the authoritative ISO 17442 directory of ~2.6M legal entities worldwide. Pass `lei` for an exact 20-character LEI, or `query` to search by legal/other name (ranked best-match first). Filter name search by `country` (ISO 2-letter, HQ country) and `status` (active = currently active entities only; all = default). Each result returns the LEI, legal name, an alternate/other name, legal jurisdiction, entity category (GENERAL/FUND/BRANCH/…), ISO 20275 legal-form code, entity status (ACTIVE/INACTIVE), LEI registration status (ISSUED/LAPSED/RETIRED/…), headquarters city/region/country/postal code, the initial registration + last update + next renewal dates, and the managing LOU. Use this to canonicalize a company name to its LEI, resolve a counterparty, or enrich a vendor master. Data: GLEIF Golden Copy (CC0, public domain).
/api/business/leiPAYMENT-SIGNATURE.Parameters
| Name | Type | Description |
|---|---|---|
lei | string | match ^[A-Za-z0-9]{20}$ |
query | string | min 1 chars · max 200 chars |
country | string | match ^[A-Za-z]{2}$ |
status | string | one of: active | all |
limit | integer | min 1 · max 100 |
offset | integer | min 0 |
Code samples
# 1. Probe with no auth → 402 envelope with PaymentRequirements curl -sS 'https://2s.io/api/business/lei?lei=example&query=example&country=example&status=active&limit=1&offset=0' # 2. Sign + retry with PAYMENT-SIGNATURE: curl -sS 'https://2s.io/api/business/lei?lei=example&query=example&country=example&status=active&limit=1&offset=0' \ -H 'PAYMENT-SIGNATURE: <base64-json-payload>' # Or use the canonical runner (handles probe → sign → retry): # EVM_PRIVATE_KEY=0x... node --env-file=.env.local \ # --experimental-strip-types scripts/x402-pay.ts \ # 'https://2s.io/api/business/lei?lei=example&query=example&country=example&status=active&limit=1&offset=0'
import { TwoS } from '@2sio/sdk'
const client = new TwoS({
privateKey: process.env.EVM_PRIVATE_KEY as `0x${string}`,
})
const result = await client.business.lei({
"lei": "example",
"query": "example",
"country": "example",
"status": "active",
"limit": 1,
"offset": 0
})
console.log('endpoint:', result.endpoint)
console.log('cost:', result.costUsd, 'USDC')
console.log('tx:', result.settlement?.txHash)
console.log('data:', result.data)import os
from twosio import TwoS
client = TwoS(private_key=os.environ["EVM_PRIVATE_KEY"])
result = client.business.lei(lei="example", query="example", country="example", status="active", limit=1, offset=0)
print("endpoint:", result.endpoint)
print("cost:", result.cost_usd, "USDC")
print("tx:", (result.settlement or {}).get("tx_hash"))
print("data:", result.data)// 1. Add @2sio/mcp to your MCP host config (Claude Desktop example below).
// EVM_PRIVATE_KEY funds x402 payments per call.
// claude_desktop_config.json
{
"mcpServers": {
"2sio": {
"command": "npx",
"args": ["-y", "@2sio/mcp"],
"env": { "EVM_PRIVATE_KEY": "0x..." }
}
}
}
// 2. Once the server is running, agents call this tool via standard MCP:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "business.lei",
"arguments": {
"lei": "example",
"query": "example",
"country": "example",
"status": "active",
"limit": 1,
"offset": 0
}
}
}Response
| Field | Type | Description |
|---|---|---|
ok | boolean | one of: true |
items | array | |
total | integer | Total matching rows upstream; null when unknown. |
source | object | |
page | object |
{
"ok": true,
"items": [
{
"lei": "example",
"legalName": "example",
"otherName": "example",
"jurisdiction": "example",
"category": "example",
"legalForm": "example",
"entityStatus": "example",
"registrationStatus": "example",
"headquarters": {
"city": "example",
"region": "example",
"country": "example",
"postalCode": "example"
},
"initialRegistrationDate": "example",
"lastUpdateDate": "example",
"nextRenewalDate": "example",
"managingLou": "example"
}
],
"total": 1,
"source": {
"provider": "example",
"url": "example",
"license": "example"
},
"page": {
"number": 1,
"size": 1,
"pages": 1
}
}Discovery
- /api/directory — full catalog of every endpoint
- /openapi.json — OpenAPI 3.1 spec (per-op x-payment-info, x402Payment security)
- /.well-known/x402 — machine-readable service descriptor for x402-aware crawlers
- /.well-known/mcp/server-card.json — MCP SEP-1649 server card
- /llms.txt — plain-text manifest for LLM ingestion