Allabolag4J is a lightweight Java library for fetching company information from Allabolag.se. It wraps parsed JSON data from the website into easy-to-use Java objects, allowing developers to access company details programmatically.
- Fetch company data by organization number (orgNr)
- Access company details:
- Name
- Organization number
- Business unit type
- Industries (SNI codes)
- Adress
- Marketing protection status
- Retrieve full JSON representation of the company for advanced use cases
- Lightweight and minimal dependencies (Jsoup + Jackson Databind)
- Ready-to-use Java objects, no manual JSON parsing required
- Java 25
- Maven or Gradle
Include Allabolag4J as a dependency using JitPack: You can find the releases and available versions at JitPack
Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.fmazmz</groupId>
<artifactId>allabolag4j</artifactId>
<version>{VERSION-TAG}</version>
</dependency>Gradle
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.YourUsername:allabolag4j:{VERSION-TAG}'
}
import com.org.allabolag4j.AllabolagClient;
import com.org.allabolag4j.CompanyWrapper;
import java.io.IOException;
public class Demo {
static void main(String[] args) throws IOException {
AllabolagClient client = new AllabolagClient();
CompanyWrapper company = client.getCompany("0000000000"); // Add ORG Number
System.out.println("Company name: " + company.getName());
System.out.println("Industries: " + company.getIndustries());
System.out.println("OrgNr: " + company.getOrgNr());
System.out.println("Location: " + company.getLocation());
System.out.println("isMarketingProtected: " + company.isMarketingProtected());
System.out.println("Business Unit Type: " + company.getBusinessUnitType());
System.out.println("FULL DATA: " + company.getAllData());
}
}- Jsoup – for parsing HTML
- Jackson Databind – for JSON parsing
This project is licensed under the MIT License – see the LICENSE file for details.
Firas M.