[[reference-search_mvt]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.searchMvt

Search a vector tile. Search a vector tile for geospatial values.

{ref}/search-vector-tile-api.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(SearchMvtRequest, options?): Promise<SearchMvtResponse>
----

[discrete]
===== `SearchMvtRequest`

[source,ts]
----
interface SearchMvtRequest extends <<RequestBase>> {
  index: <<Indices>>
  field: <<Field>>
  zoom: SearchMvtZoomLevel
  x: SearchMvtCoordinate
  y: SearchMvtCoordinate
  aggs?: Record<string, AggregationsAggregationContainer>
  buffer?: <<integer>>
  exact_bounds?: boolean
  extent?: <<integer>>
  fields?: <<Fields>>
  grid_agg?: SearchMvtGridAggregationType
  grid_precision?: <<integer>>
  grid_type?: SearchMvtGridType
  query?: QueryDslQueryContainer
  runtime_mappings?: MappingRuntimeFields
  size?: <<integer>>
  sort?: <<Sort>>
  track_total_hits?: SearchTrackHits
  with_labels?: boolean
}
----

[discrete]
===== `SearchMvtResponse`

[source,ts]
----
type SearchMvtResponse = <<MapboxVectorTiles>>
----

