Skip to main content
client.gamma.events.getEventBySlug fetches the same rich event payload as getEventById, using the human-readable slug.

Request

const event = await client.gamma.events.getEventBySlug(slug, params);

Parameters

NameTypeRequiredNotes
slugstringEvent slug (e.g., "chile-presidential-election-1st-round-winner").
include_chatbooleanInclude chat metadata.
include_templatebooleanInclude template metadata.

Response

A single Event object identical to Event by ID.

Usage example

const event = await client.gamma.events.getEventBySlug(
  "chile-presidential-election-1st-round-winner",
  { include_chat: true },
);

console.log(event.title);

Failure modes

  • slug must be a non-empty string.