Bilbasen & Bilinfo API
Danish automotive marketplace and vehicle inventory APIs for car listings, valuations, and dealer syndication.
Integrate xAI Grok and Grok Bot with Danish digital infrastructure, public registers, and real-time open data via structured OpenAI-compatible tool calling and API endpoints.
Verified APIs, MCP servers, and data feeds ready for Grok Bot integration.
import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Bilbasen & Bilinfo API
tools = [
{
"type": "function",
"function": {
"name": "query_bilbasen",
"description": "Danish automotive marketplace and vehicle inventory APIs for car listings, valuations, and dealer syndication.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Bilbasen & Bilinfo API",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Bilbasen & Bilinfo API",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Boliga.dk
tools = [
{
"type": "function",
"function": {
"name": "query_boliga",
"description": "Danish property sales history and valuation site with partially accessible data endpoints.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Boliga.dk",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Boliga.dk",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for CVR — Business Registry API
tools = [
{
"type": "function",
"function": {
"name": "query_cvr-api",
"description": "Central Business Register API giving machine access to all Danish companies, CVR numbers, ownership, and industry codes.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for CVR — Business Registry API",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in CVR — Business Registry API",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Corti API
tools = [
{
"type": "function",
"function": {
"name": "query_corti",
"description": "Healthcare AI API for medical transcription, clinical documentation, coding, and agentic workflows.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Corti API",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Corti API",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for DAWA MCP Server (ITK)
tools = [
{
"type": "function",
"function": {
"name": "query_mcp-dawa-itk",
"description": "Official municipal MCP server for searching Danish addresses and geodata via DAWA.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for DAWA MCP Server (ITK)",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in DAWA MCP Server (ITK)",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for DAWA — Danish Addresses Web API
tools = [
{
"type": "function",
"function": {
"name": "query_dawa",
"description": "REST API for Danish addresses, postcodes, cadastre, and administrative geodata.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for DAWA — Danish Addresses Web API",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in DAWA — Danish Addresses Web API",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for DMI Open Data APIs
tools = [
{
"type": "function",
"function": {
"name": "query_dmi-open-data",
"description": "Meteorological, climate, ocean, radar, and lightning observation REST and OGC APIs.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for DMI Open Data APIs",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in DMI Open Data APIs",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for DR — Danish Broadcasting
tools = [
{
"type": "function",
"function": {
"name": "query_dr",
"description": "DR provides semi-official APIs for program listings, news content, and podcast feeds.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for DR — Danish Broadcasting",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in DR — Danish Broadcasting",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Danmarks Miljøportal
tools = [
{
"type": "function",
"function": {
"name": "query_danmarks-miljoeportal",
"description": "National environmental data portal with web services and datasets across nature, water, climate, and land use.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Danmarks Miljøportal",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Danmarks Miljøportal",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Danmarks Nationalbank — Data API
tools = [
{
"type": "function",
"function": {
"name": "query_nationalbanken-data",
"description": "The Danish central bank provides open statistical data including exchange rates, monetary data, and financial statistics.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Danmarks Nationalbank — Data API",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Danmarks Nationalbank — Data API",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Danske Bank Developer Portal
tools = [
{
"type": "function",
"function": {
"name": "query_danske-bank-api",
"description": "Open Banking PSD2, Corporate Treasury, and FX REST APIs from Denmark’s largest bank.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Danske Bank Developer Portal",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Danske Bank Developer Portal",
},
],
tools=tools,
)
print(response.choices[0].message)import os
from openai import OpenAI
# Initialize xAI client for Grok Bot
client = OpenAI(
api_key=os.environ.get("XAI_API_KEY", "<YOUR_XAI_API_KEY>"),
base_url="https://api.x.ai/v1",
)
# Grok Bot Function Definition for Danske Bank Developer Portal
tools = [
{
"type": "function",
"function": {
"name": "query_danske-bank",
"description": "Open banking and commercial APIs for account balances, transaction histories, and payment initiation.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Identifier or search query for Danske Bank Developer Portal",
},
},
"required": ["query"],
},
},
}
]
response = client.chat.completions.create(
model="grok-beta",
messages=[
{
"role": "system",
"content": "You are Grok Bot, connected to Danish public data and verified API tools.",
},
{
"role": "user",
"content": "Look up records in Danske Bank Developer Portal",
},
],
tools=tools,
)
print(response.choices[0].message)Need to generate custom MCP servers, scrape portals, or run headless automations with Grok Bot?
High-level Python & TypeScript framework for building MCP servers
FastMCP provides clean decorators and microframework patterns to write production-ready MCP tools in under 10 lines of code.
Turn entire websites and portals into clean, LLM-ready Markdown
Firecrawl crawls, handles JavaScript rendering, bypasses anti-bot barriers, and outputs clean Markdown structured for AI agent ingestion.
W3C proposed standard for exposing structured AI tools directly on the web
WebMCP allows web applications to expose typed JavaScript tools and annotated HTML forms directly to in-browser AI agents, replacing fragile DOM scraping.
Pass the structured OpenAI-compatible tool declaration provided on this page into your xAI client request targeting the api.x.ai/v1 endpoint.
Yes, Grok Bot can execute live function calls to query CVR company data, DAWA addresses, DMI weather feeds, and public datasets in real time.
Public Danish APIs (such as CVR, DAWA, and DMI) do not require credentials, while private or restricted endpoints require API tokens configured in environment variables.