---
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

---

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