# How to get whole results when searching with OAuth Service?

**URL:** <https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228>\
**Category:** Elastic Search\
**Tags:** elastic-workplace-search\
**Created:** [May 18, 2021, 3:04am UTC](https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228 "2021-05-18T03:04:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chen.lu](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@chen.lu](https://discuss.elastic.co/u/chen.lu)\
**Post date:** [May 18, 2021, 3:04am UTC](https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228/1 "2021-05-18T03:04:17Z")

</div>

Hello,  
I am using OAuth Service to get search results from workplace search. But when I got the results from workplace search, I can see only top 10 results. How can I get the whole results from workplcace search?

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [May 18, 2021, 2:33pm UTC](https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228/2 "2021-05-18T14:33:44Z")

</div>

Hi @chen.lu, thanks for using Workplace Search!

To clarify, you're using the Workplace Search Search API, which required you to create an OAuth API Token via the [OAuth Service](https://www.elastic.co/guide/en/workplace-search/current/workplace-search-search-oauth.html)?

If that's the case, I think you're looking for the [pagination settings](https://www.elastic.co/guide/en/workplace-search/current/workplace-search-search-api.html#search-page) for the Search API. This will allow you to retrieve up to 100 documents at a time, and then to grab the "next" set of documents regardless of the size.

---

<div class="post-metadata">

**Author:** ![chen.lu](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@chen.lu](https://discuss.elastic.co/u/chen.lu)\
**Post date:** [June 1, 2021, 6:21am UTC](https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228/3 "2021-06-01T06:21:50Z")

</div>

Hi Sean,  
Thank you very much. I found the pagination setting and I can get more results now.

---

<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:** [October 31, 2022, 2:48am UTC](https://discuss.elastic.co/t/how-to-get-whole-results-when-searching-with-oauth-service/273228/4 "2022-10-31T02:48:04Z")

</div>

Closed on October 31, 2022, 2:48am UTC

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