Getting Started

Base URL

https://liveparking.eu/api/v1

Authentication

No authentication required. The API is free and open to use.

CORS

Cross-origin requests are enabled. Use from any domain.

Rate Limiting

60 requests per minute. Please use responsibly.

Wichtiger Hinweis für Projekte

Bevor Sie diese API in einem produktiven Projekt verwenden, bitten wir Sie, uns zu kontaktieren. Dies ermöglicht uns:

  • Ihre Nutzung zu erfassen und angemessene Rate-Limits einzurichten
  • Ihnen Support und Updates zu Änderungen bereitzustellen
  • Die Stabilität und Verfügbarkeit der API sicherzustellen

Für Tests und Entwicklungszwecke können Sie die API ohne vorherige Kontaktaufnahme nutzen.

API Endpoints

GET /api/v1

Returns API status and available endpoints.

Query Parameters

No parameters required

Example Request

GET /api/v1

Example Response

{
  "status": "ok",
  "message": "LiveParking API v1",
  "version": "1.0.0",
  "endpoints": {
    "cities": "/api/v1/cities",
    "locations": "/api/v1/locations"
  },
  "documentation": "/docs"
}

Error Responses

500 Internal Server Error
GET /api/v1/cities

Get a list of all available cities with their current availability statistics.

Query Parameters

No parameters required

Example Request

GET /api/v1/cities

Example Response

{
  "cities": [
    {
      "id": "berlin",
      "name": "Berlin",
      "availability": 67,
      "totalAvailable": 3421,
      "totalCapacity": 5104
    },
    {
      "id": "koeln",
      "name": "Köln",
      "availability": 45,
      "totalAvailable": 1234,
      "totalCapacity": 2740
    }
  ]
}

Error Responses

500 Internal Server Error
GET /api/v1/locations

Get parking locations filtered by city OR by geolocation. Must provide EITHER city OR both lat and lon.

Query Parameters

city string (optional)

City ID (e.g., "koeln", "berlin"). Use this for direct city lookup.

lat number (optional)

Latitude coordinate (-90 to 90). Required if using geolocation mode.

lon number (optional)

Longitude coordinate (-180 to 180). Required if using geolocation mode.

limit number (optional)

Maximum number of locations to return.

Example Requests

GET /api/v1/locations?city=koeln
GET /api/v1/locations?lat=50.9375&lon=6.9603
GET /api/v1/locations?lat=50.9375&lon=6.9603&limit=10

Example Response (with city)

{
  "city": "koeln",
  "count": 45,
  "locations": [
    {
      "id": "am-hof",
      "name": "Am Hof",
      "coordinates": {
        "lat": 50.9375,
        "lng": 6.9603
      },
      "available": 145,
      "capacity": 300,
      "status": "active"
    },
    {
      "id": "gross-st-martin",
      "name": "Groß St. Martin",
      "coordinates": {
        "lat": 50.9368,
        "lng": 6.9618
      },
      "available": 89,
      "capacity": 200,
      "status": "active"
    }
  ]
}

Example Response (with geolocation)

{
  "city": "koeln",
  "count": 10,
  "locations": [
    {
      "id": "am-hof",
      "name": "Am Hof",
      "coordinates": {
        "lat": 50.9375,
        "lng": 6.9603
      },
      "available": 145,
      "capacity": 300,
      "status": "active",
      "distance": 0.5
    }
  ]
}

Note: When using geolocation, locations are sorted by distance and include a distance field in kilometers.

Error Responses

400 Bad Request - Missing or invalid parameters
404 Not Found - City not supported
500 Internal Server Error

Response Caching

API responses include cache headers to optimize performance:

  • /api/v1/cities - Cached for 5 minutes
  • /api/v1/locations - Cached for 1-2 minutes
  • Data updates reflect real-time parking guidance system information