# Search Nearby

Search for places near a coordinate — returns name, address, phone, website, rating, coordinates, and categories for businesses within a given radius. Supports keyword filtering and place type constraints.

- Platform: [Google Maps](https://docs.upscrape.com/docs/platforms/googlemaps)
- Capability ID: `googlemaps.nearby`
- Cost: 1 credit per request
- Maximum runtime: 120 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

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

```bash
curl -X POST https://data.upscrape.com/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"lat":37.7749,"limit":20,"lng":-122.4194,"query":"coffee","radius":500},"capability":"googlemaps.nearby"}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | `string` | No | Country code (default 'us'). |
| `lang` | `string` | No | Language code (default 'en'). |
| `lat` | `number` | Yes | Latitude (required). |
| `limit` | `integer` | No | Max results (default 60, max 120). |
| `lng` | `number` | Yes | Longitude (required). |
| `query` | `string` | No | Keyword filter, e.g. 'coffee'. |
| `radius` | `integer` | No | Search radius in meters (default 1000). |
| `types` | `array<string>` | No | Place types, e.g. ['restaurant']. |

### Example input

```json
{
  "lat": 37.7749,
  "limit": 20,
  "lng": -122.4194,
  "query": "coffee",
  "radius": 500
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

No committed sample output is available for this capability.


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

See [jobs and results](https://docs.upscrape.com/docs/api/jobs), [errors and retries](https://docs.upscrape.com/docs/api/errors), and [idempotency](https://docs.upscrape.com/docs/api/idempotency).

## Machine-readable contract

- [Capability OpenAPI 3.1](https://docs.upscrape.com/docs/platforms/googlemaps/googlemaps.nearby/openapi.json)
- [Platform OpenAPI 3.1](https://upscrape.com/scrapers/googlemaps/openapi.json)
- [Focused coding-agent prompt](https://upscrape.com/scrapers/googlemaps/capabilities/googlemaps.nearby/llm.md)
