# Search events

Search ParkWhiz for events by name or venue ID.

- Platform: [ParkWhiz](https://docs.upscrape.com/docs/platforms/parkwhiz)
- Capability ID: `parkwhiz.search-events`
- Cost: 1 credit per request
- Maximum runtime: 60 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": "Bruno Mars"
  },
  "capability": "parkwhiz.search-events"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of results to return. From 1 to 50. Default: `20`. |
| `page` | `integer` | No | One-based result page to fetch. From 1 to 100. Default: `1`. |
| `query` | `string` | No | Event name |
| `sort` | `string` | No | Sort order for returned results. Allowed values: `name`, `start_time`. Default: `start_time`. |
| `starting_after` | `string` | No | Only events starting after this RFC3339 timestamp |
| `starting_before` | `string` | No | Only events starting before this RFC3339 timestamp |
| `venue_id` | `integer` | No | ParkWhiz venue ID At least 1. |

### Example input

```json
{
  "query": "Bruno Mars"
}
```

## 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": [
    {
      "end_time": "2026-09-09T22:00:00.000-04:00",
      "event_id": 1723404,
      "name": "Bruno Mars: The Romantic Tour",
      "start_time": "2026-09-09T19:00:00.000-04:00",
      "venue_city": "Indianapolis, IN",
      "venue_id": 59,
      "venue_name": "Lucas Oil Stadium"
    },
    {
      "end_time": "2026-09-19T22:00:00.000-04:00",
      "event_id": 1723405,
      "name": "Bruno Mars: The Romantic Tour",
      "start_time": "2026-09-19T19:00:00.000-04:00",
      "venue_city": "Miami Gardens, FL",
      "venue_id": 117,
      "venue_name": "Hard Rock Stadium"
    },
    {
      "end_time": "2026-09-23T22:00:00.000-05:00",
      "event_id": 1723407,
      "name": "Bruno Mars: The Romantic Tour",
      "start_time": "2026-09-23T19:00:00.000-05:00",
      "venue_city": "San Antonio, TX",
      "venue_id": 1349,
      "venue_name": "Alamodome"
    }
  ],
  "query": "Bruno Mars",
  "scraped_at": "2026-08-01T10:54:22Z"
}
```
### 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` | Bruno Mars |
| `scraped_at` | `string` | 2026-08-01T10:54:22Z |

## 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)
