---
title: "Search V1"
method: POST
path: "/api/{index}/_search"
tags: ["Search"]
---

# Search V1

`POST /api/{index}/_search`

## Path parameters

- `index` string, required

## Request body

- V1ZincQuery
  - `_source` string[]
  - `aggs` object
  - `explain` boolean
  - `from` integer
  - `highlight` MetaHighlight
    - `fields` object
    - `fragment_size` integer
    - `number_of_fragments` integer
    - `post_tags` string[]
    - `pre_tags` string[]
  - `max_results` integer
  - `query` V1QueryParams
    - `boost` integer
    - `end_time` string
    - `field` string
    - `start_time` string
    - `term` string
    - `terms` array[] — For multi phrase query
      - string[]
  - `search_type` string — SearchType is the type of search to perform. Can be match, match_phrase, query_string, etc
  - `sort_fields` string[]

## Response `200`

OK

- MetaSearchResponse
  - `_shards` MetaShards
    - `failed` integer
    - `skipped` integer
    - `successful` integer
    - `total` integer
  - `aggregations` object
  - `error` string
  - `hits` MetaHits
    - `hits` MetaHit[]
      - `@timestamp` string
      - `_id` string
      - `_index` string
      - `_score` number
      - `_source` object
      - `_type` string
      - `fields` object
      - `highlight` object
    - `max_score` number
    - `total` MetaTotal
      - `value` integer — Count of documents returned
  - `timed_out` boolean
  - `took` integer — Time it took to generate the response

## Other responses

- `400` — Bad Request

## Changes

- **2026-07-17** `c7ce1991bb9a` — 1 breaking, 3 info
  - the `aggregations/additionalProperties/buckets` response's property type changed from `array` to `object` for status `200`
  - added the optional property `_shards` to the response with the `200` status
  - added the optional property `aggregations/additionalProperties/interval` to the response with the `200` status
  - added the optional property `hits/hits/items/fields` to the response with the `200` status
- **2022-08-06** `64901d9f1a5b` — 1 breaking, 1 warning, 5 info
  - the `highlight/fields` request property type changed from `array` to `object`
  - removed the request property `highlight/style`
  - added the new optional request property `highlight/fragment_size`
  - added the new optional request property `highlight/number_of_fragments`
  - …3 more
- **2022-06-24** `b796c7453ce7` — 2 breaking, 8 warning, 1 info
  - the `highlight/fields` request property type changed from `object` to `array`
  - the `aggregations/additionalProperties/buckets` response's property type changed from `object` to `array` for status `200`
  - removed the request property `highlight/fragment_size`
  - removed the request property `highlight/number_of_fragments`
  - …7 more

[Change history](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api/changes/api/:index/_search/post.md)

---

[API](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api.md) · [All operations](https://skmtc.dev/zincsearch/apis/zinc-search-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zincsearch/zinc-search-engine-api/revisions/c7ce1991bb9a/schema)
