Skip to main content

Discovery β€” Events

The Discovery API allows you to search and browse events, venues, and performers. Use these endpoints to display available events to your customers and to obtain the event_id needed for seat browsing, quotes, and orders.

Authentication Required

All Discovery endpoints require a valid Bearer token. See Authentication to get your token.


Endpoints​

MethodEndpointDescription
GET/v1/eventsSearch and list events
GET/v1/events/{event_id}Get a single event by ID

7.1 β€” Search Events​

Returns a paginated list of events matching your search criteria.

Endpoint​

GET /v1/events

Query Parameters​

ParameterTypeRequiredDescription
qstringNoFree text search across event name
event_idstringNoFilter by a specific event ID
venue_idstringNoFilter by venue ID
venue_namestringNoPartial match on venue name
performer_idstringNoFilter by performer ID
performer_namestringNoPartial match on performer name
date_fromdateNoEvents from this date YYYY-MM-DD. Defaults to today
date_todateNoEvents up to this date YYYY-MM-DD
limitintegerNoResults per page. Default: 20, Max: 100
offsetintegerNoZero-based offset for pagination. Default: 0

Request​

cURL
curl "https://api.ticketbuyback.com/partner/v1/events?q=Patriots&date_from=2026-09-01&limit=20" \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json"
JavaScript
const params = new URLSearchParams({
q: "Patriots",
date_from: "2026-09-01",
limit: 20,
});

const response = await fetch(
`https://api.ticketbuyback.com/partner/v1/events?${params}`,
{
headers: {
Authorization: `Bearer ${token}`,
Accept: "application/json",
},
}
);

const { data, pagination } = await response.json();

Response β€” 200 OK​

{
"success": true,
"data": [
{
"event_id": "5496123",
"event_name": "New England Patriots vs. Buffalo Bills",
"event_datetime_utc": "2026-09-13T17:00:00Z",
"event_datetime_local": "2026-09-13T13:00:00",
"event_timezone": "America/New_York",
"venue": {
"venue_id": "ven_gillette_001",
"venue_name": "Gillette Stadium",
"city": "Foxborough",
"state": "MA",
"country": "US"
},
"performers": [
{
"performer_id": "perf_ne_patriots",
"performer_name": "New England Patriots"
},
{
"performer_id": "perf_buf_bills",
"performer_name": "Buffalo Bills"
}
]
}
],
"pagination": {
"total": 47,
"limit": 20,
"offset": 0,
"has_more": true
},
"meta": {
"request_id": "abc123",
"timestamp": "2026-02-26T10:30:00Z"
}
}

Response Fields​

FieldDescription
event_idUnique event identifier β€” used in all downstream requests
event_nameDisplay name of the event
event_datetime_utcEvent start time in UTC
event_datetime_localEvent start time in the venue's local timezone
event_timezoneIANA timezone string for the venue
venueVenue details β€” ID, name, city, state, country
performersArray of performers appearing at the event

Pagination​

Use limit and offset to page through results. When has_more is true, increment offset by limit to fetch the next page.

Fetch all pages β€” JavaScript
async function fetchAllEvents(query) {
const limit = 100;
let offset = 0;
let allEvents = [];
let hasMore = true;

while (hasMore) {
const params = new URLSearchParams({ q: query, limit, offset });
const res = await fetch(
`https://api.ticketbuyback.com/partner/v1/events?${params}`,
{ headers: { Authorization: `Bearer ${token}` } }
);
const { data, pagination } = await res.json();
allEvents = [...allEvents, ...data];
hasMore = pagination.has_more;
offset += limit;
}

return allEvents;
}

7.2 β€” Get Single Event​

Returns full details for a single event by its ID.

Endpoint​

GET /v1/events/{event_id}

Path Parameters​

ParameterTypeRequiredDescription
event_idstringYesThe event ID from the Search Events response

Request​

cURL
curl "https://api.ticketbuyback.com/partner/v1/events/5496123" \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json"
JavaScript
const response = await fetch(
"https://api.ticketbuyback.com/partner/v1/events/5496123",
{
headers: {
Authorization: `Bearer ${token}`,
Accept: "application/json",
},
}
);

const { data } = await response.json();

Response β€” 200 OK​

Same shape as a single item from the Search Events response above.


Error Scenarios​

ScenarioHTTP StatusError Code
Missing or invalid Bearer token401UNAUTHORIZED
Token expired401TOKEN_EXPIRED
Event not found404EVENT_NOT_FOUND
Event date has passed422EVENT_EXPIRED

Next Step​

Once you have an event_id, browse available sections and rows:

β†’ Sections & Rows