2s
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).
HTTP 402 with machine-readable payment
terms, your agent pays the $0.0012 USDC in USDC on-chain, and retries automatically. Pays to 0x2b6D4988Db4723E6908Db86Ab2b8dFBc51FC32C5.Call it in 30 seconds
// npm i x402-fetch viem
import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
const account = privateKeyToAccount(process.env.PRIVATE_KEY); // funds USDC on Base
const wallet = createWalletClient({ account, chain: base, transport: http() });
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);
// Pays the $0.0012 USDC automatically on the 402, then returns the real response:
const res = await fetchWithPay("https://2s.io/api/business/lei", { method: "GET" });
console.log(await res.json());
# pip install x402 eth-account httpx
import os, asyncio
from eth_account import Account
from x402.clients.httpx import x402HttpxClient
account = Account.from_key(os.environ["PRIVATE_KEY"]) # funds USDC on Base
async def main():
async with x402HttpxClient(account=account) as client:
# x402 handles the 402 -> pay ($0.0012 USDC) -> retry automatically
r = await client.get("https://2s.io/api/business/lei")
print((await r.aread()).decode())
asyncio.run(main())
# 1) An unpaid request returns HTTP 402 with the exact payment terms: curl -i "https://2s.io/api/business/lei?country=US&query=Apple Inc" # 2) Paying + retrying requires an x402 client that can sign the USDC # authorization (curl alone cannot). See the JS / Python tabs below.
New to x402? Read the 5-minute quickstart →