# Stubhub — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and discover tickets across StubHub's marketplace by looking up events, performers, and categories to find exactly what you want to attend. Browse event details, performer schedules, and curated category collections to compare available tickets and make informed purchasing decisions.

**Category:** Marketplaces | **Website:** [stubhub.com/](https://stubhub.com/) | **Docs:** [parse.bot/marketplace/51225e55-32ab-49c9-a494-f231ca778e75/stubhub-com-api](https://parse.bot/marketplace/51225e55-32ab-49c9-a494-f231ca778e75/stubhub-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Browse category components

Fetch homepage carousel components showing upcoming events near the user's inferred location. Returns event listings with dates, venues, and pricing information. Only the 'DontMissEvents' method is supported.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `method` | string | Yes | Component name. Accepted value: 'DontMissEvents' |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/browse-category-components \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"method":"<string>"}'
```

### Get event details

Get comprehensive details for a specific event, including all active ticket listings with seat info, prices, deal scores, and venue section map data. Returns up to 500 listings by paginating the upstream source. Optionally filter listings by section name or number. The event_slug and event_id are obtainable from performer events or search results URLs (pattern: /<slug>/event/<id>/).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | Numeric event ID (e.g., '160477665') |
| `event_slug` | string | Yes | Event URL slug (e.g., 'jefferson-starship-wichita-tickets-6-11-2026'). Obtainable from performer events or browse results URL path. |
| `section` | string | No | Filter listings to only those matching the specified section name or number (e.g., '423', '3', 'GA'). Case-insensitive. When omitted, all listings are returned. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/get-event-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"event_id":"<string>","event_slug":"<string>","section":"<string>"}'
```

### Get performer events

Retrieve upcoming events and related performers for a specific performer or team. Returns trending events, alternative performers, and total event count. The performer_id and performer_slug are obtainable from search_autocomplete results URL paths (pattern: /<slug>/performer/<id>).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `performer_id` | string | Yes | Internal performer ID (e.g., '2864'). Obtainable from search_autocomplete results URL path. |
| `performer_slug` | string | Yes | Performer URL slug (e.g., 'denver-nuggets-tickets'). Obtainable from search_autocomplete results URL path. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/get-performer-events \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"performer_id":"<string>","performer_slug":"<string>"}'
```

### Search autocomplete

Get trending performer and event suggestions from StubHub. Returns popular categories with their names, IDs, relative URLs, and thumbnail images. Note: results reflect currently trending performers rather than query-filtered matches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g., 'Taylor Swift', 'Lakers') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/search-autocomplete \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search events

Full search for events, performers, and venues on StubHub. Returns structured results grouped by entity type (performers with entity=5, events with entity=2, venues with entity=3). Each result includes title, URL, category/event details, and image URLs. Requires an initial page visit to acquire WAF cookies before the API call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query (e.g., 'Lakers', 'Coldplay', 'World Cup') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/stubhub/search-events \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.