CarPorten
BilPorten API v1

Car data and inventory integration — through a simple REST API

Search all active listings, fetch complete car data with photos, or sync your entire stock to BilPorten automatically from your DMS. JSON over HTTPS, key-based access, Danish support.

Price is agreed individually based on usage. Write to kontakt@bilporten.dk — we reply within one business day.

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

MethodPathDescriptionAccess
GET/api/v1/listingsSearch and filter active listingsread
GET/api/v1/listings/{id}One listing with all photosread
POST/api/v1/inventory/syncFull inventory sync (dealers)write

GET/api/v1/listings

Returns 24 listings per page, newest first. All parameters are optional and can be combined.

ParameterExampleDescription
qgolf automat aarhusFree text — also understands “under 150,000”, fuel and region
maerkevolkswagenMake slug
modelgolfModel slug (requires maerke)
pris_fra / pris_til50000 / 200000Prisinterval i DKK
aargang_fra / aargang_til2018 / 2024Year
km_fra / km_til0 / 100000Mileage
drivmiddelel,hybridKommasepareret liste
gearautomatiskmanuel | automatisk
karosserisuv,stationcarKommasepareret liste
regionMidtjyllandRegion
saelgerforhandlerprivat | forhandler
sortpris_stigendenyeste (standard) | blandet | pris_stigende | pris_faldende | km_stigende | aargang_faldende
side2Sidetal (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

FieldTypeDescription
idintegerAnnoncens offentlige id (bruges i /listings/{id})
urlstringLink to the listing on bilporten.dk
seller_type"dealer" | "private"Seller type
dealerobject | null{ name, url, city } for dealer listings
make, model, variantstringMake, model and variant
body_typestringsuv, stationcar, hatchback, sedan, …
model_yearintegerYear
mileage_kmintegerMileage
fuelstringbenzin, diesel, el, hybrid, plugin_hybrid, gas, andet
transmissionstringmanuel | automatisk
horsepower, range_km, battery_kwhinteger | nullTekniske data
price_dkkintegerAktuel pris i DKK inkl. moms
price_original_dkkinteger | nullPrice before the latest drop
equipmentstring[]Udstyrsliste
locationobject{ zip, city, region } — never a street address
images[]object[]{ url, thumb_url, width, height } i WebP
published_atISO 8601Time of publication

Errors and limits

  • 401 unauthorizedMissing or invalid key
  • 404 not_foundThe listing does not exist / is not active
  • 429 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.