# Documents API returning empty list (0 Document found)

**URL:** <https://community.prismic.io/t/documents-api-returning-empty-list-0-document-found/15369>\
**Category:** Developing with Prismic\
**Tags:** rest-api\
**Created:** [February 27, 2024, 10:34am UTC](https://community.prismic.io/t/documents-api-returning-empty-list-0-document-found/15369 "2024-02-27T10:34:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwlt](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@bwlt](https://community.prismic.io/u/bwlt)\
**Post date:** [February 27, 2024, 10:34am UTC](https://community.prismic.io/t/documents-api-returning-empty-list-0-document-found/15369/1 "2024-02-27T10:34:22Z")

</div>

Hello, anyone can please help me with the given issue:  
[https://satispay-website.prismic.io/api/v2/documents/search?ref=Zd0JRBEAAB8AyADS&q=[[at(document.type%2C"page")]]&src=apibrowser#format=html](https://satispay-website.prismic.io/api/v2/documents/search?ref=Zd0JRBEAAB8AyADS&q=%5B%5Bat(document.type%2C%22page%22)%5D%5D&src=apibrowser#format=html)  
returns no documents.

Using graphql returns 249 documents:  
[https://satispay-website.prismic.io/graphql?query={ %20%20allPages%20{ %20%20%20%20totalCount %20%20} }](https://satispay-website.prismic.io/graphql?query=%7B%0A%20%20allPages%20%7B%0A%20%20%20%20totalCount%0A%20%20%7D%0A%7D%0A)

How to fetch the same data using the rest API? this involve the network calls performed by "@prismicio/client"`

---

<div class="post-metadata">

**Author:** ![Levi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/levi/32/24_2.png) [@Levi](https://community.prismic.io/u/Levi)\
**Post date:** [March 1, 2024, 8:56am UTC](https://community.prismic.io/t/documents-api-returning-empty-list-0-document-found/15369/4 "2024-03-01T08:56:37Z")

</div>

Hello, @bwlt. By default, the REST API will return documents in your main language. Since you don’t have any documents in your main language, no results are appearing for your query. You need to either specify a language or use the wildcard value for all languages like this:

[https://satispay-website.prismic.io/api/v2/documents/search?orderings=[document.first\_publication\_date]&src=apibrowser&lang=\*#format=html](https://satispay-website.prismic.io/api/v2/documents/search?orderings=%5Bdocument.first_publication_date%5D&src=apibrowser&lang=*#format=html)

Here are the docs for the lang parameter:

> **[Document API Technical Reference](https://prismic.io/docs/rest-api-technical-reference#lang)**
>
> The Prismic Document API is an extremely fast, flexible, and powerful engine for your content. This page provides definitions for all of the API parameters.

Let me know if you have any questions about this or anything else.
