
📎 This article includes 1 downloadable practice file ↓
An API (Application Programming Interface) is a menu a program offers to other programs: “ask me for these things, in this format, and I’ll answer”.
In this article
The restaurant analogy
You (your program) don’t walk into the kitchen (the other company’s database). You give the waiter (the API) an order from the menu (the documentation), and get your dish (the data, usually JSON).
A real request
Many APIs work with a simple web address. For example a currency API might accept:
GET https://api.example.com/latest?base=USD&symbols=INR,EUR
and reply with JSON such as {"base":"USD","rates":{"INR":74.9,"EUR":0.88}}.
Parts you will meet
| Term | Meaning |
|---|---|
| Endpoint | The URL for one kind of request |
| GET / POST | Read data / send data |
| Parameters | Options after ? in the URL |
| API key | Your password for the API — keep it secret |
| Rate limit | How many requests you may make per minute/day |
| Status code | 200 OK, 401 bad key, 404 not found, 429 too many requests |
Into Excel (no code)
Data → From Web, paste the URL, then expand the JSON in Power Query. Refresh gives new data.
Into Python
import requests
r = requests.get("https://api.example.com/latest", params={"base": "USD", "symbols": "INR"}, timeout=30)
r.raise_for_status()
print(r.json()["rates"]["INR"])
📎 Practice files for this article
- 📄All code from this post2 examples in one file, ready to open in your editor.⬇ TXT · 486 B
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time — plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul →Stuck on a step? Ask a question and the AI answers using this article.