Guides · Company checks
How do I look up Swedish company data in a LangChain agent?
Bind the swedish-company-data tool from the Strale LangChain toolkit to your model and give it an organisation number. The tool reads Bolagsverket, the Swedish Companies Registration Office, and costs €0.05 a call. A fuller guide to the tool is Swedish company registry API.
- LangChain
- Python
Steps
- Install
langchain-straleand a chat-model package. - Create the toolkit with your Strale API key.
- Bind
swedish-company-datato your model. - Ask about an organisation number and run the tool call the model returns.
The solution
# pip install langchain-strale langchain-openai
from langchain_strale import StraleToolkit
from langchain_openai import ChatOpenAI
toolkit = StraleToolkit(api_key="sk_live_YOUR_KEY")
tools = [t for t in toolkit.get_tools() if t.name == "swedish-company-data"]
llm = ChatOpenAI(model="gpt-4o").bind_tools(tools)
result = llm.invoke("Look up Swedish company 556703-7485")
# The model picks the tool and its arguments; your code runs the call.
for call in result.tool_calls:
tool = next(t for t in tools if t.name == call["name"])
print(tool.invoke(call["args"])) How it works
Given an organisationsnummer, the tool returns the company name, legal form, status, registration and deregistration dates, SNI industry codes, the VAT number, the registered address and a business description, and any ongoing insolvency or restructuring procedures.
It does not return revenue, employee numbers or board members, and it takes the organisation number only, not a company name.
bind_tools only lets the model propose a call. To have the model read the result and answer in words, put the same tools in one of LangChain's agent loops.
Tools in this guide
| Tool | Price per call |
|---|---|
| Swedish Company Data | €0.05 |
| Norwegian Company Data | €0.05 |
| Finnish Company Data | €0.05 |
| EU VAT Validation | €0.02 |
Company records for Sweden: inputs, output fields, source and last test.