EUREG Documentation

Code Examples

Common usage patterns for the EUREG API in Python, JavaScript, and cURL.

Monitor new insolvencies

Poll for new insolvency filings across all jurisdictions:

import requests
from datetime import date, timedelta

API_KEY = "eureg_live_..."
BASE = "https://api.eureg.io/api/v1"
yesterday = (date.today() - timedelta(days=1)).isoformat()

resp = requests.get(
    f"{BASE}/announcements",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={
        "category": "insolvency_filing,winding_up",
        "date_from": yesterday,
        "per_page": 100,
    },
)

for item in resp.json()["data"]:
    entities = ", ".join(e["name"] for e in item["entities"])
    print(f"[{item['jurisdiction']}] {item['title']} ({entities})")

Track a specific company

Find a company by tax ID and retrieve its full event timeline:

import requests

API_KEY = "eureg_live_..."
BASE = "https://api.eureg.io/api/v1"

# Find entity by tax ID
resp = requests.get(
    f"{BASE}/entities",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"tax_id": "A28023430"},
)
entity = resp.json()["data"][0]
print(f"Found: {entity['name']} ({entity['status']})")

# Get timeline
timeline_resp = requests.get(
    f"{BASE}/entities/{entity['id']}/timeline",
    headers={"Authorization": f"Bearer {API_KEY}"},
)
for event in timeline_resp.json()["events"]:
    print(f"  {event['date']}: [{event['category']}] {event['title']}")

Search EU procurement

Search for public procurement tenders matching specific criteria:

import requests

API_KEY = "eureg_live_..."
BASE = "https://api.eureg.io/api/v1"

resp = requests.get(
    f"{BASE}/search",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={
        "q": "software development",
        "jurisdiction": "EU",
        "category": "tender_notice",
        "per_page": 10,
    },
)

results = resp.json()
print(f"Found {results['pagination']['total']} matching tenders")
for hit in results["data"]:
    print(f"  {hit['title']} ({hit['publication_date']})") 

Paginate through all results

Handle pagination to retrieve all matching records:

import requests

def fetch_all(base_url, headers, params):
    """Fetch all pages of a paginated endpoint."""
    all_items = []
    page = 1
    while True:
        resp = requests.get(
            base_url,
            headers=headers,
            params={**params, "page": page, "per_page": 100},
        )
        data = resp.json()
        all_items.extend(data["data"])
        if page >= data["pagination"]["total_pages"]:
            break
        page += 1
    return all_items

items = fetch_all(
    "https://api.eureg.io/api/v1/announcements",
    {"Authorization": "Bearer YOUR_API_KEY"},
    {"jurisdiction": "FR", "date_from": "2025-01-01"},
)
print(f"Fetched {len(items)} announcements")