Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Firestore - Am I charged for documents obtained without finishing reading their data?

Imagine you perform a query and retrieve 1000 docs from the database.

const querySnapshot = await query.get();

If I do not execute the .data() method of each doc to read their data, would it still be treated as 1000 reads?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes, the get() retrieves documents from Firestore and you'll be charged N reads where N is number of documents returned by your query. The .data() just returns the document's data in JSON format from the snapshots.

Do note that, just creating the query neither retrieves the data nor charges you anything.

// This is just a Query
const query = db.collection('').where(...); 


// QuerySnapshot - contains the documents matching your query.
// fetches from Firestore (unless you have any offline persistence)
const querySnapshot = await query.get();


// Array of objects - parsed from the querySnapshot
const data = querySnapshot.docs.map((d) => d.data())
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!