# Gathering Top Values Through Elk API

**URL:** <https://discuss.elastic.co/t/gathering-top-values-through-elk-api/337019>\
**Category:** Elasticsearch\
**Created:** [June 27, 2023, 6:52pm UTC](https://discuss.elastic.co/t/gathering-top-values-through-elk-api/337019 "2023-06-27T18:52:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hi\_xavier](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@hi\_xavier](https://discuss.elastic.co/u/hi_xavier)\
**Post date:** [June 27, 2023, 6:52pm UTC](https://discuss.elastic.co/t/gathering-top-values-through-elk-api/337019/1 "2023-06-27T18:52:15Z")

</div>

Hi,

Is it possible, with the combination of Elk API and Aggregations , to gather top values. For example, the top 5 error messages from a set of results?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2023, 6:52pm UTC](https://discuss.elastic.co/t/gathering-top-values-through-elk-api/337019/2 "2023-07-25T18:52:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
