Scrape any business listings from Google Maps and push them straight to Google Sheets — powered by Serper API, Gemini AI, and a sleek Streamlit UI.
Add your screenshots below by replacing the placeholder paths
- 🔍 Smart Scraping — Pulls real business listings from Google Maps via Serper API
- 🧠 AI Enrichment — Gemini AI cleans, fixes typos, and fills missing categories
- 📧 Email Extraction — Automatically visits business websites to extract emails
- 📞 Phone Extraction — Scrapes phone numbers directly from business websites
- 🕐 Opening Hours — Captures full weekly opening hours for every listing
- 🧹 Duplicate Removal — Built-in deduplication before pushing to Sheets
- 📦 Batch Search — Queue multiple searches and run them all at once
- 📊 Dashboard Tab — Auto-generated summary tab in Google Sheets after every search
- 📜 Search History — Local JSON log of every search you've ever run
- 🎨 Beautiful UI — Sleek black Streamlit interface with Poppins font
- 💰 100% Free — Zero cost using free tiers of all APIs
| Layer | Tool | Purpose |
|---|---|---|
| 🖥️ Frontend | Streamlit | Web UI |
| 🤖 AI Brain | Google Gemini 2.0 Flash | Data enrichment |
| 🔍 Scraping | Serper API (/maps) |
Google Maps data |
| 📊 Output | Google Sheets API | Store listings |
| 🧱 Orchestration | LangChain | AI agent framework |
| 🐍 Language | Python 3.11+ | Backend |
ai-listing-agent/
├── app.py # Streamlit frontend
├── main.py # CLI entry point
├── agent.py # Core AI agent logic
├── scraper.py # Serper API scraping
├── sheets.py # Google Sheets integration
├── email_extractor.py # Email & phone extraction
├── dashboard.py # Dashboard tab generator
├── batch.py # Batch search handler
├── history.py # Search history tracker
├── .env # API keys (never commit this!)
├── credentials.json # Google service account (never commit!)
├── requirements.txt # Python dependencies
└── search_history.json # Auto-generated search log
git clone https://github.com/mansiggit/AI_Listing_Agent.git
cd ai-listing-agentpython -m venv venv
# Windows
venv\Scripts\activate
# Mac/Linux
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root folder:
SERPER_API_KEY=your_serper_key_here
GEMINI_API_KEY=your_gemini_key_here
SPREADSHEET_URL=your_google_sheet_url_here| Key | Where to get it |
|---|---|
SERPER_API_KEY |
serper.dev — Free, 2500 searches/month |
GEMINI_API_KEY |
aistudio.google.com — Free tier |
SPREADSHEET_URL |
Create a Google Sheet and copy its URL |
- Go to Google Cloud Console
- Create a new project → Enable Google Sheets API + Google Drive API
- Create a Service Account → Download JSON key → rename to
credentials.json - Place
credentials.jsonin the project root - Share your Google Sheet with the service account email (Editor access)
streamlit run app.pyOpens at http://localhost:8501
python main.pyType any query and hit Search:
best cafes in New York
top rated gyms in London
italian restaurants in Mumbai
coworking spaces in Bangalore
Go to Batch Search → enter one query per line → hit Run Batch
Go to History to see all your past searches with timestamps and result counts
Each search creates a new tab in your Google Sheet with these columns:
| Column | Description |
|---|---|
| S.No | Serial number |
| Business Name | Name of the business |
| Category | Type of business |
| Rating | Google rating (out of 5) |
| Total Reviews | Number of reviews |
| Price Level | $ / $$ / $$$ / $$$$ |
| Status | ⭐ Top Rated / 👍 Well Rated / 😐 Average |
| Address | Full address |
| Phone | Extracted from website |
| Extracted from website | |
| Website | Business website URL |
| Opening Hours | Full weekly schedule |
| Open Now | ✅ Open / ❌ Closed |
| Scraped At | Timestamp of scrape |
A 📊 Dashboard tab is also auto-generated with summary stats after every search.
- Push this repo to GitHub
- Go to share.streamlit.io
- Connect your GitHub repo
- Set main file as
app.py - Add your secrets under Advanced Settings:
SERPER_API_KEY = "your_key"
GEMINI_API_KEY = "your_key"
SPREADSHEET_URL = "your_sheet_url"- Click Deploy — live in ~2 minutes! 🎉
Make sure these files are in your .gitignore before pushing:
.env
credentials.json
search_history.json
__pycache__/
venv/
*.pyc
- Export results as CSV directly from UI
- Filter & sort results in the UI before pushing to Sheets
- Schedule automatic searches (cron jobs)
- WhatsApp / Email notification when batch is done
- Support for multiple countries & languages
- Chrome Extension version
- Serper API — Google Search API
- Google Gemini — AI enrichment
- Streamlit — Web UI framework
- gspread — Google Sheets Python client
- LangChain — AI agent orchestration
Built with 🖤 by Mansi





