# CompetitorFinder

Case study by Devansh Tiwari (https://www.devanshtiwari.com) · https://www.devanshtiwari.com/work/competitorfinder

Find competitors for any business across JustDial, IndiaMART, and Google Maps. AI-generated search queries, parallel scraping, export to Excel.

## Key facts

- Role: Solo Builder
- Client: Side Project
- Year: 2025
- Status: Shipped
- Source code: https://github.com/Devansh-365/competitorfinder
- Tech: Next.js, TypeScript, Supabase, OpenAI, Puppeteer, Playwright, Vercel AI SDK

## At a glance

- Problem: Building a competitor list from JustDial, IndiaMART and Google Maps took an afternoon.
- What I built: A tool that searches all three at once and pulls contacts and ratings for each listing.
- Result: An afternoon of copy and paste becomes one search.

## Numbers

| Metric | Value |
| --- | --- |
| Directories searched at once | 3 |
| Fields per listing | 10+ |
| Import and export | Excel |

Values with a + are public figures rounded down.

## The problem

Sales teams and founders waste hours manually searching JustDial, IndiaMART, and Google Maps to find competitors. Copy-pasting business names, phone numbers, and addresses into spreadsheets takes a full afternoon for one market segment. Three platforms, three different UIs, zero automation, and the data ages out before the sheet is finished.

## What I built

A competitor research tool that takes a company name and business category, uses OpenAI to generate platform-specific search queries for each of the three directories, then fans out Puppeteer and Playwright scrapers in parallel. Each scraper handles session management, scrolling, and anti-detection headers independently. For every listing it finds, the tool extracts business name, phone number, email, address, GST number, product categories, and ratings. Ten fields per result, automatically. Supabase persists the results so you can revisit past searches without re-scraping. Bulk import from Excel lets you queue an entire list of target businesses at once. Results export to Excel or push to Google Sheets via the Sheets API. The AI query layer is the part that makes the scraping actually useful: instead of searching the same keyword across every platform, it generates queries tuned to how each directory categorizes businesses, which meaningfully improves match quality.

### AI Query Generation

OpenAI generates platform-specific search queries for each directory. JustDial gets category + locality queries. IndiaMART gets product + B2B focus. Google Maps gets service + near me. This means match quality is higher than generic keyword searches because the query is tuned to how each platform indexes listings.

### Parallel Scraping Engine

Puppeteer and Playwright run against all three platforms concurrently. Each scraper manages its own session, handles pagination via scroll simulation, and rotates anti-detection headers. Results stream back via WebSocket so you see listings appear in real time as each scraper finishes.

### 10-Field Extraction

For every listing found, the tool extracts: business name, phone number, email, address, GST number, product categories, ratings, review count, years in business, and website URL. All fields are validated against regex patterns. Phone numbers are normalized to +91 format. Addresses are parsed into structured components.

### Bulk Import & Export

Upload an Excel file with company names and categories. The system queues each row and processes them in parallel batches of 10. Results export back to Excel with the original columns plus all extracted fields. Or push directly to Google Sheets via the Sheets API for live collaboration.

## Highlights

- AI generates targeted search queries per platform so scraping starts from relevant category pages, not a generic keyword dump
- Puppeteer and Playwright run against all 3 platforms in parallel with anti-detection headers, pulling 10+ fields per listing automatically
- Bulk Excel import lets you queue an entire lead list at once; results export back to Excel or push directly to Google Sheets

## Work with Devansh

Devansh Tiwari is an AI product engineer based in India, available for freelance and consulting work: custom data feeds from sites without APIs, AI features (agents, chat, RAG, MCP servers) built on that data, and running them after launch.

- Book a 15 minute call: https://cal.com/devansh0718/15min
- Email: devanshtiwari365@gmail.com
- All case studies: https://www.devanshtiwari.com/work
- Site summary for AI tools: https://www.devanshtiwari.com/llms.txt
