Need some backend help (firebase). We are trying to figure out a way to get data that we fetch from an API into firestore

Rather than having the user call the api to get the data, we are trying to get the data updated once a day automatically and stored in Firestore. This way the calls will just be made to Firestore to retrieve the correct data. Is there anyway to accomplish this.