Skip to content

XxAKLONxX/Google_SERP_Position_Tracker_SEO_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔍 Google SERP Position Tracker

Track your website's Google Search rankings with extended position tracking (up to position 100).


📁 Files

File Description
fetcher.py Main script
credentials.txt Your API credentials (fill this!)
keywords.xlsx Your keyword list (you create this)
serp_progress/ Auto-created: stores progress
serp_config.json Auto-created: your configuration
serp_scraper.log Auto-created: log file

Note: serp_progress/ keeps your progress so you can continue the next day when API quota refreshes.


🔧 Installation

Required: pip install pandas requests openpyxl

Optional (for stealth scraping): pip install beautifulsoup4 fake-useragent cloudscraper


🔑 Google Custom Search API Setup

You need a Google API Key and Search Engine ID (cx).

Step 1: Get API Key

  1. Go to Google Cloud Console
  2. Create a new project (or select existing)
  3. Enable Custom Search API
  4. Go to CredentialsCreate CredentialsAPI Key
  5. Copy your API key

Step 2: Create Search Engine

  1. Go to Programmable Search Engine
  2. Click Add to create new search engine
  3. Under "Sites to search" enter * (searches entire web)
  4. Name it (e.g., "SERP Tracker")
  5. Click Create
  6. Copy the Search Engine ID (cx)

Step 3: Configure for UK Results

  1. In your search engine settings
  2. Scroll to Search featuresRegion
  3. Select United Kingdom (or your target country)
  4. Toggle Region-restricted results to ON

📝 credentials.txt Format

api_key=YOUR_GOOGLE_API_KEY_HERE cx=YOUR_SEARCH_ENGINE_ID_HERE

⚠️ Never share your real credentials!


📊 Keywords File Format

Create an Excel file (.xlsx) or CSV:

Keyword
industrial hinges
cabinet locks
panel fasteners

🚀 How to Run

cd path/to/folder python fetcher.py


📈 Output

The script generates an Excel report with:

  • Summary - Overview stats
  • Top 10 Competitors - All top 10 results per keyword
  • Your Site Positions - Where your site ranks
  • Competitor Analysis - Domain frequency & avg position
  • Not Ranking - Keywords where you don't appear

💡 API Quota

  • Free: 100 queries/day
  • Paid: $5 per 1,000 queries

Script saves progress automatically. Run again tomorrow to continue!

About

This is a set of every Toolkit for seo's

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages