# Allabolag.se Company Data Scraper (`vhsgreed/allabolag-fresh-details`) Actor

Swedish company data from allabolag.se: search by SNI code or keyword, or feed a list of org numbers. 30+ fields per company: revenue, profit, employees, VD, phone, email, F-skatt, VAT, SNI, address. Pay-per-event pricing.

- **URL**: https://apify.com/vhsgreed/allabolag-fresh-details.md
- **Developed by:** [Karl Sundström](https://apify.com/vhsgreed) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Swedish Company Data Scraper — allabolag.se with Details

<p align="center">
  <a href="https://vhsgreed.win/actor/"><strong>vhsgreed.win/actor</strong></a> ·
  <a href="https://apify.com/vhsgreed">More actors by vhsgreed</a>
</p>

Get structured data on **any Swedish company** in minutes. This actor reads
[allabolag.se](https://www.allabolag.se), Sweden's public company registry,
and returns every registered company that matches your search, with full
detail pages for each one.

**No coding required.** Paste a keyword or a list of company numbers, press
Run, and download the results as JSON, CSV, or Excel from the Apify
dataset view.

### What you get

For every company, the actor returns 40+ fields, including:

| Category | Fields |
| --- | --- |
| Identity | Company name, org number, registration status |
| Financials | Revenue, profit, profit margin, fiscal year |
| People | VD (CEO), board members, auditors |
| Contact | Address, phone, email, website |
| Classification | SNI industry code(s), number of employees |
| Compliance | F-skatt status, VAT registration |

See the full field list in the [Input schema](#input-fields) and the actor's
output schema; every field is documented there.

### How to use it (2 minutes)

1. Open the actor and choose **Run**.
2. In **Input**, paste one of:
   - a **keyword** (for example `elbolag` or a city name) in `query`, or
   - an **SNI industry code** (for example `651200`) in `query`, or
   - a list of **org numbers** in `orgnrList` (one per line or comma
     separated) to skip search entirely.
3. Press **Start** and wait for the run to finish (a 100-company detail run
   typically takes a few minutes).
4. Open **Storage → Dataset** and export as JSON, CSV, or Excel.

#### Example input

```json
{
    "query": "651200",
    "fetchDetails": true,
    "maxResults": 100
}
```

This returns up to 100 banking companies (SNI 651200) with full detail data.

#### Example: look up specific companies

```json
{
    "orgnrList": ["556036-0793", "556791-2201"],
    "fetchDetails": true
}
```

This skips search and goes straight to the detail pages for the given
org numbers.

### Input fields

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `query` | string | — | Keyword or SNI code to search allabolag.se. Ignored when `orgnrList` is set. |
| `orgnrList` | array | — | Direct list of Swedish org numbers. Skips the search step. |
| `fetchDetails` | boolean | `true` | Visit each company's page for the full field set. Turn off for fast, search-level-only results. |
| `maxResults` | integer | `100` | Maximum number of companies (cap 1,000). |
| `debugUrls` | array | — | Internal: probe specific URLs instead of searching. |

### Pricing

Pay per event: **$0.05 per run start + $1.25 per 1,000 results.**
The default `maxTotalCharge` cap means your first ~20 results per run are
effectively free, so you can evaluate the data quality before paying
anything meaningful. No monthly rental.

### Tips

- Use `fetchDetails: false` for a fast, cheap sweep of names and org numbers,
  then a second run with `orgnrList` for details on the ones you care about.
- SNI codes give the cleanest, most reproducible industry queries.
- Results are delivered as a dataset: paginate in the API with `offset`/`limit`.

### Notes and limits

- The actor reads only public registry data.
- allabolag.se sometimes changes its markup; if a run returns fewer fields
  than expected, check the run log and open an issue on the actor page.
- Related tools: the [vhsgreed directory](https://vhsgreed.win/actor/)
  explains the managed-pipeline option and other Swedish data sources.

# Actor input Schema

## `query` (type: `string`):

Keyword (e.g. 'redovisningsbyrå') or SNI code (e.g. '43.320')

## `orgnrList` (type: `array`):

Direct list of Swedish org numbers (with or without dashes)

## `fetchDetails` (type: `boolean`):

Enrich each company from its detail page

## `maxResults` (type: `integer`):

Cap on companies returned (default 100, max 1000)

## `debugUrls` (type: `array`):

Probe arbitrary allabolag URLs; logs hits+filters per URL (debug mode, skips normal flow)

## Actor input object example

```json
{}
```

# Actor output Schema

## `companies` (type: `string`):

Dataset of Swedish company records (one per org number). Fields: orgnr, name, segment (SNI), county, municipality, addresses, email, homePage, phone, revenue, profit, employees, foundedYear, status, companyRoles, details.

## `companiesJson` (type: `string`):

Full dataset items as raw JSON, including fields hidden by the clean view.

## `runStats` (type: `string`):

Key-value store entry OUTPUT\_STATS: pushed item count, query, and orgnr count for this run.

## `runView` (type: `string`):

Inspect this run, its logs and storages in Apify Console.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vhsgreed/allabolag-fresh-details").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("vhsgreed/allabolag-fresh-details").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 '{}' |
apify call vhsgreed/allabolag-fresh-details --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vhsgreed/allabolag-fresh-details"
        }
    }
}

```

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/B9o2Xps4FDUNlfGbe/builds/84SFqsN28aKCJNhpW/openapi.json
