Get a course's line
ourpr_get_course_routeWhere a course actually runs: its start, its finish, its bounding box, every mile marker, and the streets in the order you meet them.
The GPX file is free and needs no account. Hand gpx_url to a person who wants the course on a watch.
Args:
slug (string): From ourpr_list_courses.
include_polyline (boolean): Add the encoded centerline, about 9,800 characters. Default false.
response_format ('markdown' | 'json'): Default 'markdown'.
Returns: { "slug": string, "name": string, "course_type": string, "distance_mi": number, "start": { "lat": number, "lng": number } | null, "finish": { "lat": number, "lng": number } | null, "bbox": { "min_lat": number, "min_lng": number, "max_lat": number, "max_lng": number } | null, "mile_markers": [{ "mile": number, "lat": number, "lng": number }], "streets_in_order": [{ "name": string, "from_mi": number, "to_mi": number }], "polyline": string | null, "gpx_url": string, "page_url": string }
On an out-and-back the start and the finish are the same point, by design.
Examples:
"Send me the Boston course for my watch" -> read gpx_url
"What streets does Dallas run down?" -> read streets_in_order
"Where does Honolulu start?" -> read start
Error handling:
Returns the slug list suggestion when the slug is unknown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The course's slug. | |
| response_format | No | Output format. 'markdown' reads well in a chat answer. 'json' carries every field for further computation. | markdown |
| include_polyline | No | Add the encoded centerline. It runs to about 9,800 characters and only helps if you will decode it. Leave it off and hand over `gpx_url` instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | Yes | ||
| name | Yes | ||
| slug | Yes | ||
| start | Yes | ||
| finish | Yes | ||
| gpx_url | Yes | ||
| page_url | Yes | ||
| polyline | Yes | ||
| course_type | Yes | ||
| distance_mi | Yes | ||
| mile_markers | Yes | ||
| streets_in_order | Yes |