Beta
Mapbox Search JS

Core Reference

Search JS Core provides a higher level framework for the Mapbox Search Service. The framework provides strong typing for the APIs, handles requests/responses automatically, and can manage session tokens.

This documentation is divided into several sections:

  • Core autofill. The MapboxAutofill object is your connection to the Mapbox Autofill API. It lets you query interactive address suggestions with validation features.
  • Core search. The MapboxSearch object is your connection to the Mapbox Search API. It lets you query interactive search suggestions, geographic coordinates, and reverse geocoding.
  • Search session. The SearchSession object is a high-level session manager for wrapped MapboxAutofill and MapboxSearch objects. It also lets you debounce and abort suggestion calls.
  • Geography and geometry. This section includes general utilities and types that relate to working with and manipulating geographic information or geometries.
  • Fetch polyfills. The polyfillFetch function allows polyfilling the Fetch API and AbortController APIs on unsupported platforms.

Each section describes classes or objects as well as their properties, parameters, instance members, and associated events. Many sections also include inline code examples and related resources.