π Extract AI Overview content from Google Search to Markdown format
Extension automatically detects AI Overview on Google results pages and enables exporting content along with sources to readable Markdown format.
- Chrome Extension: https://chromewebstore.google.com/detail/ai-overview-extractor/cbkdfibgmhicgnmmdanlhnebbgonhjje
- Firefox Add-on: https://addons.mozilla.org/en-US/firefox/addon/ai-overview-extractor/
- β
Automatic detection of AI Overview on Google Search (
#m-x-content
container) - π Content extraction to Markdown format using TurndownService library
- π§Ή Advanced cleaning - removes MSC elements, CSS, JavaScript and hidden elements
- π Automatic extraction of search keyword from query
- π Source extraction with cleaned Google URLs
- πΎ Copy to clipboard with one click
- π₯ Download as .md file with timestamp
- π Webhooks - automatic sending of data to external APIs
- βοΈ Webhook configuration - easy URL setup and connection testing
- π¨ Clean interface with preview and notifications
- π DOM Observer - automatic button addition for new results
- π€ Intelligent State Machine - Predictable automation flow control
- π‘οΈ Circuit Breaker Protection - Automatic failure detection and recovery
- π Unified Detection System - Robust container detection with multiple fallback strategies
- βοΈ Advanced Debugging - Real-time system status monitoring and reset capabilities
- Download files - copy all files to
ai-overview-extractor/
folder - Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" (toggle in top right corner)
- Click "Load unpacked extension"
- Select
ai-overview-extractor/
folder - Done! Extension will be loaded
- Download files - copy all files to
ai-overview-extractor/
folder - Open Firefox and navigate to
about:debugging
- Click "This Firefox" in left menu
- Click "Load Temporary Add-on..."
- Select
manifest.json
file from extension folder - Done! Extension will be loaded
- Go to
about:config
in Firefox - Find
xpinstall.signatures.required
and set tofalse
- Pack extension folder to
.zip
file - Change extension to
.xpi
- Drag
.xpi
file to Firefox
- Search for something on Google (e.g. "diabetes")
- Wait for AI Overview to appear
- Click "Show more" button
- Click "Show all"
- Click "π Extract to Markdown" button
- Copy content or download as file
- Click "π Extract to Markdown" button
- In "π Webhook Configuration" section enter your API URL
- Test connection with "π§ͺ Test" button
- Save configuration with "πΎ Save" button
- Send data with "π Send webhook" button
https://your-api.com/ai-overview-webhook
https://example.com/webhook-endpoint
https://api.your-domain.com/receive-ai-data
http://localhost:5678/webhook/ai-overview-extractor # n8n locally
The extension is fully compatible with n8n and includes a ready-made template workflow for comprehensive automation!
In the workflows_templates/
folder you'll find ready workflow AI_Overviews_Extractor_Plugin.json
which contains:
- Webhook endpoint - automatic data reception from extension
- HTMLβMarkdown processing - content conversion
- Google Sheets saving - automatic results storage
- AI Guidelines Generator - LLM generates SEO guidelines based on AI Overview
- Automation - scheduler every 15 minutes + manual trigger
- Page analysis - fetching and analyzing content from URLs
- In n8n go to:
Templates
βImport from JSON
- Load file:
workflows_templates/AI_Overviews_Extractor_Plugin.json
- Configure nodes:
- Google Sheets (OAuth connection)
- OpenRouter Chat Model (API key)
- Set Google Sheets URL in nodes
- Activate workflow
- Copy webhook URL (from Webhook node)
- Webhook URL:
http://localhost:5678/webhook/ai-overview-extractor
- Test connection - should return status 200
- Save configuration
- Receives data from extension (keyword, markdown, HTML, sources)
- Saves to sheet all AI Overview data
- Analyzes pages from Google Sheets (
myURL
column) - Generates SEO guidelines using AI (compares page content with AI Overview)
- Updates sheet with generated guidelines
- Automatic execution every 15 minutes for new tasks
- Full automation - from extraction to analysis
- Knowledge base - all AI Overviews in one place
- SEO insights - AI guidelines on what to add to page
- Scalability - batch processing of multiple URLs
- Monitoring - tracking changes in AI Overview
- n8n v1.95.3+ (locally or in cloud)
- Google Sheets API (for data saving)
- OpenRouter API (for AI guidelines) or other LLM provider
- Webhook endpoint active on port 5678
ai-overview-extractor/
βββ manifest.json # Extension configuration (Manifest V3)
βββ styles.css # User interface styles
βββ README.md # This documentation
βββ LICENCE # MIT License
βββ .gitignore # Files ignored by Git
βββ AI_SUMMARY.md # π€ CRITICAL: Technical documentation for AI/LLM systems - main project overview
βββ src/ # Source files
β βββ content.js # Main orchestrator with AIOverviewExtractor class
β βββ automation-state-machine.js # State machine for automation flow control
β βββ automation-circuit-breaker.js # Circuit breaker protection against failures
β βββ container-detection-manager.js # Unified container detection system
β βββ settings-manager.js # Extension settings management
β βββ auto-expander-overviews.js # Automatic AI overview expansion
β βββ auto-expander-sources.js # Automatic source list expansion
β βββ auto-webhook.js # Automatic webhook dispatch
β βββ extraction-orchestrator.js # Manual extraction coordination
β βββ content-extractor.js # Content and source extraction
β βββ markdown-generator.js # Markdown conversion
β βββ ui-manager.js # In-page UI management
β βββ popup.js # Extension popup management
β βββ popup.html # Popup interface structure
β βββ popup.css # Popup interface styling
β βββ webhook-manager.js # Webhook management and POST requests
β βββ turndown.js # HTMLβMarkdown conversion library
β βββ README.md # Source code documentation
βββ icons/ # Extension icons
β βββ icon-16.png
β βββ icon-32.png
β βββ icon-48.png
β βββ icon-96.png
β βββ icon-128.png
βββ images/ # Documentation images
β βββ ai-overviews-extractor.gif
β βββ ai-overview-extractor-001.jpg
β βββ ai_overviews_extractor_logo.png
βββ workflows_templates/ # Ready n8n workflow template
β βββ AI_Overviews_Extractor_Plugin.json # Comprehensive n8n workflow
β βββ README.md # Workflow documentation
βββ n8n-template-submission/ # n8n Template Store submission files
β βββ AI_Overviews_Extractor_Plugin.json # Template workflow file
β βββ README.md # Template description
β βββ setup-instructions.md # Installation instructions
β βββ template-description.md # Detailed template description
β βββ template-name.txt # Template name
βββ docs/ # Publication and legal documentation
βββ chrome-web-store-description.md # Chrome Web Store description
βββ chrome-web-store-privacy-justifications.md # Chrome privacy justifications
βββ chrome-web-store-permission-justifications.md # Chrome permission justifications
βββ chrome-web-store-appeal-response.md # Chrome Store rejection response
βββ firefox-release-notes.md # Firefox Add-ons release notes
βββ firefox-reviewer-notes.md # Firefox reviewer notes
βββ privacy-policy.md # Privacy policy
- Chrome/Chromium (latest version) or Firefox 58+ (Firefox Quantum)
- Manifest V3 - modern extension standard
- Page:
google.com/search
- Language: Works with Google interface in any language
- Permissions:
storage
,host_permissions: *://www.google.com/*
Extension works automatically on:
*://www.google.com/search*
To add other Google domains, edit content_scripts.matches
section in manifest.json
:
"content_scripts": [
{
"matches": [
"*://www.google.com/search*",
"*://www.google.pl/search*",
"*://www.google.de/search*"
],
"js": ["src/turndown.js", "src/content.js"],
"css": ["styles.css"],
"run_at": "document_end"
}
]
- Looks for
#m-x-content
container on page - Uses
MutationObserver
to monitor DOM changes - Automatically adds button when container is found
- State Machine Architecture - Predictable automation flow: IDLE β EXPANDING_OVERVIEW β EXPANDING_SOURCES β SENDING_WEBHOOK β COMPLETE
- Removes elements with
data-subtree="msc"
(MSC elements) - Removes elements with
style="display:none"
(hidden elements) - Removes sources container before conversion
- Converts HTML to Markdown using TurndownService
- Finds sources container
div[style="height: 100%;"]
- Extracts links from visible list
ul[class]
- Improved button detection - Fixed jsaction selector for reliable expansion
- Cleans Google URLs (removes
/url?
wrappers) - Filters duplicates and invalid links
- Circuit Breaker Protection - Prevents infinite loops and system failures
- Unified Container Detection - Multiple fallback strategies with debouncing
- Enhanced Debugging -
getAutomationStatus()
andresetAutomation()
methods - Robust Error Handling - Automatic fallback to manual mode
- Automatic sending of data to external APIs via POST method
- UI configuration - easy webhook URL setup
- Connection testing - check if webhook works
- Secure storage - URL saved in chrome.storage
- Complete payload - keyword, markdown, HTML and sources
- Error handling - 5s timeout and informative messages
{
"timestamp": "2025-01-06T12:30:00Z",
"searchQuery": "search keyword",
"aiOverview": {
"content": "markdown content",
"htmlContent": "cleaned HTML"
},
"sources": [
{"title": "Title", "url": "https://url.com"}
],
"metadata": {
"googleSearchUrl": "https://google.com/search?q=...",
"extractedAt": "2025-01-06T12:30:00Z",
"userAgent": "Mozilla/5.0...",
"extensionVersion": "1.0.8"
}
}
- Check if AI Overview is actually on the page
- Open console (F12) and look for
[AI Overview Extractor]
logs - Check if
#m-x-content
element exists - Refresh page and wait for full loading
- Check console for
[AutoExpanderSources]
logs - Verify auto-expand sources is enabled in popup settings
- Try refreshing page if button detection fails
- Check for jsaction attribute changes in new Google updates
- AI Overview may not be fully loaded
- Try again after a few seconds
- Check console logs - they should show extraction process
- Check for JavaScript errors
- Check if browser has clipboard permissions
- Try downloading file instead of copying
- Check if page is served over HTTPS
- Check console logs about found links
- Some sources may be filtered (Google, support etc.)
- URLs are automatically cleaned from Google wrappers
- Use
getAutomationStatus()
in console to check system state - Use
resetAutomation()
to reset state machine if stuck - Check circuit breaker status in console logs
- Verify settings are properly saved in popup
To update the extension:
Chrome/Chromium:
- Download new files
- Replace old files in extension folder
- Go to
chrome://extensions/
- Click "Reload" on the extension
Firefox:
- Download new files
- Replace old files in extension folder
- Go to
about:debugging
- Click "Reload" on the extension
- π Fixed auto-expand sources functionality - Fixed critical issue where sources were not expanding automatically
- π§ Button selector bug - Fixed jsaction selector from
^="trigger"
to*="trigger"
to properly matchjsaction="trigger.Wyhgxe"
- β±οΈ Timing improvements - Increased delays for better DOM loading stability (1500ms, 1000ms, 3000ms)
- π Expansion detection logic - Made
areSourcesExpanded()
more conservative to prevent false positives - π‘οΈ Button clicking prevention - Added
buttonClicked
flag to prevent multiple clicking attempts - π§ Reliable Source Expansion - Fixed button detection with improved jsaction selectors
- ποΈ Major Architecture Refactor - Replaced callback-based system with state machine for predictable automation flow
- π§ State Machine Implementation - Clear automation states: IDLE β EXPANDING_OVERVIEW β EXPANDING_SOURCES β SENDING_WEBHOOK β COMPLETE
- π‘οΈ Circuit Breaker Protection - Added circuit breakers to prevent infinite loops and system failures
- π― Unified Container Detection - Single manager for all container detection with debouncing and multiple strategies
- π Fixed Automation Issues - Resolved multiple button clicks, infinite loops, and unpredictable behavior
- π Enhanced Debugging - Added
getAutomationStatus()
andresetAutomation()
methods for system monitoring - π Improved Reliability - Robust error handling with automatic fallback to manual mode
- βοΈ Modular Design - Clean separation of concerns with well-defined module interfaces
- β¨ Auto-expand AI overviews - Automatically clicks "Show more" button on collapsed AI overviews
- π Auto-expand sources - Automatically expands collapsed source sections
- π Auto-webhook functionality - Automatically sends extracted data to configured endpoints
- βοΈ Settings management - Persistent storage with Chrome storage API
- π¨ Extension popup interface - Modern settings panel accessible from browser toolbar
- π Real-time synchronization - Changes applied immediately across all tabs
- π§ Chrome Web Store compliance - removed unnecessary
activeTab
permission - π Documentation update - updated all permission justifications and descriptions
- β Verification - confirmed extension works with minimal permissions only
- πͺ Store ready - prepared for Chrome Web Store resubmission
- π English translation - complete interface and documentation translation
- π¨ UI improvements - updated button text and user messages
- π Documentation - fully translated README and user guides
- π§Ή Code cleanup - improved console messages and comments
- π NEW: Webhooks - automatic data sending to external APIs
- βοΈ Webhook configuration - UI for URL setup and testing
- π§Ή Improved cleaning - removal of CSS, JavaScript and inline styles
- πΎ Chrome Storage - secure configuration storage
- π HTTPS validation - webhook security
- β±οΈ Timeout handling - error handling and timeouts (5s)
- π§ Stability and compatibility fixes
- π± Manifest V3 support
- π Chrome and Firefox compatibility
- π Source extraction bug fixes
- β‘ Performance optimizations
- π Improved AI Overview detection
- β¨ First version
- π AI Overview extraction to Markdown with TurndownService
- π Source extraction with Google URL cleaning
- π§Ή Advanced content filtering (MSC, hidden elements)
- πΎ Copy and download with timestamp
- π¨ User interface with notifications
- π DOM observer for dynamic changes
Project is open source! You can:
- π Report bugs via Issues on GitHub
- π‘ Suggest features
- π§ Send Pull Requests
- β Star if you like the project
GitHub: https://github.com/romek-rozen/ai-overview-extractor
Roman Rozenberger
- GitHub: https://github.com/romek-rozen
- Website: https://rozenberger.com
MIT License - you can use, modify and distribute for free.
Useful? Leave a β and share with others!
Created with β€οΈ for SEO and digital marketing community.