const axios = require('axios') let results = [] let baseURL = "https://api.airtable.com/v0/baseid/tablename" let headers = { authorization: "Bearer " + 'yourkey' } let params = { pageSize: 100} axios({ baseURL: baseURL, headers: headers, params: params }).then(res => { results.push(...res.data.records) params.offset = res.data.offset const axcall = () => { axios({ baseURL: baseURL, headers: headers, params: params } ).then( res => { results.push(...res.data.records) params.offset = res.data.offset if (res.data.offset !== undefined) { return axcall() } else { // after all calls ends console.log(results) } } ).catch(e => console.log(e)) } axcall() }).catch(e => console.log(e) );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter