{
  "openapi": "3.0.1",
  "info": {
    "title": "Komoot API",
    "description": "Komoot Route Highlights turns any location preference into a ready-to-use collection of outdoor routes. Tell the Actor where you want to explore, which sports you care about, and any distance or duration limits.",
    "version": "0.1",
    "x-build-id": "sOcXQRrdDjR6xGgVc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/creatormagic~komoot-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-creatormagic-komoot-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/creatormagic~komoot-api/runs": {
      "post": {
        "operationId": "runs-sync-creatormagic-komoot-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/creatormagic~komoot-api/run-sync": {
      "post": {
        "operationId": "run-sync-creatormagic-komoot-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "locationName": {
            "title": "Location name",
            "type": "string",
            "description": "Free-form place name to geocode via Komoot Photon (e.g., 'Frankfurt am Main, Germany').",
            "default": "Frankfurt am Main, Germany"
          },
          "latitude": {
            "title": "Latitude override",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Explicit latitude in WGS84 (decimal degrees). Overrides geocoded latitude when provided."
          },
          "longitude": {
            "title": "Longitude override",
            "pattern": "^-?\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Explicit longitude in WGS84 (decimal degrees). Overrides geocoded longitude when provided."
          },
          "radiusMeters": {
            "title": "Search radius (m)",
            "minimum": 1000,
            "maximum": 200000,
            "type": "integer",
            "description": "Radius in meters passed to the Komoot discovery endpoint.",
            "default": 30000
          },
          "sports": {
            "title": "Sports to include",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Komoot sport identifiers (allowed: hike, mtb, touringbicycle, racebike, gravelride, jogging, trailrunning).",
            "items": {
              "type": "string",
              "enum": [
                "hike",
                "mtb",
                "touringbicycle",
                "racebike",
                "gravelride",
                "jogging",
                "trailrunning"
              ],
              "enumTitles": [
                "Hiking",
                "Mountain biking",
                "Bike touring",
                "Road cycling",
                "Gravel ride",
                "Jogging",
                "Trail running"
              ]
            },
            "default": [
              "hike"
            ]
          },
          "regionIdsCsv": {
            "title": "Region IDs (comma-separated)",
            "type": "string",
            "description": "Optional Komoot region identifiers (numbers) for discover_tours/for_region queries, e.g., \"248,293\"."
          },
          "maxItems": {
            "title": "Max routes",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper bound on the number of routes to fetch and output.",
            "default": 50
          },
          "pageSize": {
            "title": "API page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many routes to request per Komoot API call (auto-reduced if the API rejects large pages).",
            "default": 20
          },
          "difficulties": {
            "title": "Difficulty filter",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter Komoot routes by difficulty grade (easy/moderate/difficult).",
            "items": {
              "type": "string",
              "enum": [
                "easy",
                "moderate",
                "difficult"
              ],
              "enumTitles": [
                "Easy",
                "Moderate",
                "Difficult"
              ]
            }
          },
          "minDistanceKm": {
            "title": "Min distance (km)",
            "pattern": "^\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Exclude routes shorter than this distance."
          },
          "maxDistanceKm": {
            "title": "Max distance (km)",
            "pattern": "^\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Exclude routes longer than this distance."
          },
          "minDurationMinutes": {
            "title": "Min duration (min)",
            "pattern": "^\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Exclude routes with estimated durations shorter than this value."
          },
          "maxDurationMinutes": {
            "title": "Max duration (min)",
            "pattern": "^\\d+(\\.\\d+)?$",
            "type": "string",
            "description": "Exclude routes with estimated durations longer than this value."
          },
          "includeTimeline": {
            "title": "Include timeline & highlights",
            "type": "boolean",
            "description": "Attempt to include timeline/highlight structures (where Komoot exposes them).",
            "default": true
          },
          "includeWaypoints": {
            "title": "Include waypoints",
            "type": "boolean",
            "description": "Attach extracted waypoints when Komoot exposes them.",
            "default": true
          },
          "includeGeoJson": {
            "title": "Include GeoJSON geometry",
            "type": "boolean",
            "description": "Emit GeoJSON LineString geometries for every route.",
            "default": true
          },
          "includeGallery": {
            "title": "Include gallery photos",
            "type": "boolean",
            "description": "Fetch gallery thumbnails and metadata for each route.",
            "default": true
          },
          "galleryItems": {
            "title": "Gallery items per route",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of gallery images to pull for a route.",
            "default": 5
          },
          "emitGpx": {
            "title": "Generate GPX strings",
            "type": "boolean",
            "description": "Generate GPX content from the Komoot path array and attach it to each dataset item.",
            "default": false
          },
          "storeGpxFiles": {
            "title": "Persist GPX to key-value store",
            "type": "boolean",
            "description": "Store generated GPX files in the default key-value store instead of embedding them inline.",
            "default": false
          },
          "includeWeather": {
            "title": "Include weather forecast",
            "type": "boolean",
            "description": "Augment each route with a 5-day Open-Meteo forecast for the start point.",
            "default": false
          },
          "includeRawData": {
            "title": "Attach raw API payloads",
            "type": "boolean",
            "description": "Embed the original Komoot list + detail payloads under `raw` for debugging.",
            "default": false
          },
          "monitoringMode": {
            "title": "Monitoring mode",
            "type": "boolean",
            "description": "When true, only emit diff-friendly metadata and change hashes.",
            "default": false
          },
          "requestConcurrency": {
            "title": "HTTP concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of parallel Komoot/auxiliary HTTP requests.",
            "default": 5
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}