# StubHub Events Scraper (`scrape_scaler/stubhub-event-scraper`) Actor

Discover StubHub explore listings by metro and date window. Returns venue, category, pricing signals, and geocodes missing coordinates.

- **URL**: https://apify.com/scrape\_scaler/stubhub-event-scraper.md
- **Developed by:** [Creative Scraps](https://apify.com/scrape_scaler) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## StubHub Metro Listings

Discover **StubHub Explore** event listings for a metro and date window. Returns venue, inferred category, schedule text, and from-price signals as structured JSON for calendars, market monitoring, and automation.

### How it works

1. Resolves your city to lat/lng (or uses explicit `lat`/`lng` / an Explore `startUrl`).
2. Calls StubHub’s Explore API (`GetExploreEvents`) with base64-encoded coordinates and a `from`/`to` millisecond window.
3. Paginates with the `Page` query parameter up to `maxPages` / `maxItems`.
4. Normalizes each listing (venue, category, parsed `startAt`, ticketing signals) and writes it to the dataset.

### Input

| Field | Required | Description |
|-------|----------|-------------|
| `city` | One of `city` / `lat`+`lng` / `startUrl` | Metro name, e.g. `New York`, `Chicago`, `London` |
| `lat` / `lng` | Same | Coordinate override |
| `startUrl` | Same | StubHub Explore URL with base64 `lat`/`lon` (and optional `from`/`to`) |
| `startDate` / `endDate` | No | `YYYY-MM-DD` (default: today → +14 days UTC) |
| `maxItems` | No | Stop after N unique events |
| `maxPages` | No | Explore page cap (default `10`) |
| `pageSize` | No | Requested page size (StubHub often returns ≤20; default `20`) |
| `proxyConfiguration` | No | **Residential Apify Proxy required** |

### Output

Each dataset item includes:

- Identity: `event_id` / `id`, `name` / `title`, `url`
- Schedule: `startAt`, `dateText`, `timeText`, `dayOfWeek`, confirmation flags
- Place: `location.venue`, `address` / `fullAddress`, `city`, `region`, `country` (`latitude`/`longitude` are usually `null`)
- Meta: `category`, `categoryId`, `image_url`, `ticketing` (from-price / price class / listings flags)

#### Example output

```json
{
  "source": "stubhub",
  "event_id": "160338688",
  "id": "160338688",
  "name": "Chicago The Musical",
  "title": "Chicago The Musical",
  "url": "https://www.stubhub.com/chicago-the-musical-new-york-tickets-9-13-2026/event/160338688/",
  "startAt": "2026-09-13T18:00:00.000Z",
  "dayOfWeek": "Sun",
  "dateText": "Sep 13",
  "timeText": "2:00 PM",
  "isTbd": false,
  "isDateConfirmed": true,
  "isTimeConfirmed": true,
  "image_url": "https://media.stubhubstatic.com/stubhub-v2-catalog/d_defaultLogo.jpg/q_auto:low,f_auto,c_fill,g_auto,w_280,h_170,dpr_2.0/categories/14222/6421128",
  "coverImageUrl": "https://media.stubhubstatic.com/stubhub-v2-catalog/d_defaultLogo.jpg/q_auto:low,f_auto,c_fill,g_auto,w_280,h_170,dpr_2.0/categories/14222/6421128",
  "categoryId": 14222,
  "category": "Theater",
  "location": {
    "venue": "Ambassador Theatre",
    "venueId": 3597,
    "address": "New York, NY, USA",
    "fullAddress": "New York, NY, USA",
    "city": "New York",
    "region": "NY",
    "country": "USA",
    "latitude": null,
    "longitude": null
  },
  "ticketing": {
    "formattedFromPrice": null,
    "priceClass": 1,
    "hasActiveListings": false,
    "allowPublicPurchase": true
  },
  "city": "New York",
  "sourceUrl": "https://www.stubhub.com/explore?lat=NDAuNzEyOA%3D%3D&lon=LTc0LjAwNg%3D%3D&from=1789257600000&to=1789948799999",
  "scrapedAt": "2026-09-13T16:44:45.158Z"
}
```

### Use cases

- Metro sports, concert, and theater inventory snapshots
- From-price / listing monitoring on Explore results
- Feeding event calendars where StubHub is the marketplace source
- Comparing ticketed inventory across cities on a schedule

### Notes

- **Residential proxy is required** — StubHub commonly returns 403/captcha without it.
- Explore listings almost never include coordinates. `latitude` / `longitude` are `null`; geocode `location.venue` + city in your own pipeline if you need map pins.
- `startAt` is parsed from StubHub display date/time strings. Parsing assumes a US Eastern offset for wall-clock conversion — international metros may need timezone adjustment downstream.
- `category` labels are best-effort (known `categoryId` map + title/URL heuristics). Raw `categoryId` is always included.
- Only public Explore listings are returned.

### Tips

- Cheap smoke test: `city: "New York"`, `maxItems: 5`, `maxPages: 1`
- Prefer a tight `startDate`/`endDate` window for weekly ingestion jobs

# Actor input Schema

## `city` (type: `string`):

Metro name (e.g. New York, Chicago, London). Aliases like NYC, LA, SF also work. Provide city, lat+lng, or startUrl.

## `lat` (type: `number`):

Optional latitude override. When set with lng, skips the built-in city map.

## `lng` (type: `number`):

Optional longitude override. When set with lat, skips the built-in city map.

## `startUrl` (type: `string`):

Optional Explore URL with base64 lat/lon (and optional from/to ms). Example: https://www.stubhub.com/explore?lat=NDAuNzEyOA%3D%3D\&lon=LTc0LjAwNg%3D%3D

## `startDate` (type: `string`):

Include events on or after this date (YYYY-MM-DD). Defaults to today (UTC). Mapped to Explore from= ms.

## `endDate` (type: `string`):

Include events on or before this date (YYYY-MM-DD). Defaults to +14 days (UTC). Mapped to Explore to= ms.

## `maxItems` (type: `integer`):

Stop after this many unique events.

## `maxPages` (type: `integer`):

Explore API page cap (default 10). Uses the Page query parameter.

## `pageSize` (type: `integer`):

Events requested per page. StubHub often returns ≤20 regardless of higher values.

## `proxyConfiguration` (type: `object`):

Residential Apify Proxy is required — StubHub commonly blocks datacenter IPs with 403/captcha.

## Actor input object example

```json
{
  "city": "New York",
  "lat": 40.7128,
  "lng": -74.006,
  "startUrl": "https://www.stubhub.com/explore?lat=NDAuNzEyOA%3D%3D&lon=LTc0LjAwNg%3D%3D",
  "startDate": "2026-09-20",
  "endDate": "2026-10-04",
  "maxItems": 40,
  "maxPages": 5,
  "pageSize": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `events` (type: `string`):

No description

## `run` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "city": "New York",
    "maxItems": 40,
    "maxPages": 5,
    "pageSize": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrape_scaler/stubhub-event-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "city": "New York",
    "maxItems": 40,
    "maxPages": 5,
    "pageSize": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("scrape_scaler/stubhub-event-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "city": "New York",
  "maxItems": 40,
  "maxPages": 5,
  "pageSize": 20
}' |
apify call scrape_scaler/stubhub-event-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrape_scaler/stubhub-event-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6xoVYw6Ni55trcayi/builds/EmP6QZc8KrtFBeRzm/openapi.json
