# Company Profile from Wikidata + GLEIF (LEI) (`far003/company-profile-lei-wikidata`) Actor

One structured profile per company name, LEI or Wikidata ID: legal identity, LEI status and renewal, parents, website, industry, size, revenue, listings, social links. Official open data (GLEIF + Wikidata, CC0), no key. Pay per profile found; not found and ambiguous are free.

- **URL**: https://apify.com/far003/company-profile-lei-wikidata.md
- **Developed by:** [Francesco Antonio Russo](https://apify.com/far003) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.20 / 1,000 company profiles

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

## Company Profile from Wikidata + GLEIF (LEI)

Give it company **names, LEIs or Wikidata IDs** and get **one structured profile per company**, built from two official open sources: the **GLEIF** Legal Entity Identifier registry (legal name, status and renewal of the LEI, legal form, register number, addresses, parent companies) and **Wikidata** (website, industry, size, revenue, stock listings, CEO, social links). No API key, no scraping of company websites, no login.

For KYC and compliance checks, sales intelligence, CRM enrichment and research. What makes it safe to use in a pipeline: **the two sources are joined only through the LEI written on the Wikidata item**; a name that fits several companies comes back as `ambiguous` with the candidates, never as a guess; every record says *how* it was matched (`matchConfidence` + `matchExplanation`) and carries the exact source URLs.

- **Pay per profile found: $0.0012** ($1.20 per 1,000). Not found, ambiguous, invalid input, repeats and runs where a source did not answer are **free**.
- **Official open data.** GLEIF data is CC0; Wikidata's structured data is CC0. Polite by design: one request at a time per source, with a pause, `Retry-After` honoured.
- **Not affiliated with, or endorsed by, GLEIF or the Wikimedia Foundation.** The GLEIF logo is not used.

### Input

| Field | Default | What it does |
|---|---|---|
| `companies` | Apple Inc. / LEI / Q312 | One entry per company, up to 1,000: a **name** (`Apple Inc.`), a **LEI** (`HWUPKR0MPOU8FGXBT394`, any case) or a **Wikidata ID** (`Q312` or its wikidata.org URL). The kind is recognised by itself. A LEI whose check digits (ISO 17442) are wrong, or with 19 or 21 characters, is reported as `invalid_input` and never searched as a name |
| `country` | none | Two-letter ISO code (`US`, `DE`, `IT`). For names only: keeps the entities of that country, which settles most ambiguous names |
| `includeRelationships` | on | Add the direct and ultimate parent from GLEIF. Costs two more GLEIF requests per company (a slower run, same price) |
| `maxCandidates` | 3 | How many look-alike entities to list in `candidates` for a name search (0-10) |

Repeats (same LEI, same Wikidata ID, same name written another way) are collapsed. If you ask for the same company in different words (a name and its LEI), the second profile comes back as `duplicate`: delivered, **not billed**.

### What you get

One record per entry, same keys every time (`null` or an empty list when the sources say nothing; nothing is invented).

| Field | Meaning |
|---|---|
| `query`, `matchType` | Your entry and how it was read: `lei`, `qid` or `name` |
| `status`, `statusMessage` | `found` (billed) · `duplicate` · `partial` (a source did not answer: delivered, free) · `ambiguous` · `not_found` · `invalid_input` · `error`. The message says why in plain words |
| `matchConfidence`, `matchExplanation` | `high` = you gave an identifier, or an exact name that no other entity shares. `medium` = chosen among several for a reason stated in the explanation, or matched on Wikidata only, or joined to Wikidata by name |
| `lei`, `legalName`, `otherNames`, `name` | The LEI, the legal name in GLEIF, other names (previous names, translations), and a display name (Latin script when the legal name is not) |
| `entityStatus`, `entityCategory`, `registrationStatus`, `leiLapsed`, `renewalOverdue`, `nextRenewalDate`, `initialRegistrationDate`, `lastUpdateDate` | `ACTIVE`/`INACTIVE` company; `entityCategory` = `GENERAL` (a legal entity), `BRANCH` (an office of another entity: never chosen over the legal entity of the same name), `FUND`...; LEI registration (`ISSUED`, `LAPSED`, `RETIRED`...); `leiLapsed` = GLEIF marked it lapsed; `renewalOverdue` = still `ISSUED` but the renewal date has passed |
| `legalForm`, `jurisdiction`, `registrationAuthority` | ISO 20275 code and English name; jurisdiction; the business register and the company's number in it |
| `legalAddress`, `headquartersAddress` | Lines, city, region, country, postal code, one-line `formatted` |
| `directParent`, `ultimateParent`, `successorLei` | `{lei, name, exception}`: the parent, or the reason GLEIF states for having none (`NATURAL_PERSONS`, `NO_KNOWN_PERSON`, `NON_CONSOLIDATING`, `NON_PUBLIC`...). `null` when `includeRelationships` is off |
| `wikidataId`, `wikidataLinkedBy` | The item and how it was tied to the record: `lei` (same LEI, property P1278), `qid` (you gave it), `name` (name + country only: check it) |
| `description`, `website`, `industry`, `inception` | From Wikidata. Dates keep Wikidata's precision (`1976-04-01`, `1976-04` or `1976`) |
| `employees`, `revenue` | The most recent value **with its date**: `{value, asOf}` and `{amount, currency, asOf}`. Wikidata's figures can be years old: check `asOf` |
| `stockExchanges`, `isin`, `ceo` | Current listings with ticker, ISIN of the shares, current CEO (statements with an end date are left out) |
| `country`, `countryCode`, `logoUrl`, `social`, `wikipediaUrl` | Country (Wikidata); a **link** to the logo file on Wikimedia Commons; LinkedIn, X, Facebook, Instagram, YouTube, GitHub, TikTok links built from Wikidata identifiers; English Wikipedia article |
| `candidates` | Look-alike entities (`lei`, `wikidataId`, `name`, `country`, `entityStatus`, `entityCategory`, `matchScore`): the choices for an `ambiguous` name |
| `warnings`, `sources`, `gleifDataDate`, `charged`, `checkedAt` | Things to check; the exact GLEIF and Wikidata URLs; the date of the GLEIF data the record comes from; whether it was billed; when it was built |

#### Example: a found profile (real run, input `HWUPKR0MPOU8FGXBT394`)

```json
{
  "query": "HWUPKR0MPOU8FGXBT394",
  "matchType": "lei",
  "status": "found",
  "statusMessage": "Profile found.",
  "matchConfidence": "high",
  "matchExplanation": "The LEI was given and exists in GLEIF. Wikidata item Q312 carries the same LEI (P1278).",
  "name": "Apple Inc.",
  "lei": "HWUPKR0MPOU8FGXBT394",
  "legalName": "Apple Inc.",
  "otherNames": [
    {
      "name": "Apple Computer, Inc.",
      "type": "PREVIOUS_LEGAL_NAME",
      "language": "en"
    }
  ],
  "entityStatus": "ACTIVE",
  "entityCategory": "GENERAL",
  "registrationStatus": "ISSUED",
  "leiLapsed": false,
  "renewalOverdue": false,
  "nextRenewalDate": "2027-03-08T17:27:20Z",
  "initialRegistrationDate": "2012-06-06T15:53:00Z",
  "lastUpdateDate": "2026-03-03T16:34:33Z",
  "legalForm": {
    "code": "H1UM",
    "name": "For-Profit Corporation General Stock"
  },
  "jurisdiction": "US-CA",
  "registrationAuthority": {
    "id": "RA000598",
    "name": "Business Entity Records",
    "website": "https://businesssearch.sos.ca.gov/",
    "entityId": "806592"
  },
  "legalAddress": {
    "lines": [
      "C/O C T Corporation System",
      "330 N. Brand Blvd",
      "Suite 700"
    ],
    "city": "Glendale",
    "region": "US-CA",
    "country": "US",
    "postalCode": "91203",
    "formatted": "C/O C T Corporation System, 330 N. Brand Blvd, Suite 700, 91203 Glendale, US-CA, US"
  },
  "headquartersAddress": {
    "lines": [
      "One Apple Park Way"
    ],
    "city": "Cupertino",
    "region": "US-CA",
    "country": "US",
    "postalCode": "95014",
    "formatted": "One Apple Park Way, 95014 Cupertino, US-CA, US"
  },
  "directParent": {
    "lei": null,
    "name": null,
    "exception": "NATURAL_PERSONS"
  },
  "ultimateParent": {
    "lei": null,
    "name": null,
    "exception": "NATURAL_PERSONS"
  },
  "successorLei": null,
  "wikidataId": "Q312",
  "wikidataLinkedBy": "lei",
  "description": "American multinational technology company based in Cupertino, California",
  "website": "https://apple.com/",
  "industry": [
    "software industry",
    "consumer electronics industry",
    "digital distribution"
  ],
  "inception": "1976-04-01",
  "employees": {
    "value": 164000,
    "asOf": "2022"
  },
  "revenue": {
    "amount": 416161000000,
    "currency": "USD",
    "asOf": "2025"
  },
  "stockExchanges": [
    {
      "exchange": "Nasdaq",
      "ticker": "AAPL"
    }
  ],
  "isin": [
    "US0378331005"
  ],
  "ceo": "John Ternus",
  "country": "United States",
  "countryCode": "US",
  "logoUrl": "https://commons.wikimedia.org/wiki/Special:FilePath/Apple_logo_black.svg",
  "social": {
    "linkedin": "https://www.linkedin.com/company/apple",
    "x": "https://x.com/Apple",
    "facebook": "https://www.facebook.com/apple",
    "instagram": "https://www.instagram.com/apple/",
    "youtube": "https://www.youtube.com/channel/UCE_M8A5yxnLfW0KghEeajjw",
    "github": "https://github.com/apple",
    "tiktok": "https://www.tiktok.com/@apple"
  },
  "wikipediaUrl": "https://en.wikipedia.org/wiki/Apple_Inc.",
  "candidates": [],
  "warnings": [],
  "sources": {
    "gleif": "https://api.gleif.org/api/v1/lei-records/HWUPKR0MPOU8FGXBT394",
    "wikidata": "https://www.wikidata.org/wiki/Q312"
  },
  "gleifDataDate": "2026-10-19T00:00:00Z",
  "charged": true,
  "checkedAt": "2026-10-19T09:21:49.223Z"
}
```

(`otherNames` and `industry` are shortened here; the real record lists every entry.)

#### Example: an ambiguous name (real run, input `Meta`): free, with the choices

```json
{
  "query": "Meta",
  "matchType": "name",
  "status": "ambiguous",
  "statusMessage": "19 different entities carry this name. Give a country (ISO code) or run again with the LEI or Wikidata ID of the one you mean.",
  "matchConfidence": null,
  "lei": null,
  "wikidataId": null,
  "candidates": [
    {
      "lei": "984500Y657CE399B1547",
      "wikidataId": null,
      "name": "META",
      "country": "DK",
      "entityStatus": "ACTIVE",
      "matchScore": 1
    },
    {
      "lei": null,
      "wikidataId": "Q15813961",
      "name": "Meta",
      "country": null,
      "entityStatus": null,
      "matchScore": 1
    }
  ],
  "charged": false
}
```

Run again with the LEI or Wikidata ID of the one you mean (or add `country`).

#### Example: a mistyped LEI (real run, input `254900HLPLIRDQPWL69`): free

```json
{
  "query": "254900HLPLIRDQPWL69",
  "status": "invalid_input",
  "statusMessage": "\"254900HLPLIRDQPWL69\" has 19 characters and looks like a LEI, but a LEI has exactly 20: check for a missing or extra character",
  "charged": false
}
```

### What you pay, and what you don't

**$0.0012 per profile with `status: found`** (event `company`): $1.20 per 1,000.

| Run | Billed | Cost |
|---|---|---|
| 7 Italian companies by name, all found (real run) | 7 | $0.0084 |
| 100 LEIs, all found | 100 | $0.12 |
| 1,000 companies, 850 found, 150 unclear or unknown | 850 | $1.02 |

**Free, always:** `not_found`, `ambiguous` (with candidates), `invalid_input`, `duplicate`, `partial` and `error` (a source did not answer: run it again later), the `SUMMARY` record.

**Your spending limit is exact.** With a maximum cost per run, the Actor checks the budget before every billed record and stops when it is spent (`SUMMARY.stopReason`: `spending limit reached`). It never charges past it.

### How long a run takes

The two sources are read politely: GLEIF one request every 1.25 s (the GLEIF API publishes no limit; this stays under 50 per minute), Wikidata one at a time. A LEI takes about 5 s (several LEIs are read from GLEIF in blocks of 50), a name about 5 to 8 s with parents. Plan **about 10 minutes per 100 companies**; `includeRelationships: false` is faster. 256 MB of memory is enough.

### FAQ

**Where does each field come from?** Everything about the legal entity (`lei` to `successorLei`) comes from GLEIF; everything about the business (`website` to `social`) comes from Wikidata. `sources` has the exact URLs. The GLEIF data is the "Golden Copy" published daily (`gleifDataDate`); Wikidata is edited by volunteers and can be out of date or empty for smaller companies.

**How are a name and a LEI tied together?** Through property P1278 ("LEI") on the Wikidata item. If the item carries the LEI, `wikidataLinkedBy` is `lei`. If a company exists in both sources but the Wikidata item has no LEI, the Actor joins them by name **and country, only when the match is one to one**, and says so (`wikidataLinkedBy: "name"`, a warning, `medium`). It never joins by similarity alone.

**Why `ambiguous` instead of the best guess?** In a compliance or CRM flow a wrong company is worse than no answer. When several entities fit (the same name in other countries, a group holding and its operating company, funds), you get the candidates and decide. A different legal form counts as a different entity ("Ferrari N.V." is not "Ferrari S.p.A."). An entity whose registered legal name is exactly your input beats one that only has your input as an alias ("Roche Holding AG" is Roche Holding AG, not F. Hoffmann-La Roche AG); when two entities have that exact name ("UBS AG" in Switzerland and in the US) the answer is `ambiguous` until you give a country. A **branch** (`entityCategory` `BRANCH`: Intesa Sanpaolo's Paris office has the exact name of the bank) is never chosen over the legal entity with that name; it stays in `candidates`, marked. Legal forms are compared in every spelling ("S.A.B. de C.V." = "S A B DE C V" = "SAB de CV", "S/A", "Ltda."). A LEI that Wikidata gives to an item is trusted unless it is lapsed or retired AND registered in another country than the item (Wikidata has such mistakes: the Mexican Cemex carried the lapsed LEI of CEMEX, Inc., US); then the valid entity of the item's country is chosen, with a warning, or the answer is `ambiguous`. GLEIF records marked `DUPLICATE` are ignored. The name search also tries the legal form written without dots ("S.p.A." and "SPA" are different words for the GLEIF search).

**What does it NOT do?** No people, no contacts, no emails or phone numbers, no financial statements (only the revenue and headcount that Wikidata holds, with their dates), no ownership beyond the direct and ultimate parent, no sanctions or PEP screening, no scraping of company websites. It is not a replacement for an official extract of a business register.

**Is the LEI status legally binding?** No. The Actor reports what GLEIF publishes; GLEIF provides its data "as is". For a decision with legal effect, check the record at GLEIF.

**Licences.** GLEIF: "The data available through the Access Service are provided under the CC0 licence" (https://www.gleif.org/en/meta/lei-data-terms-of-use). Wikidata structured data: CC0 (https://www.wikidata.org/wiki/Wikidata:Licensing). **Logos and images are not downloaded**: `logoUrl` is only a link to the file page on Wikimedia Commons, where each file has its own licence: check it before any reuse. The Actor identifies itself as `CompanyProfileBot/1.0` with a contact, as the Wikimedia User-Agent policy asks.

**Which companies are covered?** GLEIF holds about 3.4 million entities that asked for a LEI (all large and listed companies, banks, funds, many others); Wikidata covers notable companies. A small business with neither is `not_found`.

### Limits, stated plainly

- A name is matched on its words: the register must contain them. Abbreviations ("IBM" for "International Business Machines") work only when Wikidata knows the abbreviation as a name of the company.
- Up to 300 GLEIF records are examined per name (three pages); a very common name may leave the right entity out: add `country` or use the LEI.
- The Wikidata part reads English labels. Revenue and headcount are the latest value on Wikidata, often not for the current year.
- Ownership is GLEIF's "Level 2" data: many companies report an exception instead of a parent.

### Integrate

Through the Apify API:

```
GET https://api.apify.com/v2/datasets/<datasetId>/items?format=json&clean=true
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('far003/company-profile-lei-wikidata').call({ companies: ['Siemens AG', '5493006W3QUS5LMH6R84', 'Q53268'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const c of items) console.log(c.query, c.status, c.lei, c.entityStatus, c.registrationStatus);
```

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("far003/company-profile-lei-wikidata").call(run_input={"companies": ["Siemens AG", "Q53268"], "country": "DE"})
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(c["query"], c["status"], c["lei"], c["matchConfidence"])
```

To keep only what needs a human look, filter on `status` (`ambiguous`, `partial`), on `matchConfidence = medium`, or on `leiLapsed` / `renewalOverdue`.

Locally: put the input in `<storage>/key_value_stores/default/INPUT.json`, then `CRAWLEE_STORAGE_DIR=$PWD/<storage> node src/main.js`. Tests (no network): `npm test`.

# Actor input Schema

## `companies` (type: `array`):

What to look up, one entry per company: a company name (Apple Inc.), a 20-character LEI (HWUPKR0MPOU8FGXBT394) or a Wikidata ID (Q312, or its wikidata.org URL). The kind is recognised automatically; a LEI with wrong check digits is reported as invalid_input, not guessed. Up to 1,000 per run.

## `country` (type: `string`):

Two-letter ISO code (US, DE, IT...). Only for names: keeps the entities of that country, which settles most ambiguous names. Ignored for LEIs and Wikidata IDs.

## `includeRelationships` (type: `boolean`):

Add the direct and ultimate parent from GLEIF (LEI and name, or the reason GLEIF gives when there is none). Costs two more GLEIF requests per company, so a run takes longer; the price is the same. Turn off for faster runs.

## `maxCandidates` (type: `integer`):

How many other entities with a similar name to list in `candidates` for a name search (0 = none). For an ambiguous name they are your choices.

## Actor input object example

```json
{
  "companies": [
    "Siemens AG",
    "5493006W3QUS5LMH6R84",
    "Q53268"
  ],
  "country": "DE",
  "includeRelationships": true,
  "maxCandidates": 3
}
```

# Actor output Schema

## `companies` (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 = {
    "companies": [
        "Apple Inc.",
        "HWUPKR0MPOU8FGXBT394",
        "Q312"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("far003/company-profile-lei-wikidata").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 = { "companies": [
        "Apple Inc.",
        "HWUPKR0MPOU8FGXBT394",
        "Q312",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("far003/company-profile-lei-wikidata").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 '{
  "companies": [
    "Apple Inc.",
    "HWUPKR0MPOU8FGXBT394",
    "Q312"
  ]
}' |
apify call far003/company-profile-lei-wikidata --silent --output-dataset

```

## MCP server setup

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

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/tY2ComYdFwmVGGmKy/builds/DK4oYZasM0UkY7j4c/openapi.json
