A Jupyter notebook that builds a competitive intelligence pipeline using Bright Data's Web Execution Layer APIs and OpenAI GPT for analysis.
This notebook performs a comprehensive competitive audit across 5 sections:
- SERP Ranking - Searches Google for industry keywords, finds your position vs competitors, and identifies top competitors
- Deep Dive - Scrapes competitor homepages as markdown and extracts value propositions, features, pricing, and trust signals using GPT
- AI Perception - Queries ChatGPT, Perplexity, Grok, and Gemini to see if AI engines recommend your brand
- Deep Competitor Analysis - Scrapes deeper pages (pricing, features) and generates consolidated company profiles with competitive comparison
- Executive Summary - GPT-powered analysis compiling all findings into actionable insights
- Bright Data Account with:
- SERP API zone configured
- Web Unlocker zone configured
- API token
- OpenAI API Key for GPT-powered analysis
-
Click the "Open in Colab" badge above (or this link)
-
Add your API keys to Colab Secrets:
- Click the 🔑 key icon in the left sidebar
- Add each secret and toggle "Notebook access" on:
Secret Name Description BRIGHTDATA_API_TOKENYour Bright Data API token BRIGHTDATA_ZONE_SERPSERP API zone name (e.g., serp_api1)BRIGHTDATA_ZONE_UNLOCKERWeb Unlocker zone name (e.g., unlocker)OPENAI_API_KEYYour OpenAI API key -
Run the notebook cells in order
| API | Purpose |
|---|---|
| SERP API | Google search results with structured JSON output |
| Web Unlocker | Scrape any website as clean markdown |
| Web Scraper API | Pre-built scrapers for AI engines (ChatGPT, Perplexity, Grok, Gemini) |
The notebook generates:
- SERP ranking analysis with competitor identification
- Structured insights from competitor homepages
- AI engine perception analysis (brand mention tracking)
- Consolidated company profiles with competitive comparison
- Executive report with strengths, weaknesses, and recommended actions
MIT