DEV Community

Web Obsidians
Web Obsidians

Posted on

How to Get Upcoming Luma (lu.ma) Events for Any City or Calendar with Python (No API Key)

Luma (lu.ma) has become the default place for tech meetups, AI events and startup parties. Its official API needs a paid plan and only covers calendars you manage, but the public event lists that anyone can browse on lu.ma are served as plain JSON. You do not need an account or an API key to read them. This post shows two ways to do it: a short Python script, and a no-code option for when you need many cities, a schedule or a clean export.

Option 1: Luma's public JSON endpoints in Python

The website reads its event lists from https://api.lu.ma. Three endpoints are enough:

  • url?url=<slug> tells you what a lu.ma name is: a city (discover-place), a category or a calendar, with its id.
  • discover/get-paginated-events lists the upcoming events of a city or a category.
  • calendar/get-items lists the events of a calendar, with period=future or period=past.
import json
import urllib.parse
import urllib.request

API = "https://api.lu.ma/"
ZERO_DECIMAL = {"JPY", "KRW", "VND", "CLP"}  # currencies without cents


def get(path, **params):
    url = API + path + "?" + urllib.parse.urlencode(params)
    req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0", "Accept": "application/json"})
    with urllib.request.urlopen(req) as r:
        return json.load(r)


def resolve(slug):
    """'sf', 'ai' or a calendar name -> (kind, api_id)."""
    d = get("url", url=slug)
    kind, data = d["kind"], d["data"]
    if kind == "discover-place":
        return "city", data["place"]["api_id"]
    if kind == "category":
        return "category", data["category"]["api_id"]
    if kind == "calendar":
        return "calendar", data["calendar"]["api_id"]
    raise ValueError(f"{slug} is a {kind}, not a city, category or calendar")


def price(p):
    if not p:
        return None
    cur = p["currency"].upper()
    amount = p["cents"] if cur in ZERO_DECIMAL else p["cents"] / 100
    return f"{amount:g} {cur}"


def upcoming_events(slug, limit=100):
    kind, api_id = resolve(slug)
    if kind == "calendar":
        path, params = "calendar/get-items", {"calendar_api_id": api_id, "period": "future"}
    else:
        key = "discover_place_api_id" if kind == "city" else "discover_category_api_id"
        path, params = "discover/get-paginated-events", {key: api_id}
    events, cursor = [], None
    while len(events) < limit:
        page = get(path, pagination_limit=50, **params, **({"pagination_cursor": cursor} if cursor else {}))
        for entry in page["entries"]:
            ev, ticket = entry["event"], entry.get("ticket_info") or {}
            events.append({
                "name": ev["name"],
                "start": ev["start_at"],
                "timezone": ev["timezone"],
                "city": (ev.get("geo_address_info") or {}).get("city"),
                "price": price(ticket.get("price")),
                "guests": entry.get("guest_count"),
                "url": "https://lu.ma/" + ev["url"],
            })
        cursor = page.get("next_cursor")
        if not page.get("has_more") or not cursor:
            break
    return events[:limit]


for e in upcoming_events("sf", 20):
    print(e["start"][:16], e["price"] or "free", e["guests"], e["name"][:60])
Enter fullscreen mode Exit fullscreen mode

A few things worth knowing before you build on it:

  • Pages hold up to 50 events. Keep passing next_cursor back as pagination_cursor while has_more is true.
  • Prices come in minor units (cents), except in currencies that have no cents. A 10,000 yen ticket comes back as {"cents": 10000, "currency": "jpy"}, so dividing everything by 100 turns it into 100 yen.
  • Times (start_at, end_at) are UTC. The event's own time zone is in timezone.
  • Addresses are only public when the host chose to show them (geo_address_info.mode is shown). Otherwise you get the city, region and country.
  • Guest lists are personal data. guest_count tells you how big an event is without collecting anyone's name.
  • These endpoints are what the website itself uses, not a documented API. They can change, so keep request rates low and handle errors.

For a one-off look at one city, this script is all you need.

Option 2: a ready-made Actor for many cities and monitoring

Once you need several cities and categories, a daily schedule, "only events I have not seen yet", or a spreadsheet for someone who does not write Python, the plumbing grows: resolving names and links, paging, retries on busy servers, price units, date ranges, and remembering what you already returned.

I packaged all of that as an Apify Actor: Luma Events Scraper. You add cities, categories or calendars (names or lu.ma links) and get one clean row per event:

{
  "source": "sf",
  "sourceType": "city",
  "name": "Pulitzer Prize-winning artist and illustrator Mona Chalabi on her new book, Ten Lives, and wealth in America",
  "url": "https://lu.ma/5wpizor6",
  "startAt": "2026-11-30T02:00:00.000Z",
  "timezone": "America/Los_Angeles",
  "city": "Oakland",
  "address": "Local Economy, 6028 College Ave, Oakland, CA 94618, USA",
  "isFree": false,
  "price": 10,
  "currency": "USD",
  "isSoldOut": false,
  "spotsRemaining": 38,
  "guestCount": 0,
  "hosts": ["Local Economy"],
  "calendarName": "Local Economy"
}
Enter fullscreen mode Exit fullscreen mode

What it adds on top of the script above:

  • Cities, categories and calendars in one run, by name or by link
  • A date range, free events only, and past events for calendars
  • Return only new events: schedule it every day and each run returns only events that earlier runs did not return
  • Export to JSON, CSV or Excel, or send results to Slack, Google Sheets or a webhook with Apify integrations
  • Guest lists are never collected, only the guest count

You can also call it from code with the Apify client:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("webobsidians/luma-events-scraper").call(
    run_input={"sources": ["sf", "ai"], "maxEventsPerSource": 20}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["startAt"], item["city"], item["name"])
Enter fullscreen mode Exit fullscreen mode

It costs $1.00 per 1,000 events plus $0.00005 per run start, and Apify's free plan includes monthly credit, so small jobs cost nothing to try.

Which one should you use?

  • One city, once: the Python script.
  • Many cities or calendars, on a schedule, or for a teammate who wants a spreadsheet: the Actor.

Either way, you are reading event lists that Luma shows to anyone, so keep request rates reasonable and leave personal data alone.

Top comments (0)