Get tokens from text analysis Beta

POST /{index}/_analyze

The analyze API performs analysis on a text string and returns the resulting tokens.

Path parameters

  • index string Required

    Index used to derive the analyzer. If specified, the analyzer or field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.

application/json

Body

Responses

POST /{index}/_analyze
curl \
 -X POST http://api.example.com/{index}/_analyze \
 -H "Content-Type: application/json" \
 -d '"{\n  \"analyzer\" : \"standard\",\n  \"text\" : \"Quick Brown Foxes!\"\n}"'
Request example
{
  "analyzer" : "standard",
  "text" : "Quick Brown Foxes!"
}