# Place autocomplete

Find candidate places from a partial address or place name and return place IDs for later resolution.

- Platform: [Zepto](https://docs.upscrape.com/docs/platforms/zepto)
- Capability ID: `zepto.place.autocomplete`
- Cost: 1 credit per request
- Maximum runtime: 180 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": {
    "limit": 3,
    "query": "Indiranagar Bengaluru"
  },
  "capability": "zepto.place.autocomplete"
}'
```

## Input

Provide query. limit accepts 1 to 20 suggestions and defaults to 5.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of autocomplete suggestions to return. From 1 to 20. Default: `5`. |
| `query` | `string` | Yes | Partial place name or address to autocomplete. |

### Example input

```json
{
  "limit": 3,
  "query": "Indiranagar Bengaluru"
}
```

## Response

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

Suggestions can include main text, secondary text, description, types, rank and place_id. A suggestion is a place candidate, not proof of Zepto serviceability.

An authoritative empty autocomplete result returns count 0 and an empty results array. Use a returned place_id with place.details or place.resolve.

### Illustrative sample output

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

```json
{
  "captured_at": "2026-09-24T09:55:31.182104627Z",
  "count": 3,
  "query": "Indiranagar Bengaluru",
  "results": [
    {
      "description": "Indiranagar, Bengaluru, Karnataka, India",
      "main_text": "Indiranagar",
      "place_id": "ChIJkQN3GKQWrjsRNhBQJrhGD7U",
      "rank": 1,
      "secondary_text": "Bengaluru, Karnataka, India",
      "types": "geocode political sublocality sublocality_level_1"
    },
    {
      "description": "Indiranagar, Chinmaya Mission Hospital Road, Binnamangala, Stage 1, Indiranagar, Bengaluru, Karnataka, India",
      "main_text": "Indiranagar",
      "place_id": "ChIJZbZd-qQWrjsRe7G5a9GUZ9U",
      "rank": 2,
      "secondary_text": "Chinmaya Mission Hospital Road, Binnamangala, Stage 1, Indiranagar, Bengaluru, Karnataka, India",
      "types": "establishment point_of_interest subway_station transit_station"
    },
    {
      "description": "Indiranagar, 6th Block, Koramangala, Bengaluru, Karnataka, India",
      "main_text": "Indiranagar, 6th Block, Koramangala",
      "place_id": "ChIJXTaHq0UUrjsRXCmRVp-vx3I",
      "rank": 3,
      "secondary_text": "Bengaluru, Karnataka, India",
      "types": "geocode political sublocality sublocality_level_3"
    }
  ]
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `captured_at` | `string` | 2026-09-24T09:55:31.182104627Z |
| `count` | `integer` | 3 |
| `query` | `string` | Indiranagar Bengaluru |
| `results` | `array` | 3 items |
| `results` | `array` | 3 items |

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