Public API Documentation

GET /api/events

This endpoint retrieves a combined list of events from your local database along with external events fetched from Ticketmaster. The results include both local events (with external: false) and external events (with external: true).

Query Parameters

  • search: Search term to match event title or ID.
  • city: Filter by city (partial match supported).
  • state: Filter by state (partial match supported).
  • country: Filter by country (partial match supported).
  • address: Filter by address (partial match supported).
  • dateFrom: Filter events starting from this date (ISO format).
  • dateTo: Filter events up to this date (ISO format).
  • category: Filter by event category (e.g. Music, Sports, Arts).
  • format: Filter by event format (Online, Offline, Hybrid).
  • language: Filter by event language.
  • page: The page number (default: 1).
  • limit: Number of events per page (default: 30).

Response Format

The API returns a JSON object with the following structure. Each event conforms to the IEvent type:

{
  "status": "success",
  "message": "Events fetched successfully",
  "data": {
    "docs": [
      {
        "_id": "64ffa5...",
        "title": "Local Event Title",
        "location": {
          "city": "Toronto",
          "state": "ON",
          "country": "Canada"
        },
        "date": "2025-06-10T00:00:00.000Z",
        "category": "Music",
        "external": false
      },
      {
        "_id": "G5vzZ9...",
        "title": "External Concert",
        "location": {
          "city": "New York",
          "state": "NY",
          "country": "US"
        },
        "date": "2025-06-12",
        "category": "Other",
        "external": true,
        "url": "https://www.ticketmaster.com/event/..."
      }
    ]
  }
}

Example Request

To fetch events with the keyword concert in Toronto from 2025-06-01 onward, send a request to:

GET https://geoevent.ca/api/events?search=concert&city=Toronto&dateFrom=2025-06-01&page=1&limit=30

Authentication

This public API route is accessible without authentication.