---
name: canada-autonomous-sanctions-list-ingestion
description: "How to get Canada Consolidated Autonomous Sanctions List data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load Canada's autonomous sanctions XML into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/canada-autonomous-sanctions-list
Provider: https://www.international.gc.ca/world-monde/international_relations-relations_internationales/sanctions/consolidated-consolide.aspx?lang=eng
Checked against the provider's documentation: 2026-11-04

## Access
- No account or key for the XML resource.
- Check the source page and regulations because the file can lag legal changes.

## Request
```bash
curl -O 'https://www.international.gc.ca/world-monde/assets/office_docs/international_relations-relations_internationales/sanctions/sema-lmes.xml'
```

## Format
XML data-set with one record per listed subject and bilingual elements for programme, names, aliases, dates, schedule, item and other identifiers.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""Canada autonomous sanctions XML -> pandas -> Parquet. No key."""
import xml.etree.ElementTree as ET
import requests
import pandas as pd

URL = "https://www.international.gc.ca/world-monde/assets/office_docs/international_relations-relations_internationales/sanctions/sema-lmes.xml"
r = requests.get(URL, timeout=60)
r.raise_for_status()
root = ET.fromstring(r.content)
rows = [{child.tag: (child.text or "").strip() for child in record} for record in root.findall("record")]
df = pd.DataFrame(rows)
df.to_parquet("canada_autonomous_sanctions.parquet", index=False)
print(len(df), "records across", df["Country-Pays"].nunique(), "country/programme labels")
```
Run by us on 2026-11-04 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 5708 records across 19 country/programme labels

## Limits
- Rate limits: Not stated.
- The provider warns the list may not be current.

## Quirks
- Bilingual optional elements produce sparse columns.
- Name matches alone are not legal conclusions.
- Check the governing regulations.

## Terms and attribution
- The dataset uses the Open Government Licence – Canada.
- Acknowledge the source and do not imply endorsement.
- Terms page: https://open.canada.ca/en/open-government-licence-canada

## Sources
- https://www.international.gc.ca/world-monde/international_relations-relations_internationales/sanctions/consolidated-consolide.aspx?lang=eng: "The inclusion of these names on this list is for administrative purposes only."
- https://open.canada.ca/data/en/dataset/ab076f2e-94b1-4039-bb3d-58002deb826d: "Licence: Open Government Licence - Canada"

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