A powerful Firefox extension that monitors, captures, and exports all API calls visible in the browser's network activity. Features real-time monitoring with support for REST APIs and WebSocket connections.
- β Start/Stop Recording - Control when to capture network requests
- β Real-time Monitoring - Live updates of captured requests in sidebar
- β Comprehensive Capture - URLs, methods, headers, payloads, responses, status codes, timestamps
- β Request Type Detection - Automatic categorization (REST, WebSocket, Static)
- β Export Capabilities - Download captured data as JSON
- β Advanced Filtering - Search by URL, filter by type or status code
- β Request Details View - Inspect full request/response information
- β Statistics Dashboard - Real-time metrics and request counts
- β Performance Optimized - Handles large volumes without degradation
- REST APIs - Standard HTTP requests with JSON/XML
The extension provides a persistent sidebar with:
- Control buttons (Start/Stop/Clear/Export)
- Real-time statistics dashboard
- Filter and search controls
- Scrollable request list with color-coded status
- Detailed request/response viewer
-
Clone or download this repository
git clone <repository-url> cd network-api-monitor
-
Generate PNG icons (optional, SVG works too)
- Open
icons/create-icons.htmlin a browser - Download the generated PNG files
- Or use the SVG icons directly
- Open
-
Load in Firefox
- Open Firefox
- Navigate to
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on"
- Select the
manifest.jsonfile from the project directory
-
Open the sidebar
- Click the extension icon in the toolbar, or
- Use the keyboard shortcut (if configured), or
- Go to View > Sidebar > API Network Monitor
Coming soon - Extension will be published to Firefox Add-ons (AMO)
-
Open the Sidebar
- Click the extension icon in Firefox toolbar
- The sidebar will open on the right side
-
Start Recording
- Click the "Start Recording" button
- The button will turn orange and show "Stop Recording"
- A red recording indicator appears in the toolbar icon
-
Browse and Capture
- Navigate to any website
- All network requests will be captured automatically
- Watch the statistics update in real-time
-
View Request Details
- Click any request in the list
- A detailed panel slides in showing:
- General information (URL, method, status, duration)
- Request headers and body
- Response headers and body
-
Filter and Search
- Use the search box to find specific URLs
- Filter by method type (GET,POST,PUT,DELETE)
- Filter by status code range (2xx, 3xx, 4xx, 5xx)
-
Export Data
- Click "JSON" to export as JSON format
- Click "CSV" to export as CSV format
- Choose save location in the download dialog
-
Stop Recording
- Click "Stop Recording" when done
- Data remains available for review and export
-
Clear Data
- Click "Clear" to remove all captured requests
- Confirmation dialog prevents accidental deletion
The extension automatically detects and categorizes:
- METHOD: Standard REST Methods
Real-time metrics include:
- Total requests captured
- Status code distribution
- Circular buffer limits storage to 1000 requests (configurable)
- Lazy loading of request details
- Efficient filtering and search
- Minimal memory footprint
By default, the extension only captures requests containing /redfish/ in the URL path. To capture all network requests:
-
Open the request interceptor file
- Navigate to
background/request-interceptor.js
- Navigate to
-
Locate the
shouldCaptureUrl()method (around line 20-40) -
Comment out or remove the Redfish filter:
shouldCaptureUrl(url) { // Exclude node_modules if (url.includes('/node_modules/')) { return false; } // Exclude src/views if (url.includes('/src/views/')) { return false; } // COMMENT OUT OR REMOVE THIS SECTION TO CAPTURE ALL REQUESTS: /* // Only capture Redfish API calls (contains /redfish/ in the path) if (url.toLowerCase().includes('/redfish/')) { return true; } // Exclude everything else return false; */ // INSTEAD, RETURN TRUE TO CAPTURE ALL (except excluded above): return true; }
-
Reload the extension
- Go to
about:debugging - Click "Reload" next to the extension
- Or restart Firefox
- Go to
-
Alternative: Custom URL Pattern
To capture specific URL patterns instead:
shouldCaptureUrl(url) { // Exclude node_modules and src/views if (url.includes('/node_modules/') || url.includes('/src/views/')) { return false; } // Capture only API calls (customize as needed) if (url.includes('/api/') || url.includes('/v1/') || url.includes('/graphql')) { return true; } return false; }
The extension currently only captures requests when the active tab URL contains 'stglabs'. To remove this restriction:
-
Open the request interceptor file
- Navigate to
background/request-interceptor.js
- Navigate to
-
Locate the
handleBeforeRequest()method (around line 180-210) -
Comment out the stglabs check:
// COMMENT OUT THIS SECTION: /* // Only capture if active tab URL contains 'stglabs' if (!this.isStglabsTab()) { console.log('Ignoring request - active tab is not a stglabs domain:', this.activeTabUrl); return; } */
-
Reload the extension as described above
By default, the extension stores up to 1000 requests. To change this:
// In browser console or background script
browser.runtime.sendMessage({
type: 'SET_MAX_REQUESTS',
maxRequests: 2000
});To automatically start recording when Firefox opens:
// Set in browser storage
browser.storage.local.set({ autoStart: true });{
"exportDate": "2026-03-31T03:37:00.000Z",
"totalRequests": 150,
"statistics": {
"total": 150,
"byType": { "REST": 130, "WebSocket": 20 },
"avgDuration": 245
},
"requests": [
{
"id": "req_001",
"timestamp": 1743394620000,
"date": "2026-03-31T03:37:00.000Z",
"url": "https://api.example.com/users",
"method": "GET",
"type": "REST",
"status": 200,
"duration": 245,
"requestHeaders": {...},
"responseHeaders": {...},
"requestBody": "...",
"responseBody": "..."
}
]
}Flattened format with columns:
- ID, Timestamp, Date, URL, Method, Type, Status, Duration
- Request Headers, Response Headers
- Request Body, Response Body
network-api-monitor/
βββ manifest.json # Extension configuration
βββ background/
β βββ background.js # Main coordinator
β βββ request-interceptor.js # Network capture
β βββ storage-manager.js # Data management
βββ sidebar/
β βββ sidebar.html # UI structure
β βββ sidebar.js # UI logic
β βββ sidebar.css # Styling
βββ utils/
β βββ request-parser.js # Type detection
β βββ filters.js # Filtering logic
βββ icons/ # Extension icons
βββ README.md # This file
- Firefox WebExtensions API - Native browser integration
- webRequest API - Network request interception
- browser.storage.local - Data persistence
- Vanilla JavaScript - No framework dependencies
- CSS3 - Modern, responsive styling
- Clone the repository
- No build step required - pure JavaScript
- Load in Firefox as temporary add-on
- For production, package as
.xpifile
Test with various websites:
- REST APIs: GitHub API, JSONPlaceholder
- WebSocket: Socket.io demos, trading platforms
- Mixed: Modern web applications
- β All data stored locally in browser
- β No external data transmission
- β No analytics or tracking
- β Minimal required permissions
- β Content sanitization to prevent XSS
- β HTTPS metadata only (no decryption)
The extension requires these permissions:
- webRequest - To intercept and monitor network requests
- webRequestBlocking - To capture request/response data
- storage - To persist captured data locally
- tabs - To identify which tab made each request
- downloads - To export data as JSON/CSV files
- <all_urls> - To monitor requests from any website
- Ensure recording is started (green button should be orange)
- Check that the website is making network requests
- Try refreshing the page after starting recording
- Some responses cannot be captured due to CORS restrictions
- Binary content (images, videos) is not captured
- Very large responses (>1MB) are truncated
- Check if sidebar is enabled in Firefox settings
- Try clicking the toolbar icon
- Restart Firefox if needed
- Reduce max requests limit if capturing too many
- Clear old data regularly
- Filter to show only relevant request types
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - See LICENSE file for details
- Firefox WebExtensions documentation
- Mozilla Developer Network (MDN)
- Open source community
- Issues: Report bugs on GitHub Issues
- Questions: Use GitHub Discussions
- Email: [Your contact email]
Future enhancements planned:
- Request replay functionality
- HAR (HTTP Archive) format export
- Request comparison and diff view
- Custom filtering rules
- Performance waterfall view
- Dark/Light theme toggle
- Request mocking
- Automated test generation
- Chrome/Edge compatibility
- Initial release
- Core monitoring functionality
- REST, WebSocket support
- JSON export
- Sidebar interface
- Filtering and search
- Request details view
- Statistics dashboard
Made with β€οΈ for developers who need to monitor API calls