What Are These Formulas?
SHEETAI_API - Your API Gateway
SHEETAI_API is a custom Google Sheets formula that lets you make HTTP requests to any API endpoint directly from a cell. Whether you need to fetch weather data, cryptocurrency prices, or interact with your own custom APIs, this formula has you covered.
SHEETAI_PJSON - Your JSON Parser
SHEETAI_PJSON is a companion formula that parses JSON responses and extracts specific values using simple dot notation. Think of it as a smart JSON navigator that helps you pull exactly the data you need from complex API responses.
Why Use These Formulas?
✅ Real-Time Data - Fetch live data from any API endpoint
✅ Flexible - Support for GET, POST, PUT, PATCH, and DELETE requests
✅ Smart Extraction - Pull specific values from nested JSON responses
✅ Authentication Support - Works with APIs requiring authentication headers
Getting Started with SHEETAI_API
Real-World Examples
Example 1: Simple GET Request (Fetch Weather)=SHEETAI_API("https://api.weather.com/current", "GET", "", "", "temperature")
This fetches current weather and returns just the temperature value.
Result: Returns the URL of your newly created presentation! 🎉
Example 2: Fetch Cryptocurrency Prices=SHEETAI_API("https://api.coinbase.com/v2/prices/BTC-USD/spot", "GET", "", "", "data.amount")
Get the current Bitcoin price in real-time.
Working with SHEETAI_PJSON
Basic Syntax=SHEETAI_PJSON(jsonString, keyPath)
Why Use SHEETAI_PJSON?
Sometimes you want to:
Simple Fields{"name": "John", "age": 30}
Nested Objects{ "user": { "profile": { "email": "john@example.com" } }}
Arrays{ "products": [ {"name": "Laptop", "price": 999}, {"name": "Mouse", "price": 25} ]}
Powerful Combo: Using Both Formulas Together
Here's where it gets really powerful! Use SHEETAI_API to fetch data once, then use multiple SHEETAI_PJSON formulas to extract different values:
Setup:
Cell B1 - Fetch complete API response:
=SHEETAI_API("https://api.github.com/repos/facebook/react", "GET", "", "", "")
Cell B2 - Extract repository name:
=SHEETAI_PJSON(B1, "name")
Cell B3 - Extract star count:
=SHEETAI_PJSON(B1, "stargazers_count")
Cell B4 - Extract description:
=SHEETAI_PJSON(B1, "description")
Cell B5 - Extract last update:
=SHEETAI_PJSON(B1, "updated_at")
This way, you make one API call but extract multiple values! This is more efficient and keeps you within API rate limits. 💡
Practical Use Cases
📈 Business & Analytics
🎓 Research & Data Collection
Limitations & Considerations
⚠️ Rate Limits: Respect API rate limits - use caching when possible
⚠️ Timeouts: Very slow APIs might timeout (Google Sheets has 30-second limit)
⚠️ Recalculation: Formulas recalculate on sheet edits - be mindful of API quotas
⚠️ Authentication: Keep API keys secure, don't share spreadsheets with sensitive keys
Conclusion
SHEETAI_API and SHEETAI_PJSON transform Google Sheets from a static spreadsheet into a dynamic, API-connected powerhouse. Whether you're a marketer tracking campaign performance, a developer building quick prototypes, or a business analyst creating real-time dashboards, these formulas will save you hours of manual data entry.
Ready to get started? Install the SheetAI add-on and start experimenting with these formulas today!