Many businesses share data through Notion pages, Airtable bases, and Google Sheets. Here is how to access them.
Google Sheets (Easiest)
Published Google Sheets have a JSON endpoint:
https://docs.google.com/spreadsheets/d/SHEET_ID/gviz/tq?tqx=out:json
async function getGoogleSheet(sheetId) {
const url = `https://docs.google.com/spreadsheets/d/${sheetId}/gviz/tq?tqx=out:json`;
const res = await fetch(url);
const text = await res.text();
// Remove callback wrapper
const json = JSON.parse(text.match(/google.visualization.Query.setResponse\((.*)\)/s)[1]);
return json.table;
}
Notion (API)
Notion has a free API:
async function getNotionPage(pageId, token) {
const res = await fetch(`https://api.notion.com/v1/pages/${pageId}`, {
headers: { Authorization: `Bearer ${token}`, "Notion-Version": "2022-06-28" }
});
return res.json();
}
Airtable (API)
Airtable API is free with your account:
https://api.airtable.com/v0/BASE_ID/TABLE_NAME?api_key=YOUR_KEY
Use Cases
- Data migration between platforms
- Backup automation
- Cross-platform dashboards
- Automated reporting
Resources
Need data migrated or extracted from SaaS tools? $20-50. Email: Spinov001@gmail.com | Hire me
Top comments (0)