Search events on StubHub. A keyword such as nba calls https://www.stubhub.com/secure/search/?q=nba. A StubHub search URL is also accepted. The response is { results, pagination } with the event name, venue, city, date, and time.
Search cards do not print a ticket price, so price, price_display, and currency are null. Send results[].url to /v2/stubhub/event for the lowest printed price.
The search document embeds one page of about 20 events. pagination.page is 1, per_page is 20, and total_results is the count StubHub reports. It changes from day to day. total_pages and next are null, because a later pageIndex URL repeats the same 20 events. page=2 returns 404.
GET https://api.piloterr.com/v2/stubhub/search?query=nba
GET https://api.piloterr.com/v2/stubhub/search?query=concert
Use results[].url with /v2/stubhub/event. The event id matches results[].id.
| Parameter |
Required |
Example |
query |
yes |
nba |
page |
no |
1 |
query is a keyword or a StubHub search URL. An event URL (/event/<id>) is rejected here. page is optional and starts at 1. Only page 1 returns events. Page 2 and above return 404.
| Field |
Type |
Meaning |
results[].id |
string |
Event id |
results[].url |
string |
Event URL |
results[].name |
string |
Event name |
results[].venue_name |
string or null |
Venue |
results[].venue_city |
string or null |
City |
results[].venue_location |
string or null |
City and country line |
results[].country |
string or null |
Country |
results[].country_code |
string or null |
Country code, such as FR |
results[].date |
string or null |
Date label, such as Mar 31 2027 |
results[].time |
string or null |
Time label, such as 7:00 PM |
results[].day_of_week |
string or null |
Weekday |
results[].year |
string or null |
Year |
results[].start_at |
string or null |
Start timestamp when the card has one |
results[].has_active_listings |
boolean or null |
True when listings are active |
results[].is_parking_event |
boolean or null |
True for a parking-only event |
results[].price |
null |
Not printed on search cards |
results[].price_display |
null |
Not printed on search cards |
results[].currency |
null |
Not printed on search cards |
pagination.page |
integer |
1 |
pagination.per_page |
integer |
20 |
pagination.total_results |
integer or null |
StubHub's reported total |
pagination.total_pages |
null |
Later pages are not in the document |
pagination.next |
null |
No further fetchable page |
Ids are unique on the returned page. next is null. That means there is no further page to request: page=2 is 404, and it does not repeat page 1 under another page number. total_results remains the full count StubHub prints, so you can see the size of the catalog even though only the embedded page is returned. A broad keyword such as nba follows StubHub's own ranking and can place an exhibition ahead of a league game.
- A tour desk lists the embedded NBA events with venue, city, and date, then opens each URL for a price.
- An operations filter keeps rows where
is_parking_event is false.
- A market scan stores
total_results for concert and treats results as the fetchable first page.
| Code |
Meaning |
400 |
Empty query, a host other than stubhub.com, or an event URL sent to search |
401 |
Missing API key |
404 |
No events, or page greater than 1 |
500 |
The fetch failed |
StubHub Event