# How to use from and size in search api?

**URL:** https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079
**Category:** Elasticsearch
**Created:** [January 10, 2017, 12:25pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079 "2017-01-10T12:25:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [January 10, 2017, 12:25pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079/1 "2017-01-10T12:25:40Z")

</div>

Hi everyone,  
What is the correct syntax of using from and size in search api not using body?  
When i am using this syntax it is showing error..  
syntax: [http://localhost:9200/teststats/\_search?from=1,size=3](http://localhost:9200/teststats/_search?from=1,size=3)

Can anyone help me in sorting this?

---

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [January 10, 2017, 12:55pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079/2 "2017-01-10T12:55:03Z")

</div>

i got it  
This is the syntax:  
[http://localhost:9200/teststats/\_search?from=1&size=3](http://localhost:9200/teststats/_search?from=1&size=3)

---

<div class="post-metadata">

### Author: ![Ravi\_Shanker\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@Ravi\_Shanker\_Reddy](https://discuss.elastic.co/u/Ravi_Shanker_Reddy)
#### Post date: [January 10, 2017, 12:56pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079/3 "2017-01-10T12:56:16Z")

</div>

Please take care of this from and size. It will affect your heap very lot when you have high data.

---

<div class="post-metadata">

### Author: ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)
#### Post date: [January 10, 2017, 12:57pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079/4 "2017-01-10T12:57:58Z")

</div>

Instead of from and size, what i have to use?

---

<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: [February 7, 2017, 12:58pm UTC](https://discuss.elastic.co/t/how-to-use-from-and-size-in-search-api/71079/5 "2017-02-07T12:58:09Z")

</div>

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