A Chrome DevTools extension that automatically maps and documents APIs by monitoring network requests. It captures all API calls made by any website and exports them as OpenAPI 3.0 specification.
chrome://extensions/api-mapper directoryopenapi-spec-YYYY-MM-DD.jsonThe extension consists of several components:
background.js): Intercepts network requests using Chrome's webRequest APIpanel.js): Displays captured API data in an organized interfaceThe exported specification includes complete examples and documentation:
{
"openapi": "3.0.0",
"info": {
"title": "API Documentation",
"version": "1.0.0",
"description": "Auto-generated API documentation from API Mapper"
},
"servers": [
{
"url": "https://api.example.com"
},
{
"url": "https://staging.example.com"
}
],
"paths": {
"/users/{id}": {
"get": {
"tags": ["user", "public"],
"summary": "GET /users/123",
"operationId": "getusersid",
"description": "Endpoint: GET /users/123\nTotal calls captured: 5\n\n## Example Requests\n\n### Example 1\n\n```bash\ncurl -X GET 'https://api.example.com/users/123?include=profile' \\\n -H 'Accept: application/json'\n```\n\n**Response Status:** 200\n\n## Query Parameters\n\n- `include`\n- `fields`\n",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": { "type": "string" },
"example": "123"
},
{
"name": "include",
"in": "query",
"required": false,
"schema": { "type": "string" },
"example": "profile",
"examples": {
"example1": { "value": "profile", "summary": "Example value 1" },
"example2": { "value": "orders", "summary": "Example value 2" }
}
}
],
"responses": {
"200": { "description": "OK" }
}
}
}
},
"components": {
"schemas": {
"postusersRequest": {
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"required": ["name", "email"]
}
}
}
}
The extension can be configured by editing config.js:
MAX_CALLS_PER_ENDPOINT: Maximum number of calls to store per endpoint (default: 100)MAX_TOTAL_ENDPOINTS: Maximum number of endpoints to track (default: 500)UPDATE_INTERVAL: How often to refresh the UI in milliseconds (default: 1000)DEBOUNCE_DELAY: Delay for UI updates to improve performance (default: 300)SENSITIVE_HEADERS: List of header names to automatically redactSENSITIVE_QUERY_PARAMS: List of query parameter names to automatically redactThe generated OpenAPI spec should be valid, but if you encounter validation errors:
This extension only captures API calls while the DevTools panel is open and recording is enabled. All data is stored locally in memory and cleared when you close DevTools or click the Clear button. No data is sent to external servers.
api-mapper/
├── manifest.json # Chrome extension manifest
├── background.js # Background script for network interception
├── config.js # Configuration for security and limits
├── devtools.html # DevTools page
├── devtools.js # Creates the custom panel
├── panel.html # Panel UI structure
├── panel.js # Panel functionality
├── panel.css # Panel styling
├── favicon/ # Extension icons
└── CLAUDE.md # AI assistant instructions
No build process required. The extension runs directly from source files.
MIT License
Feel free to submit issues and enhancement requests!
See CHANGELOG.md for version history and updates.
4 commits
JavaScript
73.8%
CSS
23.9%
HTML
2.3%
A Chrome DevTools extension that automatically maps and documents APIs by monitoring network requests. It captures all API calls made by any website and exports them as OpenAPI 3.0 specification.
chrome://extensions/api-mapper directoryopenapi-spec-YYYY-MM-DD.jsonThe extension consists of several components:
background.js): Intercepts network requests using Chrome's webRequest APIpanel.js): Displays captured API data in an organized interfaceThe exported specification includes complete examples and documentation:
{
"openapi": "3.0.0",
"info": {
"title": "API Documentation",
"version": "1.0.0",
"description": "Auto-generated API documentation from API Mapper"
},
"servers": [
{
"url": "https://api.example.com"
},
{
"url": "https://staging.example.com"
}
],
"paths": {
"/users/{id}": {
"get": {
"tags": ["user", "public"],
"summary": "GET /users/123",
"operationId": "getusersid",
"description": "Endpoint: GET /users/123\nTotal calls captured: 5\n\n## Example Requests\n\n### Example 1\n\n```bash\ncurl -X GET 'https://api.example.com/users/123?include=profile' \\\n -H 'Accept: application/json'\n```\n\n**Response Status:** 200\n\n## Query Parameters\n\n- `include`\n- `fields`\n",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": { "type": "string" },
"example": "123"
},
{
"name": "include",
"in": "query",
"required": false,
"schema": { "type": "string" },
"example": "profile",
"examples": {
"example1": { "value": "profile", "summary": "Example value 1" },
"example2": { "value": "orders", "summary": "Example value 2" }
}
}
],
"responses": {
"200": { "description": "OK" }
}
}
}
},
"components": {
"schemas": {
"postusersRequest": {
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"required": ["name", "email"]
}
}
}
}
The extension can be configured by editing config.js:
MAX_CALLS_PER_ENDPOINT: Maximum number of calls to store per endpoint (default: 100)MAX_TOTAL_ENDPOINTS: Maximum number of endpoints to track (default: 500)UPDATE_INTERVAL: How often to refresh the UI in milliseconds (default: 1000)DEBOUNCE_DELAY: Delay for UI updates to improve performance (default: 300)SENSITIVE_HEADERS: List of header names to automatically redactSENSITIVE_QUERY_PARAMS: List of query parameter names to automatically redactThe generated OpenAPI spec should be valid, but if you encounter validation errors:
This extension only captures API calls while the DevTools panel is open and recording is enabled. All data is stored locally in memory and cleared when you close DevTools or click the Clear button. No data is sent to external servers.
api-mapper/
├── manifest.json # Chrome extension manifest
├── background.js # Background script for network interception
├── config.js # Configuration for security and limits
├── devtools.html # DevTools page
├── devtools.js # Creates the custom panel
├── panel.html # Panel UI structure
├── panel.js # Panel functionality
├── panel.css # Panel styling
├── favicon/ # Extension icons
└── CLAUDE.md # AI assistant instructions
No build process required. The extension runs directly from source files.
MIT License
Feel free to submit issues and enhancement requests!
See CHANGELOG.md for version history and updates.
4 commits
JavaScript
73.8%
CSS
23.9%
HTML
2.3%