Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>API Hover InspectorNew to Visual Studio Code? Get it now.
API Hover Inspector

API Hover Inspector

Suraj Kumar Prajapati

|
1 install
| (0) | Free
Hover over API endpoints in JS, TS, React, Python, Go, JSON & more to see live HTTP responses, status codes, latency & payload previews directly in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

API Hover Inspector Banner

🛰️ API Hover Inspector

Live API Testing Inside Your VS Code Editor — Just Hover.

VS Marketplace Version Installs Rating License: MIT

Quick Start • Features • Demo • Configuration • Commands • FAQ


💡 Stop switching between your editor and Postman/Insomnia/Browser. API Hover Inspector turns your VS Code into a live API testing tool. Just hover over any API endpoint URL in your code and instantly see the response — status, latency, headers, and formatted JSON payload — all without leaving your editor.


🎬 Demo — See It In Action

⚡ Hover Over Any Endpoint → Instant Live Response

API Hover Inspector - Live Hover Demo

Simply hover your mouse over any API URL in your code. The extension detects it, makes a live HTTP request, and shows you the complete response in a beautiful popup — status code, latency, size, and formatted JSON — all in under a second.


🔍 Full Inspector Panel — Deep Dive Into Responses

API Hover Inspector - Inspector Panel

Click "Open Inspector Panel" for a full-featured side panel with tabbed views for Response body, Headers, and one-click actions like Re-fetch and Copy JSON. Perfect for detailed API debugging.


📊 Sidebar History — Track Every API Call

API Hover Inspector - Sidebar History

Every API call is logged in the Activity Bar sidebar. See color-coded status dots (🟢 200, 🟡 404, 🔴 500), response times, timestamps, and quickly re-inspect any previous call.


✨ Features At a Glance

⚡ Instant Hover Preview

Hover over any API endpoint URL in your code to see real-time HTTP response data — status code, latency, payload size, and formatted JSON — directly in a VS Code hover popup.

🔍 Full Inspector Webview

Open a rich side panel with tabs for formatted JSON (with syntax highlighting), response headers table, and action buttons to re-fetch or copy the response.

🌐 Smart .env Resolution

Automatically reads your .env and .env.local files to resolve process.env.API_URL, ${PORT}, ${REACT_APP_API_BASE} variables. Zero configuration needed.

📊 Endpoint History Sidebar

Track all API calls in the Activity Bar with color-coded status badges, response times, and timestamps. Click any entry to re-inspect.

🔐 Auth & Token Support

Set Bearer tokens, API keys, and custom headers via one-click popup actions, Command Palette, or settings.json. Supports ${AUTH_TOKEN} env variables.

🚀 POST/PUT/PATCH Bodies

Configure JSON request bodies for write operations directly from the hover popup. Test your POST endpoints without leaving the editor.

⚙️ Query Params Editor

Add, edit, and manage query string parameters (?key=value&key2=value2) with smart suggestions based on API error responses.

🔢 Quick ID Changer

Rapidly swap numeric path parameters (e.g., /users/1 → /users/42) to explore different records without manually editing URLs.


🆚 Why API Hover Inspector?

Feature Postman Thunder Client REST Client API Hover Inspector
Zero context switch ❌ Separate app ❌ Separate panel ⚠️ Needs .http file ✅ Hover in code
Works on existing code ❌ ❌ ❌ ✅ Your existing code
Auto-detects endpoints ❌ Manual entry ❌ Manual entry ❌ Manual entry ✅ Automatic detection
No extra files needed ❌ Collections ❌ Collections ❌ .http/.rest files ✅ No files needed
.env variable support ⚠️ Manual setup ⚠️ Manual setup ⚠️ Manual setup ✅ Auto-resolved
Framework port detection ❌ ❌ ❌ ✅ Vite/Next.js/CRA
Inline in your workflow ❌ ❌ ⚠️ ✅ Hover & done
Free & open source ⚠️ Paid tiers ⚠️ Paid tiers ✅ ✅ 100% free

🚀 Quick Start

1️⃣ Install

Search "API Hover Inspector" in VS Code Extensions (Ctrl+Shift+X), or:

code --install-extension SurajKumarPrajapati.api-hover-inspector

2️⃣ Open Any Code File

Open a file containing API endpoint URLs — JavaScript, TypeScript, React, Python, Go, JSON, or any supported language.

3️⃣ Hover Over an Endpoint

Move your cursor over any API URL string:

// ✅ Hover over the URL → see live response instantly!
const response = await fetch('https://jsonplaceholder.typicode.com/todos/1');

That's it! The live response popup appears automatically. 🎉


🌐 Supported Languages & Patterns

12 Languages Supported

Language Extensions Example Patterns
JavaScript .js fetch(), axios.get(), $.ajax(), URL strings
TypeScript .ts fetch(), axios, http.get(), URL strings
React JSX .jsx All JS patterns inside components
React TSX .tsx All TS patterns inside components
Python .py requests.get(), urllib.request, URL strings
Go .go http.Get(), http.Post(), URL strings
JSON .json, .jsonc URL values in any JSON field
HTML .html URL strings, href, src attributes
PHP .php curl, file_get_contents(), URL strings
Vue .vue All JS/TS patterns inside <script> blocks
Svelte .svelte All JS/TS patterns inside <script> blocks

Smart URL Detection Examples

// ─── Full URLs ──────────────────────────────────────
fetch('https://api.example.com/users')
axios.get('http://localhost:8080/api/v1/products')

// ─── Relative Routes (resolved via Base URL) ───────
fetch('/api/users/profile')
axios.post('/api/todos', { title: 'New Todo' })

// ─── Environment Variables (auto-resolved!) ────────
fetch(process.env.API_URL + '/posts')
fetch(`${process.env.REACT_APP_API_BASE}/users`)
axios.get(`http://localhost:${process.env.PORT}/api/data`)

// ─── Template Literals ─────────────────────────────
fetch(`https://api.example.com/users/${userId}`)
# ─── Python ──────────────────────────────────────────
import requests
response = requests.get('https://api.example.com/data')
response = requests.post('https://api.example.com/users', json=payload)
// ─── Go ─────────────────────────────────────────────
resp, err := http.Get("https://api.example.com/items")
resp, err := http.Post("https://api.example.com/submit", "application/json", body)

🔍 Hover Popup — Everything at Your Fingertips

When you hover over a detected API endpoint, you'll see a rich, interactive popup:

┌─────────────────────────────────────────────────────────┐
│  🟢 API Live Response                                  │
│                                                         │
│  ┌──────────┬──────────────┬──────────┬────────────┐    │
│  │ Method   │ Status       │ Latency  │ Size       │    │
│  │ GET      │ 200 OK       │ ⏱️ 45ms  │ 📦 1.2 KB  │    │
│  └──────────┴──────────────┴──────────┴────────────┘    │
│                                                         │
│  Endpoint: https://api.example.com/users/1              │
│                                                         │
│  Payload Preview:                                       │
│  ┌─────────────────────────────────────────────────┐    │
│  │ {                                               │    │
│  │   "id": 1,                                      │    │
│  │   "name": "John Doe",                           │    │
│  │   "email": "john@example.com",                  │    │
│  │   "role": "admin"                               │    │
│  │ }                                               │    │
│  └─────────────────────────────────────────────────┘    │
│                                                         │
│  ─────────────────────────────────────────────────────  │
│  🔄 Refresh | ✏️ Edit URL | ⚙️ Query Params            │
│  📝 POST Data | 🔢 Change ID | 🔑 Set Auth             │
│  📋 Copy JSON | 🔍 Open Inspector Panel                │
└─────────────────────────────────────────────────────────┘

🎯 Quick Action Links (in every popup)

Action What It Does
🔄 Refresh Live Re-fetch the endpoint with cache bypass for fresh data
✏️ Edit URL Modify the URL, change HTTP method (GET/POST/PUT/DELETE), add body
⚙️ Set Query Params Add/edit query string parameters (?status=active&page=2)
📝 Set POST Data Set JSON request body for POST/PUT/PATCH operations
🔢 Change ID/Number Quickly swap path ID (e.g., /users/1 → /users/42)
🔑 Set Auth Header Configure Bearer token / Authorization header instantly
📋 Copy JSON Copy formatted JSON response to clipboard
🔍 Open Inspector Open the full-featured Inspector webview panel

🔍 Inspector Webview Panel

For detailed API inspection, click "Open Inspector Panel" to get a full side panel:

What you get:

  • 📑 Response Tab — Complete syntax-highlighted JSON with full formatting
  • 📋 Headers Tab — All response headers in a clean table
  • 🔄 Re-fetch Button — Trigger a fresh request from the panel
  • 📋 Copy to Clipboard — One-click copy of the full JSON response

Open anytime via Command Palette: Ctrl+Shift+P → API Hover Inspector: Open Live Inspector Panel


🌐 Environment Variable Resolution

API Hover Inspector automatically reads your .env and .env.local files — no setup needed.

Setup

Step 1: Add a .env file to your workspace root:

# .env
PORT=8080
API_URL=https://api.staging.example.com
REACT_APP_API_BASE=http://localhost:3001/api
AUTH_TOKEN=eyJhbGciOiJIUzI1NiIs...
BASE_URL=http://localhost:5000

Step 2: Use variables in your code — they resolve automatically on hover:

// 🔄 These all resolve automatically when you hover!

fetch(`http://localhost:${process.env.PORT}/api/users`)
// ➜ Resolves to: http://localhost:8080/api/users

fetch(process.env.API_URL + '/posts')
// ➜ Resolves to: https://api.staging.example.com/posts

axios.get(process.env.REACT_APP_API_BASE + '/todos')
// ➜ Resolves to: http://localhost:3001/api/todos

Framework Auto-Detection 🔧

The extension automatically detects server ports from popular frameworks:

Framework Config File What It Reads
Vite vite.config.js/ts server.port
Next.js next.config.js Dev server port
Create React App package.json PORT in scripts
Express .env PORT variable
NestJS .env PORT variable

Base URL with Env Variables

{
  "apiHoverInspector.baseUrl": "http://localhost:${PORT}"
}

🔐 Authentication — Setting Auth Headers

Method 1: Via Hover Popup (Fastest ⚡)

Click 🔑 Set Auth Header in any hover popup → enter your token → done!

Method 2: Via Command Palette

Ctrl+Shift+P → API Hover Inspector: Set Authorization Header / Bearer Token

Method 3: Via Settings (Persistent)

{
  "apiHoverInspector.headers": {
    "Accept": "application/json",
    "Authorization": "Bearer eyJhbGciOiJIUzI1NiIs...",
    "X-API-Key": "your-api-key-here"
  }
}

Method 4: Using .env Variables (Most Secure 🔒)

// settings.json
{
  "apiHoverInspector.headers": {
    "Authorization": "Bearer ${AUTH_TOKEN}"
  }
}
# .env (git-ignored, never committed!)
AUTH_TOKEN=eyJhbGciOiJIUzI1NiIs...

⚙️ Configuration

Configure via VS Code Settings (Ctrl+,) or settings.json:

Setting Type Default Description
apiHoverInspector.baseUrl string http://localhost:3000 Base URL for resolving relative paths. Supports ${PORT} and ${API_URL} env variables.
apiHoverInspector.autoFetch boolean true Auto-fetch response on hover. Set false to show a "Click to Fetch" button instead.
apiHoverInspector.cacheTimeout integer 300 Cache TTL in seconds. Prevents hammering APIs. Set 0 to disable.
apiHoverInspector.timeout integer 5000 Request timeout in milliseconds.
apiHoverInspector.headers object {"Accept": "application/json", ...} Default HTTP headers. Add Authorization, API keys, etc.
apiHoverInspector.enableEnvResolution boolean true Auto-resolve ${VAR} from .env files.
apiHoverInspector.maxResponseBodyKb integer 50 Max response size (KB) in hover popup. Larger responses truncated.

📝 Example settings.json

{
  // Base URL for relative endpoints
  "apiHoverInspector.baseUrl": "http://localhost:8080",
  
  // Auto-fetch on hover (set false for manual trigger)
  "apiHoverInspector.autoFetch": true,
  
  // Cache responses for 2 minutes
  "apiHoverInspector.cacheTimeout": 120,
  
  // 10 second timeout for slow APIs
  "apiHoverInspector.timeout": 10000,
  
  // Custom headers with env variable support
  "apiHoverInspector.headers": {
    "Accept": "application/json",
    "Authorization": "Bearer ${AUTH_TOKEN}",
    "X-API-Key": "your-api-key"
  },
  
  // Show up to 100KB in hover popup
  "apiHoverInspector.maxResponseBodyKb": 100
}

📜 Commands

Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type "API Hover":

Command Description
🚀 Fetch Endpoint at Cursor Fetch API at cursor position, show in Inspector
🔍 Open Live Inspector Panel Open the full Inspector webview panel
🌐 Set Base URL Target Change base URL for relative paths
🔑 Set Authorization Header / Bearer Token Configure auth header
⚡ Toggle Auto-Fetch on Hover Enable/disable auto-fetch on hover
🗑️ Clear Cached Responses Clear all cached responses
📜 Clear Call History Clear the sidebar history
📋 Copy Response JSON Copy last response to clipboard
🔢 Change Endpoint ID / Number Parameter Swap numeric path params
📝 Set Request Body / POST Payload Data Set JSON body for POST/PUT/PATCH
⚙️ Set Query String Parameters Add/edit query params
✏️ Edit Endpoint URL Edit URL, method, and body

📊 Status Bar

The status bar (bottom of VS Code) shows:

  • 🌐 Current Base URL — Click to change or switch environments
  • ⚡ Auto-fetch toggle — Quick on/off control

Click the status bar item for a quick-pick menu with all common actions.


💡 Use Cases

🧑‍💻 Frontend Developer

"I'm building a React app and want to quickly check if my API endpoints return the right data."

Just hover over your fetch() or axios calls to see live responses. No need to open Postman or the browser DevTools.

🔧 Backend Developer

"I want to verify my Express/FastAPI routes are working while coding."

Set your base URL to http://localhost:3000 and hover over route strings like '/api/users' to instantly test them.

📱 Full-Stack Developer

"I switch between frontend and backend constantly and need to test APIs in both."

The extension auto-detects framework ports, reads your .env files, and resolves everything automatically.

🔍 API Debugger

"I need to debug why a specific endpoint returns 401/403/500."

Hover to see the error response, then use the inline 🔑 Set Auth Header or ⚙️ Set Query Params to fix and re-test — all without leaving your code.

📋 Code Reviewer

"I'm reviewing a PR and want to verify the API endpoints mentioned in the code."

Just hover over any URL in the diff to instantly check if it's live and returning expected data.


❓ FAQ & Troubleshooting

🔹 Hover doesn't show anything
  • Check file type: Must be a supported language (JS, TS, JSX, TSX, Python, Go, JSON, HTML, PHP, Vue, Svelte)
  • Check activation: Look for the API Hover Inspector status bar item at the bottom
  • Check URL format: The URL must be in a recognized pattern (fetch(), axios, URL string, etc.)
  • Reload window: Ctrl+Shift+P → Developer: Reload Window
🔹 Relative URLs return errors
  • Set the correct Base URL: Ctrl+Shift+P → API Hover Inspector: Set Base URL Target
  • Make sure your local server is running on the configured port
  • Check your .env file if using ${PORT} variable
🔹 Getting 401 Unauthorized / 403 Forbidden
  • Click 🔑 Set Auth Header in the hover popup
  • Or set via settings: "apiHoverInspector.headers": { "Authorization": "Bearer YOUR_TOKEN" }
  • Use env variables: "Authorization": "Bearer ${AUTH_TOKEN}" with a .env file
  • Make sure your token hasn't expired
🔹 Response is truncated in the popup
  • Increase apiHoverInspector.maxResponseBodyKb (default: 50 KB)
  • Or click 🔍 Open Inspector Panel to see the full, untruncated response
🔹 Hover is slow or times out
  • The hover has a 2.5s timeout for UI responsiveness. If your API is slower, it shows a "Click to Fetch" button.
  • Adjust apiHoverInspector.timeout for longer request timeouts
  • Cached responses load instantly (5 min TTL, configurable via cacheTimeout)
🔹 Environment variables not resolving
  • Ensure apiHoverInspector.enableEnvResolution is true (default)
  • Place .env or .env.local in your workspace root directory
  • Use standard KEY=value format in your env file
  • Restart VS Code after changing .env files
🔹 How do I test POST/PUT/PATCH endpoints?
  1. Hover over a POST endpoint (e.g., axios.post('/api/users', body))
  2. Click 📝 Set POST Data in the hover popup
  3. Enter your JSON body: {"name": "John", "email": "john@example.com"}
  4. The request is made with your body and response displayed
🔹 Can I use this with GraphQL?
  • Currently designed for REST APIs. GraphQL support is on the roadmap!

🗺️ Roadmap

  • [ ] 🎯 GraphQL support — Detect and execute GraphQL queries on hover
  • [ ] 📊 Response diff — Compare responses between environments (dev vs staging)
  • [ ] 📁 Export collections — Export endpoint history as Postman/Insomnia collections
  • [ ] 🎨 Custom themes — Customizable hover popup and inspector panel themes
  • [ ] 🔄 WebSocket support — Live WebSocket message preview
  • [ ] 📈 Performance metrics — Track API response time trends over time

🤝 Contributing

Contributions, issues, and feature requests are welcome! See CONTRIBUTING.md for guidelines.

# Clone and setup
git clone https://github.com/api-hover-inspector/api-hover-inspector.git
cd api-hover-inspector
npm install

# Development build with watch
npm run watch

# Press F5 in VS Code to test

📄 License

MIT © API Hover Inspector — See LICENSE for details.


🙏 Support the Project

If API Hover Inspector helps your workflow:

  • ⭐ Star the repo on GitHub
  • 📝 Leave a review on the VS Code Marketplace
  • 🐛 Report bugs or request features via GitHub Issues
  • 📣 Share with your fellow developers!

Made with ❤️ for developers who want to stay in the flow.
Stop context-switching. Start hovering.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft