# 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:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vissu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vissu/32/33833_2.png) [@vissu](https://discuss.elastic.co/u/vissu)
#### Post date: [August 13, 2018, 11:26am UTC](https://discuss.elastic.co/t/api-to-get-indexing-rate/144159/1 "2018-08-13T11:26:30Z")

</div>

Hi Team,

Is there any api to get indexing rate of an index ?  
When i use stats api i get only these, even for he current index.  
"indexing": {  
"index\_total": 2440,  
"index\_time\_in\_millis": 936,  
"index\_current": 0,  
"index\_failed": 0,  
"delete\_total": 0,  
"delete\_time\_in\_millis": 0,  
"delete\_current": 0,  
"noop\_update\_total": 0,  
"is\_throttled": false,  
"throttle\_time\_in\_millis": 0  
}  
Thanks  
Vishnu

---

<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

---

<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: [September 17, 2018, 12:13pm UTC](https://discuss.elastic.co/t/api-to-get-indexing-rate/144159/3 "2018-09-17T12:13:11Z")

</div>

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