Searching for Events

Learn to search for and filter events using Ticketmaster's Discovery API.

Event search

The purpose of the Discovery API is—as the name implies—to discover events, venues, attractions, and so on. We can use the events endpoint of the Discovery API to search for and filter events based on different criteria.

The URL for this endpoint is:

https://app.ticketmaster.com/discovery/v2/events

Request parameters

We can provide multiple optional parameters to filter the search results. A few of these parameters and their uses are mentioned below. You can visit this lesson to see the complete list.

Parameter

Type

Category

Description

id

string

optional

If provided, the search results are filtered by the event ID.

keyword

string

optional

This is a keyword on which the search is performed.

attractionId

string

optional

If provided, the search results are filtered by the attraction ID.

venueId

string

optional

If provided, the search results are filtered by the venue ID.

startDateTime

string

optional

If provided, the search results are filtered to return events with a start date after this date.

endDateTime

string

optional

If provided, the search results are filtered to return events with a start date before this date.

size

number

optional

This is the number of results to be returned per page. The default value is 20.

page

number

optional

This is the page of search results to be returned. The default value is 0.

sort

string

optional

This is the sorting order of the search results. Allowable values are, name,asc, name,desc, date,asc, date,desc, relevance,asc, relevance,desc, distance,asc, name,date,asc, name,date,desc, date,name,asc, date,name,desc, distance,date,asc, onSaleStartDate,asc, id,asc, venueName,asc, venueName,desc, random. The default value is relevance,desc.

classificationId

array[string]

optional

If provided, the search results are filtered by classification ID, that is, the ID of any segment, genre, subgenre, type, or subtype. Negative filtering is supported with this format: -. Negative filters may cause decreased performance.

Let's try making an actual call to this endpoint, first with no search parameters. Later we'll make a call with a few of the optional parameters, such as size and id.

The code below makes a call to the events ...