> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/mapbox-search-js/llms.txt)

# Search Box

This page includes reference documentation for Search Box in the **Mapbox Search JS Core** framework.

## Class

### SearchBoxCore

A `SearchBoxCore` object is an application's main entrypoint to the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/).

`SearchBoxCore` is focused on the two-step, interactive search experience. These steps are:

1.  [SearchBoxCore#suggest](#searchboxcore#suggest): The user enters a search term, and a list of suggested results is returned with optional data such as: eta, distance calculations, etc.
2.  [SearchBoxCore#retrieve](#searchboxcore#retrieve): The user selects a result from the list of suggested results, and the corresponding geographic coordinates are returned for displaying on a map or otherwise manipulating.

A [Mapbox access token](https://docs.mapbox.com/help/glossary/access-token/) is required to use `SearchBoxCore`, and other options may be specified either in the constructor or in the [SearchBoxCore#suggest](#searchboxcore#suggest) call.

> new SearchBoxCore(options: <a href="#searchboxoptions">SearchBoxOptions</a>?)

#### Import[​](#import)

```javascript
import { SearchBoxCore } from '@mapbox/search-js-core'
```

#### Parameters

| Name | Description |
| --- | --- |
| **options** [SearchBoxOptions](#searchboxoptions)?  |  |
| **options.accessToken** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?  |  |

#### Example

```js
const search = new SearchBoxCore({ accessToken: 'pk.my-mapbox-access-token' });

const sessionToken = new SessionToken();
const result = await search.suggest('Washington D.C.', { sessionToken });
if (result.suggestions.length === 0) return;

const suggestion = result.suggestions[0];
const { features } = await search.retrieve(suggestion, { sessionToken });
doSomethingWithCoordinates(features);
```

#### Instance Members

##### accessToken

The [Mapbox access token](https://docs.mapbox.com/help/glossary/access-token/) to use for all requests.

###### Type

[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)

##### defaults

Any default options ([SearchBoxOptions](#searchboxoptions)) to be merged into options in the following methods:

-   [SearchBoxCore#suggest](#searchboxcore#suggest)
-   [SearchBoxCore#retrieve](#searchboxcore#retrieve)
-   [SearchBoxCore#reverse](#searchboxcore#reverse)

###### Type

Partial<[SearchBoxOptions](#searchboxoptions)>

### Interactive search

##### suggest()

[SearchBoxCore#suggest](#searchboxcore#suggest) is "part one" of the two-step interactive search experience, and includes useful information such as: [SearchBoxSuggestion#name](#searchboxsuggestion#name), [SearchBoxSuggestion#place_formatted](#searchboxsuggestion#place_formatted), and [SearchBoxSuggestion#maki](#searchboxsuggestion#maki).

Suggestion objects **do not include geographic coordinates**. To get the coordinates of the result, use [SearchBoxCore#retrieve](#searchboxcore#retrieve).

For tracking purposes, it is useful for any follow-up requests based on this suggestion to include same [SessionToken](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/search_session/#sessiontoken) as the original request.

If you'd like session tokens to be handled automatically, see [SearchSession](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/search_session/#searchsession).

###### Parameters

| Name | Description |
| --- | --- |
| **searchText** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  |  |
| **optionsArg** [SearchBoxOptions](#searchboxoptions)  |  |
| **optionsArg.sessionToken** [SessionTokenLike](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/search_session/#sessiontokenlike)  |  |
| **optionsArg.signal** AbortSignal?  |  |

###### Returns

[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[SearchBoxSuggestionResponse](#searchboxsuggestionresponse)>

##### retrieve()

[SearchBoxCore#retrieve](#searchboxcore#retrieve) is "part two" of the two-step interactive search experience and includes geographic coordinates in [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) format.

`suggestion` is usually a [SearchBoxSuggestion](#searchboxsuggestion) returned from "part one," [SearchBoxCore#suggest](#searchboxcore#suggest).

Multiple feature suggestions may be returned from a single search query, for example in an airport with multiple terminals.

**Legal terms:**

The [Mapbox Terms of Service](https://www.mapbox.com/tos/) states any rendering of a feature suggestion must be using Mapbox map services (for example, displaying results on Google Maps or MapKit JS is not allowed).

**Disclaimer:**

The failure of Mapbox to exercise or enforce any right or provision of these Terms will not constitute a waiver of such right or provision.

###### Parameters

| Name | Description |
| --- | --- |
| **suggestion** [SearchBoxSuggestion](#searchboxsuggestion)  |  |
| **optionsArg** any  |  |
| **optionsArg.sessionToken** [SessionTokenLike](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/search_session/#sessiontokenlike)  |  |
| **optionsArg.signal** AbortSignal?  |  |

###### Returns

[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[SearchBoxRetrieveResponse](#searchboxretrieveresponse)>

### Programmatic search

##### category()

[SearchBoxCore#category](#searchboxcore#category) makes it possible to browse entire categories of results, like coffee shops, hotels, and bookstores around a specific location or along a route and returns feature collection in [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) format.

**Legal terms:**

The [Mapbox Terms of Service](https://www.mapbox.com/tos/) states any rendering of a feature suggestion must be using Mapbox map services (for example, displaying results on Google Maps or MapKit JS is not allowed).

**Disclaimer:**

The failure of Mapbox to exercise or enforce any right or provision of these Terms will not constitute a waiver of such right or provision.

###### Parameters

| Name | Description |
| --- | --- |
| **category** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  |  |
| **optionsArg** Options (default `{}`) |  |
| **optionsArg.permanent** [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?  |  |
| **optionsArg.signal** AbortSignal?  |  |

###### Returns

[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[SearchBoxCategoryResponse](#searchboxcategoryresponse)>

##### reverse()

[SearchBoxCore#reverse](#searchboxcore#reverse) endpoint allows you to look up a single pair of coordinates and returns the geographic feature or features that exist at that location. The response to a request is a [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) FeatureCollection.

Using the limit parameter, you can increase the maximum number of results up to 10. Pagination is not available, but this feature may be added in a later release. There is not an option to customize the order of search results.

Multiple feature suggestions may be returned from a single search query, for example in an airport with multiple terminals.

**Legal terms:**

The [Mapbox Terms of Service](https://www.mapbox.com/tos/) states any rendering of a feature suggestion must be using Mapbox map services (for example, displaying results on Google Maps or MapKit JS is not allowed).

**Disclaimer:**

The failure of Mapbox to exercise or enforce any right or provision of these Terms will not constitute a waiver of such right or provision.

###### Parameters

| Name | Description |
| --- | --- |
| **lngLat** ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [LngLatLike](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/geography/#lnglatlike))  | Either a [LngLatLike](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/geography/#lnglatlike) object or string in 'lng,lat' comma-separated format. |
| **optionsArg** Options (default `{}`) |  |
| **optionsArg.signal** AbortSignal?  |  |

###### Returns

[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[SearchBoxReverseResponse](#searchboxreverseresponse)>

Was this section on SearchBoxCore helpful?[Yes](null)[No](null)

## Options and Type Definitions

### SearchBoxOptions

Options object for configuring [SearchBoxCore](#searchboxcore), mapped to [Search Box API](https://docs.mapbox.com/api/search/search-box/) parameters.

#### Type

[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

#### Properties

<table class="table table--fixed table--compact" style="width:100%;table-layout:fixed"><colgroup><col width="28%"><col></colgroup><thead><tr class="bg-gray-faint"><th style="border-top-left-radius:4px">Name</th><th style="border-top-right-radius:4px">Description</th></tr></thead><tbody><tr><td><strong>bbox</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="/mapbox-search-js/api/core/geography/#lnglatboundslike">LngLatBoundsLike</a>)</span>&nbsp;</td><td><span>Limit results to only those contained within the supplied bounding box.</span></td></tr><tr><td><strong>country</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>An <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166 alpha-2 country code</a> to be returned.<p>If not specified, results will not be filtered by country.</p></span></td></tr><tr><td><strong>eta_type</strong>&nbsp;<span><code>"navigation"</code></span>&nbsp;</td><td><span>Used to estimate the time of arrival from the location specified in <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> .<p>The only allowed value for this parameter is navigation. This parameter, along with <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> and <a href="#searchboxoptions#navigation_profile">SearchBoxOptions#navigation_profile</a>, is required for ETA calculations.</p><p>ETA calculations will incur additional latency.</p></span></td></tr><tr><td><strong>language</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>The <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> to be returned.<p>If not specified, <code>en</code> will be used.</p></span></td></tr><tr><td><strong>limit</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</span>&nbsp;</td><td><span>The number of results to return, up to <code>10</code> .</span></td></tr><tr><td><strong>navigation_profile</strong>&nbsp;<span>(<code>"driving"</code> | <code>"walking"</code> | <code>"cycling"</code>)</span>&nbsp;</td><td><span>The navigation routing profile to use for distance/eta calculations.<p>For distance calculations, both <a href="#searchboxoptions#navigation_profile">SearchBoxOptions#navigation_profile</a> and <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> must be specified.</p><p>For ETA calculations: <a href="#searchboxoptions#navigation_profile">SearchBoxOptions#navigation_profile</a>, <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a>, and <a href="#searchboxoptions#eta_type">SearchBoxOptions#eta_type</a> must be specified.</p></span></td></tr><tr><td><strong>origin</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="/mapbox-search-js/api/core/geography/#lnglatlike">LngLatLike</a>)</span>&nbsp;</td><td><span>The location from which to calculate distance. <strong>This parameter may incur additional latency.</strong><p>When both <a href="#searchboxoptions#proximity">SearchBoxOptions#proximity</a> and <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> are specified, <code>origin</code> is interpreted as the target of a route, while <code>proximity</code> indicates the current user location.</p><p>For distance calculations, both <a href="#searchboxoptions#navigation_profile">SearchBoxOptions#navigation_profile</a> and <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> must be specified.</p><p>For ETA calculations: <a href="#searchboxoptions#navigation_profile">SearchBoxOptions#navigation_profile</a>, <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a>, and <a href="#searchboxoptions#eta_type">SearchBoxOptions#eta_type</a> must be specified.</p></span></td></tr><tr><td><strong>poi_category</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>Limit results to those that belong to one or more categories, provided as a comma-separated list.</span></td></tr><tr><td><strong>poi_category_exclusions</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>A comma-separated list of canonical category names that limits POI results to those that are not part of the given categories.</span></td></tr><tr><td><strong>proximity</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="/mapbox-search-js/api/core/geography/#lnglatlike">LngLatLike</a>)</span>&nbsp;</td><td><span>Bias the response to favor results that are closer to this location.<p>When both <a href="#searchboxoptions#proximity">SearchBoxOptions#proximity</a> and <a href="#searchboxoptions#origin">SearchBoxOptions#origin</a> are specified, <code>origin</code> is interpreted as the target of a route, while <code>proximity</code> indicates the current user location.</p></span></td></tr><tr><td><strong>rich_metadata_provider</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>A comma-separated list of rich metadata providers to include in a suggestion result.</span></td></tr><tr><td><strong>route</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>A polyline encoded linestring describing the route to be used for searching.<p>Both polyline5 and polyline6 precision are accepted, but must be specified using the <a href="#searchboxoptions#route_geometry">SearchBoxOptions#route_geometry</a> parameter.</p></span></td></tr><tr><td><strong>route_geometry</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>Passed in conjunction with a route polyline describing its precision. Options are polyline or polyline6. If this parameter is not provided with a <a href="#searchboxoptions#route">SearchBoxOptions#route</a> , the default is polyline.<p>Accurate results depend on including the correct route_geometry for the <a href="#searchboxoptions#route">SearchBoxOptions#route</a> provided.</p></span></td></tr><tr><td><strong>sar_type</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>This indicates that the user intends to perform a higher cost search-along-route request.<p>This should be included when <a href="#searchboxoptions#route">SearchBoxOptions#route</a> is included and should have a value of isochrone.</p></span></td></tr><tr><td><strong>time_deviation</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</span>&nbsp;</td><td><span>Maximum detour in estimated minutes from route.</span></td></tr><tr><td><strong>types</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set">Set</a>&lt;<a href="#searchboxadministrativeunittypes">SearchBoxAdministrativeUnitTypes</a>&gt;)</span>&nbsp;</td><td><span>Limit results to one or more types of features. If no types are specified, all possible types may be returned.<p>Reference: <a href="https://docs.mapbox.com/api/search/search-box/#administrative-unit-types">https://docs.mapbox.com/api/search/search-box/#administrative-unit-types</a></p></span></td></tr></tbody></table>

Was this section on SearchBoxOptions helpful?[Yes](null)[No](null)

### SearchBoxSuggestion

A `SearchBoxSuggestion` object represents a suggestion result from the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/).

SearchBoxSuggestion objects are "part one" of the two-step interactive search experience, and include useful information about the result, such as: [SearchBoxSuggestion#name](#searchboxsuggestion#name), [SearchBoxSuggestion#full_address](#searchboxsuggestion#full_address), and [SearchBoxSuggestion#maki](#searchboxsuggestion#maki).

SearchBoxSuggestion objects do not include geographic coordinates. To get the coordinates of the result, use [SearchBoxCore#retrieve](#searchboxcore#retrieve).

For tracking purposes, it is useful for any follow-up requests based on this suggestion to include same [SessionToken](https://docs.mapbox.com/mapbox-search-js/mapbox-search-js/api/core/search_session/#sessiontoken) as the original request.

Reference: [https://docs.mapbox.com/api/search/search-box/#response-get-suggested-results](https://docs.mapbox.com/api/search/search-box/#response-get-suggested-results)

#### Type

[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

#### Properties

| Name | Description |
| --- | --- |
| **added_distance** [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)  | The distance added to an input route by including the given suggestion, in meters. |
| **added_time** [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)  | The estimated time added to an input route by including the given suggestion, in minutes. |
| **address** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The address of the result containing the address number and street. |
| **brand** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The brand name of the result, if it is a POI and is applicable. |
| **brand_id** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The canonical brand ID of the result, if it is a POI and is applicable. |
| **context** [SuggestionJSONContext](#suggestionjsoncontext)  | The context of the feature. This context has layers that follow the [Administrative unit types](https://docs.mapbox.com/api/search/search-box/#administrative-unit-types) . |
| **distance** [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)  | An approximate distance to the `origin` location, in meters. Only provided when `origin` and `navigation_profile` are used in the request. |
| **eta** [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)  | The estimated time of arrival from the origin point to the feature, in minutes. Only provided when `eta_type` , `origin` , and `navigation_profile` are used in the request. If an address is not on the road network, an ETA will not be provided. |
| **external_ids** any  | An object containing the IDs of the feature found in external databases, with the keys being the data source names and the values being the IDs. |
| **feature_type** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The type of the result. For POIs, this will be `poi` . For categories, this will be `category` . For address-type results, the global context hierarchy is used ( `country` , `region` , `postcode` , `district` , `place` , `locality` , `neighborhood` , `address` ). See the [Administrative unit types section](https://docs.mapbox.com/api/search/search-box/#administrative-unit-types) for details about these types. |
| **full_address** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The full address of the result, which concatenates [SearchBoxSuggestion#address](#searchboxsuggestion#address) and [SearchBoxSuggestion#place_formatted](#searchboxsuggestion#place_formatted) . |
| **language** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | An IETF language tag indicating the language of the result. |
| **maki** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | A string representing an associated [Maki icon](https://docs.mapbox.com/help/glossary/maki/) to use for this result. |
| **mapbox_id** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The id to use with [SearchBoxCore#retrieve](#searchboxcore#retrieve) to obtain full feature details. |
| **metadata** any  | An object containing additional metadata for the feature, if applicable. |
| **name** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The name of the feature. |
| **name_preferred** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The preferred name of the feature, if different than [SearchBoxSuggestion#name](#searchboxsuggestion#name) . |
| **place_formatted** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | A formatted string of result context comprised of the place, region, country, and postcode. |
| **poi_category** [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>  | An array including the POI categories the result falls into, if it is a POI. |

#### Example

```js
const search = new SearchBoxCore({ accessToken: 'pk.my-mapbox-access-token' });

const sessionToken = new SessionToken();
const result = await search.suggest('Washington D.C.', { sessionToken });
if (result.suggestions.length === 0) return;

const suggestion = result.suggestions[0];

const { features } = await search.retrieve(suggestion, { sessionToken });
doSomethingWithCoordinates(features);
```

Was this section on SearchBoxSuggestion helpful?[Yes](null)[No](null)

### SearchBoxFeatureSuggestion

A `SearchBoxFeatureSuggestion` object represents a [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) suggestion result from the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/).

Feature suggestions are "part two" of the two-step interactive search experience and includes geographic coordinates. Multiple feature suggestions may be returned from a single search query, for example in an airport with multiple terminals.

As per the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/), this will always be [Point](https://geojson.org/geojson-spec.html#point).

**Legal terms:**

The [Mapbox Terms of Service](https://www.mapbox.com/tos/) states any rendering of a feature suggestion must be using Mapbox map services (for example, displaying results on Google Maps or MapKit JS is not allowed).

**Disclaimer:**

The failure of Mapbox to exercise or enforce any right or provision of these Terms will not constitute a waiver of such right or provision.

#### Type

any

#### Example

```js
const featureSuggestion = {
  type: 'Feature',
  geometry: {
    type: 'Point',
    coordinates: [0,0]
  },
  properties: {
    name: 'Washington D.C.',
  }
};
```

#### Related

-   [Response: Retrieve feature](https://docs.mapbox.com/api/search/search-box/#response-retrieve-a-suggested-feature)

Was this section on SearchBoxFeatureSuggestion helpful?[Yes](null)[No](null)

### SearchBoxFeatureProperties

Raw [GeoJSON](https://docs.mapbox.com/help/glossary/geojson/) feature properties from the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/).

Reference: [https://docs.mapbox.com/api/search/search-box/#response-retrieve-a-suggested-feature](https://docs.mapbox.com/api/search/search-box/#response-retrieve-a-suggested-feature)

Extends Omit<SearchBoxSuggestion, 'distance' \| 'eta' \| 'added_distance' \| 'added_time'>.

#### Type

[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

#### Properties

| Name | Description |
| --- | --- |
| **bbox** [[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)]  | A bounding box in the format `minimum longitude` , `minimum latitude` , `maximum longitude` , `maximum latitude` . |
| **coordinates** {accuracy: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, longitude: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), latitude: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), routable_points: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), latitude: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), longitude: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)}>?}  | The geographical coordinates of the result. |

#### Related

-   [SearchBoxFeatureSuggestion](#searchboxfeaturesuggestion)
-   [SearchBoxSuggestion](#searchboxsuggestion)

Was this section on SearchBoxFeatureProperties helpful?[Yes](null)[No](null)

### SearchBoxSuggestionResponse

A `SearchBoxSuggestionResponse` object represents a returned data object from the `suggest` endpoint of the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/#response-get-suggested-results).

#### Type

[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

#### Properties

| Name | Description |
| --- | --- |
| **attribution** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The attribution data for results. |
| **suggestions** [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[SearchBoxSuggestion](#searchboxsuggestion)>  | The returned suggestion objects. |

Was this section on SearchBoxSuggestionResponse helpful?[Yes](null)[No](null)

### SearchBoxRetrieveResponse

A `SearchBoxRetrieveResponse` object represents a returned data object from the `/retrieve` endpoint of the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/#response-retrieve-a-suggested-feature).

#### Type

[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

#### Properties

| Name | Description |
| --- | --- |
| **attribution** [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)  | The attribution data for results. |
| **features** [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[SearchBoxFeatureSuggestion](#searchboxfeaturesuggestion)>  | The returned feature objects. |

Was this section on SearchBoxRetrieveResponse helpful?[Yes](null)[No](null)

### SearchBoxAdministrativeUnitTypes

Administrative unit types for the [Mapbox Search Box API](https://docs.mapbox.com/api/search/search-box/).

#### Type

(`"country"` \| `"region"` \| `"postcode"` \| `"district"` \| `"place"` \| `"locality"` \| `"neighborhood"` \| `"street"` \| `"address"` \| `"block"`)

#### Related

-   [https://docs.mapbox.com/api/search/search-box/#administrative-unit-types](https://docs.mapbox.com/api/search/search-box/#administrative-unit-types)

Was this section on SearchBoxAdministrativeUnitTypes helpful?[Yes](null)[No](null)