---
title: "Search content using Elasticsearch query (POST)"
method: POST
path: "/api/es/search"
tags: ["Elasticsearch Content Search"]
---

# Search content using Elasticsearch query (POST)

`POST /api/es/search`

Executes an Elasticsearch query against dotCMS content in a portlet context. The request body accepts an Elasticsearch JSON query. Results include matching contentlets and the raw Elasticsearch response metadata.

## Query parameters

- `depth` string
- `live` boolean
- `userid` string
- `allCategoriesInfo` boolean

## Request body

- string

## Response `200`

Elasticsearch search results returned successfully

- object — Elasticsearch search results containing contentlets matching the query and raw ES response metadata

## Other responses

- `400` — Invalid Elasticsearch query syntax
- `401` — Authentication required

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
