# Api to get indexing rate

**URL:** https://discuss.elastic.co/t/api-to-get-indexing-rate/144159
**Category:** Elasticsearch
**Created:** [August 13, 2018, 11:26am UTC](https://discuss.elastic.co/t/api-to-get-indexing-rate/144159 "2018-08-13T11:26:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)
#### Post date: [August 20, 2018, 12:13pm UTC](https://discuss.elastic.co/t/api-to-get-indexing-rate/144159/2 "2018-08-20T12:13:11Z")

</div>

Hi,

this is not available directly but you can call that API every N seconds and calculate the difference in indexed documents. Say you call the API twice and get:

- At second 20: `index_total` = 3700
- At second 25: `index_total` = 17700

then you can calculate the indexing throughput as (17700 - 3700) / (25 - 20) = 14000 / 5 = 2800 documents / s. If you do that in a loop you can calculate the indexing throughput over time.

Daniel

---

_[View the full topic](https://discuss.elastic.co/t/api-to-get-indexing-rate/144159)._
