Skip to content

Is there a way to get all documents in a subcollection (Firestore)

I’m having difficulties querying all documents inside a subcollection in my Firestore database. (I am using Node.js)

My goal is to get all the data from every document inside the subcollection named favorites

My database structure looks like this. firestore db stucture

I looked at the documentation at but without any result how to solve the problem.

My query looks like this right now:

exports.getAllFavoritePodcasts = (req, res) => {
    .then(snapshot => {
      snapshot.forEach(doc => {
        console.log(, '=>',;
    .catch(err => {
      console.log('Error getting documents', err);

But I get TypeError: db.collection(...).doc(...).collection(...).then is not a function


To summarize, get() method has to be called to retrieve the results. It can also be found in this example of getting all documents in a collection, in the Cloud Firebase article you have mentioned.