A bulk Google Search Console Indexing API submission utility
Project description
GSC Fast Indexer CLI 🚀
A lightweight, automated Python command-line tool to submit URLs to the Google Search Console Indexing API in bulk. Easily index single URLs, URLs listed in text files, or extract and crawl directly from online or local XML sitemaps.
This tool bypasses the standard slow crawl cycle by directly notifying Google's Indexing API of new or updated pages, reducing indexing times from weeks to minutes.
🛠️ Maintained & Funded By
This project is created and maintained by The DIGIT.
We are a precision-engineered digital product agency specializing in:
- SaaS Product Development: Building responsive, fast, and scalable full-stack web applications.
- Autonomous AI Automation: Implementing custom LLM-powered workflows to optimize business processes.
- Technical SEO: Delivering advanced, analytics-driven site audits and performance optimizations.
Need help building your next SaaS or automating your indexing? Let's talk at thedigithq.com or reach us at business@thedigithq.com.
Features
- Bulk Sitemap Parsing: Read and parse all
<loc>elements from online/localsitemap.xmlfeeds. - Batch File Submissions: Feed a text file of URLs to be submitted sequentially.
- Action Types: Supports
URL_UPDATED(request crawling) andURL_DELETED(request removal). - Error Guidance: Detailed output troubleshooting permissions errors (a common blocker with GSC Service Accounts).
Prerequisites & Installation
1. Install Dependencies
Ensure you have Python 3 installed. Clone this repository, navigate to the directory, and install the requirements:
pip install -r requirements.txt
2. Set Up Google Indexing API Credentials (Required)
Google restricts access to its Indexing API to verified owners. Follow these steps to set up credentials:
- Create a Google Cloud Project: Go to the Google Cloud Console, and create a new project.
- Enable the API: Search for Google Indexing API and click Enable.
- Create a Service Account:
- Navigate to IAM & Admin > Service Accounts.
- Click Create Service Account (grant it a role like "Viewer" or leave it blank).
- Copy the email address of the new Service Account (it looks like
your-account@your-project.iam.gserviceaccount.com).
- Download JSON Key:
- Click on the newly created Service Account.
- Go to the Keys tab > Add Key > Create new key.
- Choose JSON format and download the file.
- Save it in the root folder of this project as
credentials.json.
- Delegate GSC Ownership (Critical Step):
- Open your Google Search Console.
- Select your site property.
- Go to Settings > Users and permissions.
- Click Add User.
- Paste the Service Account email address as the user, and set the Permission Level to Owner (Owner permissions are required to call the Indexing API).
Usage
Run the script by choosing one of the three input types:
Option A: Submit a Single URL
python indexer.py --url "https://thedigithq.com/blog/ai-workflows"
Option B: Submit URLs From a Sitemap
python indexer.py --sitemap "https://thedigithq.com/sitemap.xml"
Option C: Submit URLs From a Local File
Create a urls.txt with one URL per line:
https://thedigithq.com/services
https://thedigithq.com/about
Then run:
python indexer.py --file urls.txt
Options and Flags
-c,--credentials: Path to the service account credentials JSON (default:credentials.json).-t,--type: Action type, eitherURL_UPDATEDorURL_DELETED(default:URL_UPDATED).
License
Licensed under the MIT License. Feel free to fork, modify, and use this tool in your own CI/CD pipelines.
Need custom technical SEO workflows built? Partner with The DIGIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thedigit_gsc_indexer-1.0.0.tar.gz.
File metadata
- Download URL: thedigit_gsc_indexer-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53c315407d7b407ee5e466fe72af8358781287887013d4b0a79aa3f311cd41b5
|
|
| MD5 |
8ada003f1e595585cb23556f57fa5db9
|
|
| BLAKE2b-256 |
889677257f7538bfc20e63179599343f7bb06232fef0a4a999d698fd418adfc4
|
File details
Details for the file thedigit_gsc_indexer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: thedigit_gsc_indexer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e365f3dc98ebf7aea0c0cdd83646d9519027e5fcd8c1c8903ade268499afaf1
|
|
| MD5 |
5b329ddba88ef27b85ac537ae71ae6cc
|
|
| BLAKE2b-256 |
a33a330761c2ede1225d7fb3af7ad7d9c6a2f52a3410fee62d39368f11b11b38
|