Skip to content

A command-line tool to automatically submit website URLs to Google's Indexing API and Bing's IndexNow API. The tool scans your website's sitemap.xml and submits all URLs for indexing to both search engines.

Notifications You must be signed in to change notification settings

al3rez/indexpusher-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Index Pusher

A command-line tool to automatically submit website URLs to Google's Indexing API and Bing's IndexNow API. The tool scans your website's sitemap.xml and submits all URLs for indexing to both search engines.

Features

  • Add and manage multiple websites
  • Automatically scan sitemap.xml files
  • Submit URLs to Google's Indexing API
  • Submit URLs to Bing's IndexNow API
  • Schedule daily automatic submissions
  • Beautiful terminal interface with progress tracking
  • Service account authentication for Google (no user interaction required)
  • Simple key-based authentication for Bing

Prerequisites

  1. Python 3.7 or higher
  2. For Google: Google Cloud Project with Indexing API enabled + Service Account credentials
  3. For Bing: IndexNow API key (generated and hosted on your website)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/indexpusher.git
cd indexpusher
  1. Install dependencies:
pip install -r requirements.txt
  1. Google Setup (Optional): Download your Service Account credentials from Google Cloud Console and save as credentials.json in the project directory.

  2. Bing Setup (Optional): Generate a Bing IndexNow key and configure it with the tool.

Usage

Add a website

python index_pusher.py add https://example.com

Configure Bing IndexNow (one-time setup)

python index_pusher.py set-bing-key your-indexnow-key-here

Verify Bing key file setup

python index_pusher.py verify-bing-key

Show current configuration

python index_pusher.py show-config

List monitored websites

python index_pusher.py list

Submit URLs to Google and Bing

python index_pusher.py submit

Remove a website

python index_pusher.py remove https://example.com

Schedule daily submissions

python index_pusher.py schedule

Setting up Google Cloud Service Account

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Indexing API
  4. Go to IAM & Admin > Service Accounts
  5. Create a new service account
  6. Download the JSON key file and save as credentials.json in the project directory
  7. Grant the service account the "Indexing API User" role

Setting up Bing IndexNow

  1. Generate an IndexNow key using Bing's online tool or use any 8-128 character hexadecimal string
  2. Configure the key in the tool:
    python index_pusher.py set-bing-key your-key-here
  3. Important: Create a text file named {your-key}.txt in the root of your website containing only your key
    • Example: If your key is abc123def456, create https://yourwebsite.com/abc123def456.txt
    • The file content should be exactly: abc123def456
  4. Verify setup:
    python index_pusher.py verify-bing-key

Commands

  • add <url> - Add a website to monitor (checks for sitemap.xml)
  • set-bing-key <key> - Configure Bing IndexNow API key
  • verify-bing-key - Check if Bing key files are properly hosted
  • show-config - Display current configuration
  • list - Show all monitored websites
  • submit - Submit all URLs from all monitored websites to Google and Bing
  • remove <url> - Remove a website from monitoring
  • schedule - Set up daily automatic submissions at 2:00 AM

Notes

  • Google: Uses service account authentication (no browser interaction required)
  • Bing: Uses key-based authentication (requires hosting key file on your website)
  • URLs are submitted with the 'URL_UPDATED' type for Google
  • The tool works with either service configured independently or both together
  • The scheduler uses crontab for daily execution at 2:00 AM
  • Make sure your website has a valid sitemap.xml file
  • Rate limiting is handled automatically for both services
  • Bing IndexNow allows up to 10,000 URLs per submission

About

A command-line tool to automatically submit website URLs to Google's Indexing API and Bing's IndexNow API. The tool scans your website's sitemap.xml and submits all URLs for indexing to both search engines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages