Call the hosted Actor logiover/allabolag-scraper from Python with the official apify-client. Documentation only — the Actor runs on Apify.
pip install apify-clientfrom apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("logiover/allabolag-scraper").call(run_input={
"query": "marketing",
"maxResults": 300,
"sort": "revenueDesc",
})
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{c['companyName']} ({c.get('orgNumber')}) — rev {c.get('revenue', 'n/a')} kSEK — {c.get('ceoName', '')}")run = client.actor("logiover/allabolag-scraper").call(run_input={
"query": "restaurang",
"maxResults": 1000,
})
leads = []
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
if c.get("email"):
leads.append({
"company": c["companyName"],
"org_number": c.get("orgNumber"),
"ceo": c.get("ceoName"),
"email": c["email"],
"phone": c.get("phone"),
"city": c.get("city"),
"revenue_kSEK": c.get("revenue"),
})
print(f"{len(leads)} leads with email")with open("companies.xlsx", "wb") as f:
f.write(client.dataset(run["defaultDatasetId"]).download_items(item_format="xlsx"))Docs: apify-client Python
More: README · CLI · API / cURL · JavaScript