Routes

Routes are manually-created paths made up of sections called legs. Currently it is only possible to create routes using the Routebuilder web interface.

Detailed representation attributes  

id: integer
resource_state integer
indicates level of detail
name: string
description string
athlete object
meta or summary
distance float
meters
elevation_gain float
meters
map object
maps summary
type string
1 for ride, 2 for run
sub_type string
1 for road (ride and run), 2 for mtb, 3 for cx, 4 for trail, 5 for mixed
private boolean
starred boolean
true if authenticated athlete has starred route
timestamp integer unix timestamp
segments object
all segments that a route traverses

Summary representation attributes  

The summary representation of the route object is the same as the detailed representation, except it does NOT include these attributes:

    segments


Meta representation attributes  

id: integer
resource_state: integer
map object
maps summary


Map summary attributes  

id: integer
summary_polyline: object
resource_state: integer

Map summary attributes returned in route detailed representation only

polyline: object


Example route

{
  "athlete": {
    "id": 265720,
    "resource_state": 2
  },
  "description": "",
  "distance": 173625.6,
  "elevation_gain": 2964.6,
  "id": 1263727,
  "map": {
    "id": "r1263727",
    "summary_polyline": "qyrFxswgV|",
    "resource_state": 3
  },
  "name": "New Years Resolution - Santa Cruz Century Edition",
  "private": false,
  "resource_state": 3,
  "starred": false,
  "timestamp": 1419669292,
  "type": 1,
  "segments": [
    {
      "id": 3799,
      "resource_state": 2,
      "name": "Highway 9 - HWY236 to Skyline"
    }
  ],
  "directions": [
    {
      "distance": 0.0,
      "action": 4,
      "name": "Main Street"
    }
  ]
}

 

Retrieve a route

This request is used to retrieve details about a route. Private routes can only be accessed if owned by the authenticating user and the token has view_private permissions. For raw data associated with a route see route streams.

Parameters

route_id: integer required

Returns a detailed representation of the route.

Definition

GET https://www.strava.com/api/v3/routes/:route_id

Example request

$ curl -G https://www.strava.com/api/v3/routes/1263727 \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"

 

List routes

Lists a specific athlete’s routes. Private routes will only be included if the authenticating user is viewing their own routes and the token has view_private permissions.

Parameters

id: integer required

Returns a list of an athlete’s routes in summary representation.

Definition

GET https://www.strava.com/api/v3/athletes/:id/routes

Example request

$ curl -G https://www.strava.com/api/v3/athletes/265720/routes \
    -H "Authorization: Bearer 83ebeabdec09f6670863766f792ead24d61fe3f9"

Example response

[
  {
    "athlete": {
      "id": 19,
      "resource_state": 2
    },
    "id": 743064,
    "resource_state": 2,
    "description": "",
    "distance": 17781.6,
    "elevation_gain": 207.8
  }
]