Skip to main content
GET
/
events
/
nearby
/
{
  "events": [
    {
      "id": 123,
      "name": "<string>",
      "alias": "<string>",
      "description": "<string>",
      "emoji": "<string>",
      "image_url": "<string>",
      "start_time": "<string>",
      "end_time": "<string>",
      "created_by": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "distance": 123,
      "visits_total": 123,
      "is_leisure_route": true,
      "city": "<string>",
      "destination": {
        "id": 123,
        "name": "<string>",
        "latitude": 123,
        "longitude": 123,
        "area_name": "<string>",
        "city": "<string>",
        "categories": [
          {}
        ]
      },
      "route": {
        "distance": 123,
        "duration": 123,
        "polyline": "<string>"
      },
      "categories": [
        {}
      ],
      "images": [
        {}
      ]
    }
  ]
}

Overview

Get events within a specified radius of a location. Returns upcoming/ongoing events, leisure routes (permanent routes), and recently completed events (within last 14 days).

Authentication

This endpoint is public and does not require authentication.

Query Parameters

latitude
number
required
User’s latitude (-90 to 90)
longitude
number
required
User’s longitude (-180 to 180)
radius
number
default:"1000"
Search radius in meters (default: 1000m)
city
string
Filter by city name (case-insensitive). Uses the auto-computed city field from route geometry.
categories
string
Comma-separated list of category names to filter by (e.g., “Group Ride,Social”)

Response

Returns an object with an events array containing event details:
events
array
Array of event objects

Request Example

cURL
curl "https://api.cyclemate.com/events/nearby/?latitude=40.7589&longitude=-73.9851&radius=5000&city=New%20York%20City" \
  -H "Content-Type: application/json"
JavaScript
const response = await fetch(
  'https://api.cyclemate.com/events/nearby/?latitude=40.7589&longitude=-73.9851&radius=5000',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  }
);

const data = await response.json();
console.log(data.events);
Python
import requests

url = "https://api.cyclemate.com/events/nearby/"
params = {
    "latitude": 40.7589,
    "longitude": -73.9851,
    "radius": 5000
}

response = requests.get(url, params=params)
events = response.json()["events"]

Response Example

{
  "events": [
    {
      "id": 123,
      "name": "Central Park Morning Ride",
      "alias": "central-park-morning-ride",
      "description": "Casual group ride through Central Park",
      "emoji": "🚴",
      "image_url": "https://storage.googleapis.com/events/123.jpg",
      "start_time": "2025-11-15T08:00:00Z",
      "end_time": "2025-11-15T10:00:00Z",
      "created_by": "google-oauth2|115315991711634062214",
      "created_at": "2025-11-01T10:00:00Z",
      "updated_at": "2025-11-01T10:00:00Z",
      "distance": 0.8,
      "visits_total": 42,
      "is_leisure_route": false,
      "city": "New York City",
      "destination": {
        "id": 45,
        "name": "Central Park",
        "latitude": 40.785091,
        "longitude": -73.968285,
        "area_name": "Manhattan",
        "city": "New York City",
        "categories": [
          {
            "id": 1,
            "name": "Park",
            "emoji": "🌳"
          }
        ]
      },
      "categories": [
        {
          "id": 2,
          "name": "Group Ride",
          "emoji": "👥"
        }
      ],
      "images": [
        {
          "image_url": "https://storage.googleapis.com/event-photos/1.jpg",
          "created_at": "2025-11-01T10:00:00Z"
        }
      ]
    }
  ]
}

Event Ordering

Events are returned in the following order:
  1. Upcoming/Ongoing Events - Events that haven’t ended yet, sorted by distance
  2. Leisure Routes - Permanent routes with no time restrictions, sorted by distance
  3. Recent Past Events - Events that ended within the last 14 days, sorted by distance

Notes

  • Distance is calculated to the event’s destination (for destination-based events) or to the route geometry (for route-based events)
  • When both city and area filters are provided, events must match both criteria
  • Category filtering is inclusive (events matching any of the specified categories will be returned)
  • Leisure routes are always included regardless of their start/end times being null