# Search Metro Hubs

Find ParkWhiz city and metro hubs near coordinates.

- Platform: [ParkWhiz](https://docs.upscrape.com/docs/platforms/parkwhiz)
- Capability ID: `parkwhiz.hubs.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 YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "distance_miles": 50,
    "latitude": 41.881943,
    "limit": 10,
    "longitude": -87.630976,
    "only_major_metros": true,
    "page": 1
  },
  "capability": "parkwhiz.hubs.search"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `distance_miles` | `integer` | No | Distance miles supplied for this request. |
| `latitude` | `number` | Yes | Latitude supplied for this request. |
| `limit` | `integer` | No | Maximum number of results to return. |
| `longitude` | `number` | Yes | Longitude supplied for this request. |
| `only_major_metros` | `boolean` | No | Only major metros supplied for this request. |
| `page` | `integer` | No | One-based result page to fetch. |

### Example input

```json
{
  "distance_miles": 50,
  "latitude": 41.881943,
  "limit": 10,
  "longitude": -87.630976,
  "only_major_metros": true,
  "page": 1
}
```

## 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 redacted fixture is an example, not a fixed response schema.

```json
{
  "hubs": [
    {
      "city": "Chicago",
      "coordinates": [
        41.8781136,
        -87.6297982
      ],
      "country": "US",
      "hub_id": 2,
      "name": "Chicago",
      "postal_code": "60604",
      "state": "IL"
    }
  ],
  "page": 1,
  "scraped_at": "2026-08-30T12:44:27Z"
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `hubs` | `array` | 1 items |
| `hubs` | `array` | 1 items |
| `page` | `integer` | 1 |
| `scraped_at` | `string` | 2026-08-30T12:44:27Z |

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