Getcollection returns only top 20 items

Does Getcollection only returns first 20 items?
If so, how can I get the complete list from my firebase database?

Hi i remember seeing the same question in the past but i cant remember the solution (if any in that post)
But you can search for it.
I hope you find out

Thank You @Dimos_Vamvourellis
I will keep looking

@Harri_Sarsa @Mevi
Any suggestion how to solve this issue?
I have ~1750 records in my firestore database collection. How to retrieve them all?

Hi again, I definitely see the problem of retrieving only 20 documents, but you dont want to retrieve all the 1750 records at once either, You will need to filter the data in backend by quering and paginate, so you dont get them all at once.

Noted @Dimos_Vamvourellis
But something like top 50 or 100 would help.

Also any suggestion on filter in Firestore database.
Lets say, in my case, I want to pick up records related to US state = Texas from the list of ~1750 records.

Because youre using firestore, quering and pagination is integrated

AS for the problem with the no of docs, when you make a test query in the test tab, does it show only 20?

If yes, the problem might be in your query url (you might have some parameter) otherwise from what i know it has to do with the backend
if you want share some images maybe they will help (from the test tab and the url)


How do you activate Filter and Paging?

I dont have it. Please check this screenshot

@Dimos_Vamvourellis Regarding 20 limit, my test run was giving only 20 records. Currently I cant show as it started failing for some reason but below is the image from in the web launch where its runs fine and only 20 records are returned.

So @Dimos_Vamvourellis This thread (Data Variable Limited to 20 Records - #7 by Nihal_Parkar) resolved the issue of 20 records limit. This is Firestore default setting.

As I use pageSize in the query parameter, I am able to get more than 20 records.

Any suggestion of query parameter for Filter? like state=Texas


In order to have the pagination and filtering as shown above, you have to connect with the default firestore connector in appgyver and not with rest api direct integration

So for your case not showing, i guess youre using rest api direct integration, in that case, for filtering you need to use quering parameters which you can find in firebase docs

yes @Dimos_Vamvourellis , I am using REST API and not the firebase connector.

To effectively use Firebase Connector, one would need Firebase Authentication. But currently I need idToken which is not part of Firebase Authentication and hence using REST API rather than firebase connection

Check the same exact query that you’re trying in Composer with e.g. Postman or similar and see if it gets 20 queries or more. If Postman gets 20 queries as well, I would suspect this being a setting on Firebase side.

Yes @Mevi You are right. This is limited/restriction of Firebase. Only top 20 records are returned by Firebase.

1 Like

I managed to temporarily solve the problem by adding a parameter, as shown in the attached image.

1 Like