📊 Extract competitor SERP rankings from Google Search to Sheets with Bright Data

832 views · 📊 Market Research & Insights

💡 Pro Tip — If you need GitHub data beyond what the REST API gives you, ScraperNode has a repository scraper that extracts metadata at scale without token rate limits.

View All Scrapers

Description

🔍 Extract Competitor SERP Rankings from Google Search to Sheets with Bright Data

This template requires a self-hosted n8n instance to run.

A comprehensive n8n automation that extracts competitor data from Google search results for specific keywords and target countries, automatically saving structured data to Google Sheets for competitive analysis and market research.


📋 Overview

This workflow provides a professional competitor analysis solution that identifies ranking websites for specific search terms across different countries. Perfect for SEO research, competitive intelligence, market analysis, and content strategy planning. The system uses Bright Data’s SERP API for accurate search result extraction and advanced HTML parsing for detailed competitor information.

Who is this for?

What problem is this workflow solving?

What this workflow does

  1. Manual Trigger: Starts the workflow execution
  2. Get Keywords from Sheet: Fetches keywords and target countries from Google Sheets
  3. URL Encode Keywords: Converts keywords to URL-safe format
  4. Process Keywords in Batches: Handles multiple keywords sequentially
  5. Fetch Google Search Results: Uses Bright Data SERP API to scrape HTML
  6. Extract Competitor Data from HTML: Parses HTML to extract competitor details
  7. Save Competitor Results to Sheet: Stores structured data in Google Sheets
  8. Wait to Avoid Rate Limits: Implements 30-second delays between requests

Output Data Points

FieldDescriptionExample
KeywordOriginal search termdigital marketing services
Target CountryGeographic targetUS
websiteNameDomain/company namehubspot
websiteUrlComplete website URLhttps://www.hubspot.com/marketing
websiteTitlePage title from search resultsDigital Marketing Software & Tools
websiteDescriptionMeta description/snippetGrow your business with HubSpot’s digital marketing tools…

⚙️ Setup

Prerequisites

Google Sheet Structure

This workflow utilizes two Google Sheets: one for input keywords and one for outputting competitor data.

Input Sheet: “Keywords”

This sheet should contain the keywords and target countries for your search queries.

Column HeaderData TypeDescriptionExample
KeywordTextThe search term you want to analyze.digital marketing
CountryTextThe 2-letter ISO country code for the target region of the search (e.g., US, GB, DE).US

Output Sheet: “Competitor Results”

This sheet will be populated automatically by the workflow with the extracted competitor data.

Column HeaderData TypeDescriptionExample
KeywordTextThe original search term used for the query.digital marketing services
Target CountryTextThe 2-letter ISO country code of the search results.US
websiteNameTextThe name of the website or domain found in the search results.hubspot
websiteUrlURLThe full URL of the website or page found in the search results.https://www.hubspot.com/marketing
websiteTitleTextThe title of the page as displayed in the Google search results.Digital Marketing Software & Tools
websiteDescriptionTextThe meta description or snippet text displayed under the title in search results.Grow your business with HubSpot’s digital marketing tools…

Step-by-Step Setup

  1. Import the Workflow: Copy JSON → n8n → Workflows → + Add → Import from JSON
  2. Configure Bright Data Credentials:
    • Credential Type: HTTP Header Auth
    • Header Name: Authorization
    • Header Value: Bearer YOUR_API_TOKEN
  3. Configure Google Sheets:
    • Create two new Google Sheets as described above: one named “Keywords” (for input) and one named “Competitor Results” (for output).
    • Set up Google Sheets OAuth2 credentials within n8n.
  4. Update Workflow Settings:
    • Replace placeholders: YOUR_GOOGLE_SHEET_ID (for both input and output sheets), YOUR_BRIGHTDATA_CREDENTIAL_ID.
    • Ensure correct sheet/tab names are selected in the Google Sheets nodes.
  5. Test & Activate: Add test data to your “Keywords” sheet → Execute workflow → Verify output in your “Competitor Results” sheet.

🛠 How to Customize


📊 Use Cases & Examples


📈 Performance & Limits


🧰 Troubleshooting


🤝 Support & Community


🎯 Final Notes

This workflow provides a comprehensive foundation for competitor research and market analysis. Customize it to fit your specific industry needs and competitive intelligence requirements.


Please note that this template uses Community Nodes. Ensure you understand the risks before using community nodes.

🔗 Nodes Used

Google Sheets, HTTP Request

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup