# Search events

Search SpotHero for events by name or destination, returning event IDs, times, and venue info.

- Platform: [SpotHero](https://docs.upscrape.com/docs/platforms/spothero)
- Capability ID: `spothero.search`
- Cost: 1 credit per request
- Maximum runtime: 30 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "query": "Chicago Bulls"
  },
  "capability": "spothero.search"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destination_id` | `integer` | No | SpotHero destination/venue ID to list events at (e.g. 79050 for SoFi Stadium). At least 1. |
| `limit` | `integer` | No | Maximum number of results to return. From 1 to 50. Default: `20`. |
| `query` | `string` | No | Event name to search (e.g. 'Bruno Mars', 'Chicago Bulls'). |

### Example input

```json
{
  "query": "Chicago Bulls"
}
```

## Response

Successful output is returned in `results[0].data`.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "events": [
    {
      "city": "Chicago",
      "destination_id": 2,
      "destination_title": "United Center",
      "end_time": "2026-10-07T22:00:00-05:00",
      "event_id": 1418307,
      "parking_ends": "2026-10-07T23:00:00-05:00",
      "parking_starts": "2026-10-07T18:00:00-05:00",
      "start_time": "2026-10-07T19:00:00-05:00",
      "title": "Pre-Season: Chicago Bulls v Phoenix Suns"
    },
    {
      "city": "Chicago",
      "destination_id": 2,
      "destination_title": "United Center",
      "end_time": "2026-10-09T22:00:00-05:00",
      "event_id": 1418601,
      "parking_ends": "2026-10-09T23:00:00-05:00",
      "parking_starts": "2026-10-09T18:00:00-05:00",
      "start_time": "2026-10-09T19:00:00-05:00",
      "title": "Pre-Season: Chicago Bulls v Memphis Grizzlies"
    },
    {
      "city": "Denver",
      "destination_id": 47314,
      "destination_title": "Ball Arena",
      "end_time": "2026-10-11T22:00:00-06:00",
      "event_id": 1432261,
      "parking_ends": "2026-10-11T23:00:00-06:00",
      "parking_starts": "2026-10-11T18:00:00-06:00",
      "start_time": "2026-10-11T19:00:00-06:00",
      "title": "NBA Preseason - Chicago Bulls at Denver Nuggets"
    }
  ],
  "query": "Chicago Bulls",
  "scraped_at": "2026-08-30T12:44:34Z"
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `events` | `array` | 3 items |
| `events` | `array` | 3 items |
| `query` | `string` | Chicago Bulls |
| `scraped_at` | `string` | 2026-08-30T12:44:34Z |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
