---
title: "Executes an Elasticsearch DSL query JSON via POST and returns hits that match the query."
method: POST
path: "/search"
---

# Executes an Elasticsearch DSL query JSON via POST and returns hits that match the query.

`POST /search`

To execute a query, the POST method must provide 1) a request body that specifies an [Elasticsearch Query DSL statement](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html) 2) a bearer token in the Authorization header supplied by HuBMAP. Results are limited to those authorized by the bearer token. Uses the <strong>entities</strong> index by default.

## Query parameters

- `produce-clt-manifest` string

## Request body

- object

## Response `200`

Returns search hits from backend Elasticsearch that match the query defined in the request JSON

- object

## Other responses

- `303` — If the total response payload exceeds 10 MB, the response is returned via an S3 bucket. A 303 HTTP response code will be returned with the redirect URL where the query can be retrieved.
- `401` — A valid globus token in the `Authorization` header (Bearer scheme) is required in request
- `403` — The globus token used in the `Authorization` header doesn't have the right group access permission
- `404` — Bad request or no data found. A JSON body and appropriate Content-Type header are required in request, additionally if no data has been found based on the query when the produce-clt-manifest=true option is used.
- `504` — There is a maximum query and response time of 30 seconds. If the query response takes 30 seconds or longer, a 504 HTTP response code will be returned.

## Changes

- **2025-04-02** `c727e6e09a1c` — 8 info
  - api operation id `search-post` removed and replaced with ``
  - api tag `search` removed
  - added the non-success response with the status `303`
  - added the non-success response with the status `401`
  - …4 more

[Change history](https://skmtc.dev/hubmapconsortium/apis/hubmap-search-api/changes/search/post.md)

---

[API](https://skmtc.dev/hubmapconsortium/apis/hubmap-search-api.md) · [All operations](https://skmtc.dev/hubmapconsortium/apis/hubmap-search-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hubmapconsortium/hubmap-search-api/revisions/7557b0de2f46/schema)
