# Download 200k records from Elasticsearch

**URL:** <https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960>\
**Category:** Elasticsearch\
**Created:** [August 11, 2022, 7:42pm UTC](https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960 "2022-08-11T19:42:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snambu5878](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snambu5878/32/45746_2.png) [@snambu5878](https://discuss.elastic.co/u/snambu5878)\
**Post date:** [August 11, 2022, 7:42pm UTC](https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960/1 "2022-08-11T19:42:24Z")

</div>

Hi Everyone,

We have built custom analytics UI (React) and using Elasticsearch as backend for SQL queries/analysis.

We have Export results button that exports the queried dataset. The requirement is to download upto 200k records. ES has a limitation to download only 10k out of the box and is not recommended to increase the limits more than that due to memory issues.

We are using ES \_sql api for queries and results. Need your help in implementing a robust solution.

I have checked scroll api and search api options and looks like its complicated and I am unable to visualize on how to concat and download the final file.

Appreciate your help.

Thanks,  
Sri

---

<div class="post-metadata">

**Author:** ![snambu5878](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snambu5878/32/45746_2.png) [@snambu5878](https://discuss.elastic.co/u/snambu5878)\
**Post date:** [August 15, 2022, 2:09pm UTC](https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960/2 "2022-08-15T14:09:53Z")

</div>

Hi Everyone,

Please provide your suggestions on this topic.

Thanks,  
Sri

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 15, 2022, 2:54pm UTC](https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960/3 "2022-08-15T14:54:13Z")

</div>

What have you tried and how are you making queries?

You will need to paginate your requests according to the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#paginate-search-results) , read the part about [search\_after](https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after).

---

<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 12, 2022, 2:54pm UTC](https://discuss.elastic.co/t/download-200k-records-from-elasticsearch/311960/4 "2022-09-12T14:54:30Z")

</div>

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