Overview
Get all events for a specific city. This endpoint automatically uses the city’s geographic center and searches within a 50-mile radius. Returns upcoming/ongoing events first, then leisure routes, then recently completed events (last 14 days).Authentication
Public API: No authentication required.Path Parameters
Name of the city (case-insensitive). Examples:
"San Francisco", "New York City", "Los Angeles"Query Parameters
Comma-separated list of category names to filter by (case-insensitive)Example:
"Group Ride,Social", "Commute"Response
Returns events sorted by relevance (upcoming → leisure → recent past) and distance from city center:Name of the city
Calculated geographic center of the city
Search radius in miles (always 50)
Total number of events returned
Array of event objects, each with complete event details including:
Request Examples
cURL
JavaScript
Python
Response Example
Error Responses
City Not Found (404)
No Coordinates Available (404)
How It Works
- City Lookup: Finds the city by name (case-insensitive)
- Center Calculation: Computes the geographic center from all areas/neighborhoods in the city
- Radius: Uses a fixed 50-mile radius from the city center
- Event Partitioning:
- Upcoming/ongoing events (end_time > now)
- Leisure routes (permanent routes, no time restrictions)
- Recent past events (ended within last 14 days)
- Filtering: Applies city filter (always) plus optional category filter
- Sorting: Orders by relevance (upcoming → leisure → past) then by distance from center
Key Features
- No Coordinates Required: Just provide the city name
- Automatic Center: Calculates city center from its areas
- Wide Coverage: 50-mile radius captures entire metro area
- Smart Ordering: Most relevant events first
- Optional Category Filter: Narrow down by event categories
- Distance Info: Each event includes distance from city center
Use Cases
- City Landing Pages: Show all events in a city
- Browse by Location: Let users explore events by city
- Metro-Wide Discovery: Find events across entire metropolitan area
- Regional Marketing: Promote events for specific cities
- Mobile App: City selection screen → events list
Notes
- City name matching is case-insensitive:
"san francisco"="San Francisco"="SAN FRANCISCO" - The 50-mile radius is fixed and cannot be customized (use
/events/nearby/for custom radius) - Events are always filtered by city (only returns events in the specified city)
- The city center is calculated as the average of all area coordinates within the city
- Distance is measured from city center to event destination or route geometry
Related Endpoints
- Get Nearby Events - Search events by custom location and radius
- Get Event Details - Get details for a specific event
- Get Nearby Cities - Discover cities near a location