Mapbox Search JS is in public beta. During the public beta phase, frameworks may be subject to potential changes as they stabilize.
The Mapbox Search API is in private beta for worldwide coverage and in public beta for Japan. Unless you are part of the private beta program, the Mapbox Search API is only available for Japanese-language queries for locations in Japan.
Stay tuned for upcoming updates to Mapbox Search JS that will additionally enable use of publicly available Mapbox APIs.
Mapbox Search JS offers single-box search, which allows you to search by either place name, address, or category.
MapboxSearchBox, also available as the element
is an element that lets you search for places, addresses, and landmarks using
the Mapbox Search API.
It can control a Mapbox GL JS map to zoom to the selected result.
MapboxSearchBox implements the IControl
To use this element, you must have a Mapbox access token.
const search = new MapboxSearchBox();search.accessToken = '<your access token here>';map.addControl(search);
<mapbox-search-boxaccess-token="<your access token here>"proximity="0,0"></mapbox-search-box>