# Allabolag Scraper - Swedish Companies, Revenue & Profit (`scrapewise/allabolag-scraper`) Actor

Scrape allabolag.se Swedish companies by trade word or search link, optionally by city: org number, legal form, address, website, revenue, profit, employees and financial year. Sole traders are skipped.

- **URL**: https://apify.com/scrapewise/allabolag-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 company delivereds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Allabolag Scraper: Swedish companies by trade, with org number, address, revenue and profit

Scrape allabolag.se, the Swedish company register, by trade word or search link. Each company becomes one row with its
organisation number, legal form (AB, HB, KB, economic association), registered address, city, county, website, industry,
**revenue, profit, employees and the year of the latest accounts**. Optionally the company page adds the VAT and F-tax
registration fields. Sole traders are skipped, and no person, role, e-mail or phone number is ever written to the dataset.

### At a glance

| What | Price |
|---|---|
| Company delivered | **US$ 1.00 per 1,000 companies** (US$ 0.001 each) |
| Run start | US$ 0.005 per run |

- 500 companies = **US$ 0.50** plus the run start.
- Error rows, duplicates, sole traders and companies already delivered in an earlier run (`onlyNew`) are never charged.
- `maxItems` is a hard cap for the whole run. A spending limit set on the run stops it cleanly with everything delivered
  so far.

### Quick start

Every company in the construction trade (bygg), up to 50:

```json
{
  "searchQueries": ["bygg"],
  "maxItems": 50
}
```

Only companies in Stockholm county, with the company page details:

```json
{
  "searchQueries": ["bygg"],
  "location": "Stockholm",
  "includeDetails": true,
  "maxItems": 200
}
```

A search link copied from allabolag.se (the address bar after you search on the site):

```json
{
  "startUrls": ["https://www.allabolag.se/bransch-s%C3%B6k?q=konsulter"],
  "maxItems": 100
}
```

### Input

| Field | Type | What it does |
|---|---|---|
| `searchQueries` | list of text | Trade or company words in Swedish, one search each. Example: `bygg`, `konsulter`, `snickeri`. |
| `startUrls` | list of links | allabolag.se search links, by trade or by company name. The word in the link is used. |
| `location` | text | Keeps only companies whose county, municipality or post place matches, for example `Stockholm` or `Göteborg`. Empty = all of Sweden. |
| `includeDetails` | yes or no | Opens each company page for the registration fields. Slower, and more proxy traffic. Default: no. |
| `maxItems` | whole number | Hard cap for the run across all searches. Default 50. `0` = no cap. |
| `onlyNew` | yes or no | Remembers the companies delivered in earlier runs of the same search and delivers only new ones. Use it on a schedule. |
| `proxyConfiguration` | object | Apify Proxy with a Swedish residential IP by default. Change it only if you know you need to. |

`bygg` returns the companies the site finds for that word, in the order the site gives them (relevance).

### Output fields

Every row has `type` (`company` or `error`), `scrapedAt`, `sourceQuery`, `errorCode` and `error`. Company rows have:

| Field | Meaning |
|---|---|
| `orgnr` | Swedish organisation number, digits only |
| `companyId` | The site's company id, used in the company page link |
| `name` | Trading name on the site |
| `legalName` | Registered name, with the legal form at the end |
| `legalForm` | Aktiebolag (AB), Handelsbolag (HB), Kommanditbolag (KB), Ekonomisk förening or Stiftelse, from the registered name |
| `status` | Status the site shows, when it shows one |
| `industry` | Main industry (ramo) as the site classifies it |
| `industries` | Every industry the site lists for the company |
| `address`, `zipCode`, `city` | Registered visitor address and post place |
| `municipality`, `county`, `countryPart` | Location as the site classifies it |
| `latitude`, `longitude` | Coordinates of the municipality, when the site has them |
| `website` | Company website as the site lists it |
| `description` | Short company description written by the company, when it has one |
| `revenue` | Latest revenue, in thousands of SEK (tkr), as the site lists it |
| `profit` | Latest profit, in thousands of SEK (tkr), as the site lists it |
| `currency` | Currency of the amounts above (SEK) |
| `employees` | Number of employees the site lists |
| `financialsYear` | Year and month of the latest accounts the site has |
| `url` | Company page on allabolag.se |

With `includeDetails` on, the row also gets the registration fields the company page shows: `registeredForVat`,
`registeredForVatDescription`, `registeredForPayrollTax`, `registeredForNav`, `registeredAsEnterprise`, and
`shareCapital` or `capital` when the site lists one. A field the page does not show is left empty (`null`).

Phone numbers and e-mail addresses are never written: the company's own contact lines are left out of the dataset.
Board members, managers, owners and any other person listed on the site are never written either.

### Example row

A row from a test on 10 Nov 2026 (the search "bygg", first page), trimmed to the main fields:

```json
{
  "type": "company",
  "orgnr": "5569442501",
  "companyId": "2K3WHC5I5YDMJ",
  "name": "Aceve Sverige AB",
  "legalName": "Aceve Sverige AB",
  "legalForm": "Aktiebolag (AB)",
  "industry": "Datakonsulter",
  "address": "Torsgatan 11",
  "zipCode": "111 23",
  "city": "Stockholm",
  "municipality": "Stockholm",
  "county": "Stockholm",
  "website": "https://www.aceve.com",
  "revenue": 180010,
  "profit": 3932,
  "currency": "SEK",
  "employees": 123,
  "financialsYear": "2024-12",
  "url": "https://www.allabolag.se/foretag/aceve-sverige-ab/stockholm/datakonsulter/2K3WHC5I5YDMJ",
  "sourceQuery": "bygg",
  "errorCode": null,
  "error": null
}
```

### Errors

Error rows cost nothing and tell you what happened:

| `errorCode` | Meaning |
|---|---|
| `INVALID_INPUT` | A value does not fit the input, for example a `maxItems` that is not a number. |
| `INVALID_URL` | The link is not an allabolag.se search link. |
| `NO_RESULTS` | The site has no company for the word. Try another word. |
| `COUNTRY_BLOCKED` | The site refused the connection from the proxy's country. Run it again later. |
| `BLOCKED` | The site refused every attempt for the search. Run it again in a few minutes. |
| `UNEXPECTED` | Something else stopped the run. The companies already delivered stay in the dataset and are charged. |

### Integrations, scheduling and AI agents

- **Schedules:** set `onlyNew` to true and a daily or weekly schedule delivers only the companies that appeared since
  the last run of the same search.
- **Export:** download the dataset as JSON, CSV, Excel or XML from the run page, or through the API.
- **Make, n8n, Zapier:** connect the dataset to a spreadsheet, a CRM or a database when the run finishes.
- **Apify MCP server:** an AI agent can start this Actor and read the companies as a tool.

### FAQ

**Do you return the directors or the people behind a company?**
No. The dataset has the company only. Persons listed on the site are never written.

**Are sole traders (enskild firma) included?**
No. A sole trader's name is a person's name, so these rows are skipped and not charged. The skipped count goes into
the run statistics.

**Where do the revenue and profit numbers come from?**
From the company list on allabolag.se, as the site shows them: the latest accounts the company filed, in thousands of
SEK. Check the unit against the company page before you use the numbers in a report.

**Why is there a Swedish proxy by default?**
The default setting uses a Swedish residential IP. You can change it in the proxy field.

**Does it find a company by its organisation number?**
Not in this version. Search by the trade word or the company name in a search link, then filter by `location`.

**How many companies can one search return?**
The site shows a limited number of pages for each search. A broad word such as `bygg` has more companies than the site
pages through, so narrow it with a second word in the link or with `location`.

### Limitations

- The site lists companies by search. A very broad search can run out of pages before every company is delivered.
- The company page fields (`includeDetails`) depend on what the page shows for each company. A missing field is `null`.
- Revenue and profit are the latest figures the site has. They can be a year or more old for small companies.
- Companies with no accounts filed have empty financial fields.
- The site can change its layout. If a run returns only error rows for a word that worked before, run it again and
  check the status message.

### Changelog

- **0.1** (10 Nov 2026): first version. Search by trade word or search link, optional location filter, company rows
  with registration, address, revenue, profit and employees, optional company page details, `onlyNew`.

# Actor input Schema

## `searchQueries` (type: `array`):

Trade or company words in Swedish, one per line, for example bygg (construction). Each word is one search.

## `startUrls` (type: `array`):

Optional: allabolag.se search links copied from the address bar (industry search or company name search).

## `location` (type: `string`):

Optional: keep only companies in this county, municipality or post place, in Swedish, for example Stockholm. Empty = all of Sweden.

## `includeDetails` (type: `boolean`):

On: opens each company page for the registration fields (VAT and F-tax status, share capital when the site lists it). Slower and uses more proxy traffic.

## `maxItems` (type: `integer`):

Hard cap for the whole run, across all searches. 0 = no cap.

## `onlyNew` (type: `boolean`):

On: remembers the companies delivered in earlier runs of the same search (in your account) and delivers only new ones. Skipped companies are free.

## `proxyConfiguration` (type: `object`):

Apify Proxy with a Swedish residential IP by default. Change it only if you know you need to.

## Actor input object example

```json
{
  "searchQueries": [
    "bygg"
  ],
  "includeDetails": false,
  "maxItems": 50,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

# 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 = {
    "searchQueries": [
        "bygg"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/allabolag-scraper").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 = {
    "searchQueries": ["bygg"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/allabolag-scraper").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 '{
  "searchQueries": [
    "bygg"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapewise/allabolag-scraper --silent --output-dataset

```

## MCP server setup

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

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/Rv6TBPMP7kDTouWSl/builds/OAyqU0TsvavfA0bie/openapi.json
