Paste this into the Tools >> Script Editor (replace YOURAPIURL with your deployed url)
function priceapi(crypto_id){
var full_url = 'https://YOURAPIURL/api/'+ crypto_id;
var response = UrlFetchApp.fetch(full_url);
var data = JSON.parse(response.getContentText());
return data['price'];
}
To get the price in a cell (replace "COINGECKO_COIN_ID" with "Bitcoin", etc.)
=priceapi("COINGECKO_COIN_ID")
In a cell use (replace YOURAPIURL with your deployed url)
=image("https://YOURAPIURL/api/image/COINGECKO_COIN_ID")
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.