I am trying to get all entries from Airtable but I keep getting only 100 records at a time. I need a solution that will fetch more than 100 records without missing any data. I would like to know if there is a method to retrieve all records by using axios. My code currently stops at 100 records and I am unsure how to adjust it to collect extra records. Below is an example code snippet I tried:
function fetchAllData() {
const baseID = "**********";
const secretToken = "**********";
axios({
method: 'get',
url: `https://api.airtable.com/v0/${baseID}/DailyData?view=Default`,
headers: {
Authorization: `Bearer ${secretToken}`
}
})
.then(response => {
console.log('Fetched records:', response.data.records);
})
.catch(error => {
console.error('Error in data retrieval:', error);
});
}
Any help on how to modify my approach to get all the records would be very much appreciated.