# Getting all documents for document type - Swiftype

**URL:** <https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [June 10, 2024, 9:36pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201 "2024-06-10T21:36:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/feddy/32/135191_2.png) [@Feddy](https://discuss.elastic.co/u/Feddy)\
**Post date:** [June 10, 2024, 9:36pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201/1 "2024-06-10T21:36:52Z")

</div>

I'm using Swiftype Site Search documentation to get all documents of a certain documentType. However, I was originally only able to get 50 documents. After going through the threads, I saw that I could add the query parameter per\_page, which got capped at 200.

I have a little under 400 documents for this document type. Ideally I want to get everything in one call but I don't mind paging. I tried paging as seen in the public search API but that didn't work. Perhaps I'm doing it wrong. The reason I am trying to do this is to sync data in swiftype with my database, so that I can then automate updates to the swiftype engine by referring to swiftype document's external\_id.

This is an example endpoint:

```auto
https://api.swiftype.com/api/v1/engines/test_company/document_types/specs/documents.json?auth_token={authToken}&per_page=200

```

---

<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:** [June 10, 2024, 10:04pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201/2 "2024-06-10T22:04:50Z")

</div>

Have you fetched the subsequent pages?  
Like:  
`&page=2`

---

<div class="post-metadata">

**Author:** ![Feddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/feddy/32/135191_2.png) [@Feddy](https://discuss.elastic.co/u/Feddy)\
**Post date:** [June 10, 2024, 10:05pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201/3 "2024-06-10T22:05:53Z")

</div>

> [@Feddy](#):
>
> document

Amazing, thank you!

For future reference, what doc url did you use to resolve my question with?

---

<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:** [June 11, 2024, 2:31pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201/4 "2024-06-11T14:31:01Z")

</div>

It's documented here: [Pagination | Swiftype Documentation](https://swiftype.com/documentation/site-search/searching/pagination)

---

<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:** [July 9, 2024, 2:31pm UTC](https://discuss.elastic.co/t/getting-all-documents-for-document-type-swiftype/361201/5 "2024-07-09T14:31:29Z")

</div>

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