# Logstash count API rather than \_search API

**URL:** <https://discuss.elastic.co/t/logstash-count-api-rather-than-search-api/186859>\
**Category:** Logstash\
**Created:** [June 21, 2019, 10:00am UTC](https://discuss.elastic.co/t/logstash-count-api-rather-than-search-api/186859 "2019-06-21T10:00:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [June 21, 2019, 10:00am UTC](https://discuss.elastic.co/t/logstash-count-api-rather-than-search-api/186859/1 "2019-06-21T10:00:50Z")

</div>

Hello.  
Is there a way to use \_count API in logstash input elasticsearch plugin rather than the default \_search one?

I know that I can solve this by using exec plugin and some custom curl command, but I wonder if there is a way without any plugin modification.

Thanks!

---

<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 19, 2019, 10:05am UTC](https://discuss.elastic.co/t/logstash-count-api-rather-than-search-api/186859/2 "2019-07-19T10:05:09Z")

</div>

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