Skip to main content

Search Box

Search Box is a Mapbox Search JS feature that allows users to quickly search for places, addresses, and points of interest. It is powered by the Mapbox Search Box API and can be used in a web or Node environment.

Search Box UI components can be dropped into websites as standalone elements or as part of a comprehensive map experience.

Demo

Use this fully-functional example to try out the Search Box functionality and see how it integrates with a Mapbox GL JS map.

EXAMPLE
Add Search Box to a Web Map

Try out a working example showing the <mapbox-search-box> HTML custom element bound to a Mapbox GL JS map.

Get started

See our Quickstart guides to learn how to install the correct framework and add Search Box to your project:

  • Web - Rich UI web components and JavaScript functions ready to drop into any webpage
  • React - Modern React components and hooks wrapping functionality from the standard web components

API Reference Docs

Full reference documentation for this feature's HTML custom elements, properties, options, components, and hooks are available:

Advanced Usage (Build your own UI)

For interacting with the Search Box API in a JavaScript or Node environment, you can use the Mapbox Search JS Core Framework.

Want to use Search Box on mobile?

If you target iOS and Android devices, use our Mobile SDKs with ready-made app examples:

Was this page helpful?