Who is the API for?
Dealers
Send your whole stock to BilPorten from your DMS/inventory system. New cars go online automatically, sold cars are removed.
Udviklere & apps
Build pricing tools, comparison sites or apps on top of Denmark's cleanest used-car dataset.
Leasing & finans
Pull current market prices and supply for valuation and residual-value models.
Authentication
Every call requires an API key, which we issue by agreement. The key is sent in the header X-Api-Key. Keys can be revoked instantly from our side, and we store only a hash of them.
curl "https://bilporten.dk/api/v1/listings?maerke=volkswagen&pris_til=200000" \
-H "X-Api-Key: bp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Endpoints
| Method | Path | Description | Access |
|---|---|---|---|
| GET | /api/v1/listings | Search and filter active listings | read |
| GET | /api/v1/listings/{id} | One listing with all photos | read |
| POST | /api/v1/inventory/sync | Full inventory sync (dealers) | write |
GET/api/v1/listings
Returns 24 listings per page, newest first. All parameters are optional and can be combined.
| Parameter | Example | Description |
|---|---|---|
| q | golf automat aarhus | Free text — also understands “under 150,000”, fuel and region |
| maerke | volkswagen | Make slug |
| model | golf | Model slug (requires maerke) |
| pris_fra / pris_til | 50000 / 200000 | Prisinterval i DKK |
| aargang_fra / aargang_til | 2018 / 2024 | Year |
| km_fra / km_til | 0 / 100000 | Mileage |
| drivmiddel | el,hybrid | Kommasepareret liste |
| gear | automatisk | manuel | automatisk |
| karosseri | suv,stationcar | Kommasepareret liste |
| region | Midtjylland | Region |
| saelger | forhandler | privat | forhandler |
| sort | pris_stigende | nyeste (standard) | blandet | pris_stigende | pris_faldende | km_stigende | aargang_faldende |
| side | 2 | Sidetal (1-baseret) |
Response
{
"data": [
{
"id": 13,
"url": "https://bilporten.dk/bil/hyundai-kona-1-2-puretech-sport-190-hk-2015-13",
"seller_type": "dealer",
"dealer": { "name": "Demo Biler ApS", "url": "https://bilporten.dk/forhandler/demo-biler-aps", "city": "Tønder" },
"make": "Hyundai", "model": "Kona", "variant": "1.2 PureTech Sport 190 hk",
"body_type": "suv", "model_year": 2015, "mileage_km": 143000,
"fuel": "hybrid", "transmission": "automatisk", "horsepower": 190,
"price_dkk": 240400, "price_original_dkk": null, "price_new_dkk": 457000,
"equipment": ["Adaptiv fartpilot", "Apple CarPlay", "Bakkamera"],
"location": { "zip": "4700", "city": "Næstved", "region": "Sjælland" },
"images": [{ "url": "…/uploads/listings/…/a1.webp", "thumb_url": "…/a1-thumb.webp", "width": 1600, "height": 1067 }],
"published_at": "2026-09-09T13:41:02.000Z"
}
],
"meta": { "total": 36, "page": 1, "pages": 2, "per_page": 24 }
}GET/api/v1/listings/{id}
Same structure as above, but with all photos and the full description. Returns 404 for sold or inactive listings.
curl "https://bilporten.dk/api/v1/listings/13" -H "X-Api-Key: bp_live_…"Inventory sync for dealers
With a write key, your inventory system can send the whole stock as one JSON document, for example every hour. We create new cars, update price and mileage on existing ones, and mark cars that are no longer included as sold. We also support imports from the common Danish DMS formats — contact us and we will set it up with you.
POST https://bilporten.dk/api/v1/inventory/sync
X-Api-Key: bp_live_…
Content-Type: application/json
{
"remove_missing": true, // biler der ikke er med, markeres solgt
"listings": [
{
"external_id": "DMS-48213", // jeres eget id – bruges til at matche ved næste kald
"make": "Volkswagen", "model": "Golf", "variant": "1.5 TSI Life",
"year": 2021, "first_registration": "2021-03",
"mileage_km": 48000, "fuel": "benzin", "transmission": "automatisk",
"body_type": "hatchback", "horsepower": 150, "color": "Grå",
"price_dkk": 219900, "price_new_dkk": 329900,
"description": "…", "equipment": ["Apple CarPlay", "Bakkamera"],
"plate": "AB12345", // gemmes kun – vises aldrig offentligt
"images": ["https://dms.example.dk/img/48213-1.jpg", "https://dms.example.dk/img/48213-2.jpg"],
"sold": false
}
]
}
→ 200 { "ok": true, "created": 1, "updated": 0, "sold": 0, "unchanged": 0, "errors": [], "imagesQueued": 2 }- Idempotent: send the whole stock as often as you like (e.g. hourly) — only changes are written. Max 2,000 cars per call.
- fuel: benzin · diesel · el · hybrid · plugin_hybrid · gas (English synonyms such as petrol/electric/phev are accepted). transmission: automatisk · manuel.
- Images are fetched in the background and stored in our format (WebP, EXIF stripped). If you change the image URLs, they are fetched again.
- Price reductions are automatically recorded as a “price drop” on the listing.
- Errors on individual cars do not stop the rest — they come back in errors[] with external_id and a reason.
Data fields
| Field | Type | Description |
|---|---|---|
| id | integer | Annoncens offentlige id (bruges i /listings/{id}) |
| url | string | Link to the listing on bilporten.dk |
| seller_type | "dealer" | "private" | Seller type |
| dealer | object | null | { name, url, city } for dealer listings |
| make, model, variant | string | Make, model and variant |
| body_type | string | suv, stationcar, hatchback, sedan, … |
| model_year | integer | Year |
| mileage_km | integer | Mileage |
| fuel | string | benzin, diesel, el, hybrid, plugin_hybrid, gas, andet |
| transmission | string | manuel | automatisk |
| horsepower, range_km, battery_kwh | integer | null | Tekniske data |
| price_dkk | integer | Aktuel pris i DKK inkl. moms |
| price_original_dkk | integer | null | Price before the latest drop |
| equipment | string[] | Udstyrsliste |
| location | object | { zip, city, region } — never a street address |
| images[] | object[] | { url, thumb_url, width, height } i WebP |
| published_at | ISO 8601 | Time of publication |
Errors and limits
401 unauthorizedMissing or invalid key404 not_foundThe listing does not exist / is not active429 rate_limitedMore than 1,000 calls per hour per key (can be raised by agreement)400 bad_requestUgyldige parametre
{ "error": { "code": "rate_limited", "message": "For mange kald. Grænsen er 1.000 kald i timen." } }Terms and GDPR
- The API never discloses personal data: no licence plates, VINs, private sellers' names, phone numbers or addresses.
- Data may be displayed with attribution (“Source: BilPorten”) and a link to the listing. Reselling raw data requires a separate agreement.
- The servers are in the EU. All calls are logged with key id and timestamp for 30 days for security reasons.
- Prices are agreed individually (typically a fixed monthly price based on call volume). Dealers on Pro and Unlimited get inventory sync included in the subscription.
Ready to get started?
Tell us what you want to build and how many calls you expect — we will send a test key and a quote. You can also write directly to kontakt@bilporten.dk.
A dealer? See the dealer solution — inventory sync is included in Pro and Unlimited.