# Komoot API (`creatormagic/komoot-api`) Actor

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.

- **URL**: https://apify.com/creatormagic/komoot-api.md
- **Developed by:** [Creator Magic](https://apify.com/creatormagic) (community)
- **Categories:** Travel, Automation, Other
- **Stats:** 36 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Komoot Route Highlights

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. You will receive a curated list of routes with ratings, distance, elevation, terrain mix, photos, GeoJSON lines, and optional GPX files you can drop straight into mapping apps.

### What you get
- A dataset containing one row per route with all headline facts (distance, elevation, ratings, terrain mix, map links, photo count, etc.).
- Optional GPX geometry stored either inline or as downloadable files, so you can load tracks into navigation software in seconds.
- Weather snapshots (when enabled) plus change hashes that make it easy to watch trend shifts between runs.

### How to use it
1. **Choose a spot** – enter a place name or supply exact latitude/longitude values. Add region IDs if you want Komoot’s curated collections mixed in.
2. **Pick your activity** – hiking, cycling, gravel riding, jogging, or trail running. You can add filters for distance, duration, and difficulty to match your audience.
3. **Decide on extras** – toggle photo galleries, GeoJSON, GPX creation, and weather notes depending on what your team needs.
4. **Run the Actor** – the default dataset instantly shows the newest routes. Download JSON/CSV or connect the dataset to your pipeline, and grab GPX files from the default key-value store if you enabled them.

### Ideal for
- Outdoor tour operators preparing destination playbooks.
- Travel and tourism teams highlighting trending trails.
- Fitness and navigation apps enriching their route libraries.
- Retail or research teams tracking which areas and sports are gaining momentum.

### Tips
- Start with the default settings to understand the data shape, then narrow the radius or max results for ongoing monitoring.
- Use the change hash to detect whether ratings or visitor counts shifted since your last run.
- When GPX generation is enabled, keep `storeGpxFiles=true` for large crawls; you can always fetch individual files as needed.

# Actor input Schema

## `locationName` (type: `string`):

Free-form place name to geocode via Komoot Photon (e.g., 'Frankfurt am Main, Germany').
## `latitude` (type: `string`):

Explicit latitude in WGS84 (decimal degrees). Overrides geocoded latitude when provided.
## `longitude` (type: `string`):

Explicit longitude in WGS84 (decimal degrees). Overrides geocoded longitude when provided.
## `radiusMeters` (type: `integer`):

Radius in meters passed to the Komoot discovery endpoint.
## `sports` (type: `array`):

Komoot sport identifiers (allowed: hike, mtb, touringbicycle, racebike, gravelride, jogging, trailrunning).
## `regionIdsCsv` (type: `string`):

Optional Komoot region identifiers (numbers) for discover_tours/for_region queries, e.g., "248,293".
## `maxItems` (type: `integer`):

Upper bound on the number of routes to fetch and output.
## `pageSize` (type: `integer`):

How many routes to request per Komoot API call (auto-reduced if the API rejects large pages).
## `difficulties` (type: `array`):

Filter Komoot routes by difficulty grade (easy/moderate/difficult).
## `minDistanceKm` (type: `string`):

Exclude routes shorter than this distance.
## `maxDistanceKm` (type: `string`):

Exclude routes longer than this distance.
## `minDurationMinutes` (type: `string`):

Exclude routes with estimated durations shorter than this value.
## `maxDurationMinutes` (type: `string`):

Exclude routes with estimated durations longer than this value.
## `includeTimeline` (type: `boolean`):

Attempt to include timeline/highlight structures (where Komoot exposes them).
## `includeWaypoints` (type: `boolean`):

Attach extracted waypoints when Komoot exposes them.
## `includeGeoJson` (type: `boolean`):

Emit GeoJSON LineString geometries for every route.
## `includeGallery` (type: `boolean`):

Fetch gallery thumbnails and metadata for each route.
## `galleryItems` (type: `integer`):

Maximum number of gallery images to pull for a route.
## `emitGpx` (type: `boolean`):

Generate GPX content from the Komoot path array and attach it to each dataset item.
## `storeGpxFiles` (type: `boolean`):

Store generated GPX files in the default key-value store instead of embedding them inline.
## `includeWeather` (type: `boolean`):

Augment each route with a 5-day Open-Meteo forecast for the start point.
## `includeRawData` (type: `boolean`):

Embed the original Komoot list + detail payloads under `raw` for debugging.
## `monitoringMode` (type: `boolean`):

When true, only emit diff-friendly metadata and change hashes.
## `requestConcurrency` (type: `integer`):

Maximum number of parallel Komoot/auxiliary HTTP requests.

## Actor input object example

```json
{
  "locationName": "Frankfurt am Main, Germany",
  "radiusMeters": 30000,
  "sports": [
    "hike"
  ],
  "maxItems": 50,
  "pageSize": 20,
  "includeTimeline": true,
  "includeWaypoints": true,
  "includeGeoJson": true,
  "includeGallery": true,
  "galleryItems": 5,
  "emitGpx": false,
  "storeGpxFiles": false,
  "includeWeather": false,
  "includeRawData": false,
  "monitoringMode": false,
  "requestConcurrency": 5
}
````

# Actor output Schema

## `routes` (type: `string`):

Download all collected routes as JSON, CSV, or via API.

## `files` (type: `string`):

Browse the default key-value store for GPX tracks or other exported files.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("creatormagic/komoot-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("creatormagic/komoot-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call creatormagic/komoot-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=creatormagic/komoot-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
