---
name: gleif-lei-ingestion
description: "How to get GLEIF LEI Golden Copy and API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load current Canadian GLEIF LEI records into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/gleif-lei
Provider: https://www.gleif.org/en/lei-data/gleif-golden-copy
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key. The public API returns JSON over HTTPS.
- Golden Copy and delta files provide bulk XML, CSV and JSON alternatives.

## Request
```bash
curl 'https://api.gleif.org/api/v1/lei-records?filter%5Bentity.legalAddress.country%5D=CA&page%5Bsize%5D=100'
```

## Format
JSON:API records with LEI, entity names and addresses, jurisdiction and category, registration status and dates, issuer, validation details, relationships and response metadata including Golden Copy publication time and pagination.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""Current Canadian LEI records from the GLEIF API -> pandas -> Parquet."""
import requests
import pandas as pd

URL = "https://api.gleif.org/api/v1/lei-records"
params = {"filter[entity.legalAddress.country]": "CA", "page[size]": 100}
response = requests.get(URL, params=params, timeout=60)
response.raise_for_status()
payload = response.json()
rows = []
for item in payload["data"]:
    attrs = item["attributes"]
    entity = attrs["entity"]
    registration = attrs["registration"]
    rows.append({
        "lei": attrs["lei"],
        "legal_name": entity["legalName"]["name"],
        "country": entity["legalAddress"]["country"],
        "entity_status": entity["status"],
        "registration_status": registration["status"],
        "last_update": registration["lastUpdateDate"],
    })
df = pd.DataFrame(rows)
df["last_update"] = pd.to_datetime(df["last_update"], utc=True)
df.to_parquet("gleif_canada_lei_sample.parquet", index=False)
print(len(df), "LEI records", "of", payload["meta"]["pagination"]["total"],
      "Canadian matches; Golden Copy", payload["meta"]["goldenCopy"]["publishDate"])
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 100 LEI records of 59359 Canadian matches; Golden Copy 2026-11-01T08:00:00Z

## Limits
- Rate limit: 60 requests per minute per user.
- Search responses are paginated; follow response pagination metadata and links for further pages.
- Use Golden Copy and delta files instead of paging the API for bulk synchronization.

## Quirks
- The response follows JSON:API: record fields are nested under data[].attributes, while related links are separate.
- Registration status and entity status are different fields; preserve both.
- The terms state that reference data originates in third-party applications and may not be accurate, current or unique for an entity.

## Terms and attribution
- LEIs and Legal Entity Reference Data are released under CC0 1.0.
- The access service is free, but GLEIF may suspend or modify it.
- Terms page: https://www.gleif.org/en/meta/lei-data-terms-of-use

## Sources
- https://www.gleif.org/en/lei-data/gleif-golden-copy: "GLEIF makes available three sets of updated Golden Copy Files daily (02:00 UTC, 10:00 UTC, 18:00 UTC)."
- https://www.gleif.org/en/lei-data/gleif-api: "The GLEIF API is based on the data found in the GLEIF Golden Copy."
- https://api.gleif.org/docs: "Rate limiting is currently set at 60 requests, per minute, per user, for all users."
- https://www.gleif.org/en/meta/lei-data-terms-of-use: "The data available through the Access Service are provided under the CC0 licence"

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
