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. Possible values: 1 -> ‘meta’, 2 -> ‘summary’, 3 -> ‘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
DEPRECATED
created_at: time string
updated_at: time string
estimated_moving_time integer seconds
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
indicates level of detail. Possible values: 1 -> ‘meta’, 2 -> ‘summary’, 3 -> ‘detail’
name: string
map object
maps summary


Map summary attributes  

id: integer
summary_polyline: object
resource_state: integer
indicates level of detail. Possible values: 1 -> ‘meta’, 2 -> ‘summary’, 3 -> ‘detail’

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,
  "created_at": "2009-09-28T02:29:27Z",
  "updated_at": "2017-07-04T16:48:36Z",
  "type": 1,
  "segments": [
    {
      "id": 3799,
      "resource_state": 2,
      "name": "Highway 9 - HWY236 to Skyline"
    }
  ]
}

 

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

Returns a list of the routes created by the authenticated athlete using their athlete ID.

Private routes will only be included if the authenticating user is viewing their own routes and the token has view_private permissions. Pagination is supported.

Parameters

type: string optional
‘run’ or ‘ride’
after: unix timestamp optional
seconds since UNIX epoch, results will only include routes whose updated_at is after this value

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

Definition

GET https://www.strava.com/api/v3/athletes/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
  }
]