# How to fetch Ids from more than 10k records in single response

**URL:** https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749
**Category:** Elasticsearch
**Created:** [July 19, 2023, 7:15am UTC](https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749 "2023-07-19T07:15:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Paras\_Rangani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paras_rangani/32/123635_2.png) [@Paras\_Rangani](https://discuss.elastic.co/u/Paras_Rangani)
#### Post date: [July 19, 2023, 7:15am UTC](https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749/1 "2023-07-19T07:15:18Z")

</div>

I have around 1 million documents , after applying the filters I get more than 10k records, but I do not want whole documents , instead I want the IDS of that records in a single call.How can I do that ?

---

<div class="post-metadata">

### Author: ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)
#### Post date: [July 19, 2023, 11:02am UTC](https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749/2 "2023-07-19T11:02:23Z")

</div>

Hi @Paras_Rangani

You can use [\_source](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering) to select the fields you want. As for pagination, you can use the [strategies](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html).

---

<div class="post-metadata">

### Author: ![Paras\_Rangani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paras_rangani/32/123635_2.png) [@Paras\_Rangani](https://discuss.elastic.co/u/Paras_Rangani)
#### Post date: [July 19, 2023, 11:21am UTC](https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749/3 "2023-07-19T11:21:20Z")

</div>

Using \_source I am getting 10k IDs Max , I want every Id in single record (1,2,3,4,5, ... 10K+)  
@RabBit_BR

---

<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: [August 16, 2023, 11:22am UTC](https://discuss.elastic.co/t/how-to-fetch-ids-from-more-than-10k-records-in-single-response/338749/4 "2023-08-16T11:22:18Z")

</div>

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