{"id":51054994,"url":"https://github.com/yuceltoluyag/google-indexing-tool","last_synced_at":"2026-06-22T20:31:15.273Z","repository":{"id":358752358,"uuid":"1095000005","full_name":"yuceltoluyag/google-indexing-tool","owner":"yuceltoluyag","description":"Python CLI tool for Google Indexing API. Automate submission of new/updated URLs to Google Search for faster content discovery \u0026 improved SEO. Manages article links via CSV for streamlined indexing requests. Essential for webmasters \u0026 developers.","archived":false,"fork":false,"pushed_at":"2026-06-16T18:37:34.000Z","size":227,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T20:24:06.443Z","etag":null,"topics":["google","googleindexing","pelican","pelican-plugins","pelican-seo","seo","seo-optimization"],"latest_commit_sha":null,"homepage":"https://yuceltoluyag.github.io/en/google-indexing-api-nasil-kullanilir/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuceltoluyag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-12T13:08:43.000Z","updated_at":"2026-06-16T18:38:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yuceltoluyag/google-indexing-tool","commit_stats":null,"previous_names":["yuceltoluyag/google-indexing-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuceltoluyag/google-indexing-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuceltoluyag%2Fgoogle-indexing-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuceltoluyag%2Fgoogle-indexing-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuceltoluyag%2Fgoogle-indexing-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuceltoluyag%2Fgoogle-indexing-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuceltoluyag","download_url":"https://codeload.github.com/yuceltoluyag/google-indexing-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuceltoluyag%2Fgoogle-indexing-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34665260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","googleindexing","pelican","pelican-plugins","pelican-seo","seo","seo-optimization"],"created_at":"2026-06-22T20:31:14.833Z","updated_at":"2026-06-22T20:31:15.264Z","avatar_url":"https://github.com/yuceltoluyag.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google \u0026 Bing Indexing API Tools\n\nThis project is a modern, object-oriented Python CLI utility designed to manage search engine indexation (Google Indexing API, Google Search Console URL Inspection API, and Bing IndexNow API). It parses your Pelican blog articles, tracks index status in a local CSV database, and automates submissions while enforcing daily limits and cooldown periods.\n\n## System Architecture\n\nThe tool is structured as a modular Python package located in `src/indexing_tool/`:\n- `config.py`: Configuration loading and parsing using Pydantic.\n- `models.py`: Pydantic data schemas representing article records and cooldown rules.\n- `csv_manager.py`: Encapsulated database operations on `article_links.csv`.\n- `google_client.py`: Client wrappers for Search Console and Google Indexing API.\n- `bing_client.py`: Batch IndexNow client wrapper.\n- `pelican_exporter.py`: Exporter extracting published post URLs.\n- `orchestrator.py`: Business logic layer directing workflows.\n- `main.py`: The single CLI entry point for the entire application.\n\n## Configuration (`config.ini`)\n\nBefore executing commands, configure your settings in `config.ini`:\n\n```ini\n[PELICAN]\nARTICLES_PATH = content/articles\nSITE_URL = https://yourdomain.com/\n\n[DEFAULT]\nCSV_FILE = article_links.csv\nSERVICE_ACCOUNT_FILE = service-account.json\nLOG_FILE = indexing.log\n\n[API]\nURL = https://indexing.googleapis.com/v3/urlNotifications:publish\nREQUEST_DELAY_SECONDS = 10\nCOOLDOWN_DAYS = 3\n\n[BING]\nAPI_KEY = your_indexnow_api_key\nKEY_LOCATION = https://yourdomain.com/your_indexnow_api_key.txt\n```\n\n- **COOLDOWN_DAYS**: Number of days to shield a page from being re-submitted to Google Indexing API if it is not yet indexed.\n\n## 📦 Global CLI Installation (Multi-Project Support)\n\nIf you have multiple blog projects and want to run this indexing tool across all of them without copying the codebase, you can install the tool as a global CLI package directly from GitHub:\n\n```bash\npip install git+https://github.com/yuceltoluyag/google-indexing-tool.git\n```\n\nThis registers a global `google-indexer` command in your system. To use it in any project:\n\n1. Navigate to your blog project's root folder:\n   ```bash\n   cd /path/to/my-other-blog\n   ```\n2. Place your blog-specific `config.ini` and `service-account.json` (or whichever name is referenced in `config.ini`) in that folder.\n3. Run any command directly:\n   ```bash\n   # Export Pelican posts to CSV\n   google-indexer export\n\n   # Perform smart Google inspection and submission\n   google-indexer smart --limit 50\n\n   # Submit to Bing IndexNow\n   google-indexer bing\n   ```\n*The CLI automatically reads the local `config.ini` and updates/creates the `article_links.csv` in whichever folder you run the command.*\n\n---\n\n## Installation \u0026 Setup (Local Development)\n\n### 1. Common Setup\n\na. **Create a virtual environment:**\n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n   ```\n\nb. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### 2. Google API Setup\n\na. **Enable the Indexing API:** Go to the [Google Cloud Console](https://console.cloud.google.com/apis/library/indexing.googleapis.com) and enable the Indexing API.\n\nb. **Create a Service Account:** Go to the [Service Accounts page](https://console.cloud.google.com/iam-admin/serviceaccounts) and create a new service account.\n\nc. **Generate a JSON Key:** From the service account's \"Manage keys\" section, create a new JSON key. Save it as `service-account.json` (or reference its name under `SERVICE_ACCOUNT_FILE` in `config.ini`) and place it in the project root.\n\nd. **Grant Access in Google Search Console:** In your site's [Google Search Console](https://search.google.com/search-console/users), add the service account's email address as a user with **Owner** permission.\n\ne. **Enable the Search Console API:** For the indexing status checker CLI tool to work, also go to the [Google Search Console API](https://console.developers.google.com/apis/api/searchconsole.googleapis.com/overview) and enable it for the same Google Cloud project.\n\n### 3. Bing IndexNow Setup\n\na. **Generate an API Key:** You can generate a key using Bing Webmaster Tools or by simply creating a UUID. The key should be a hexadecimal string.\n\nb. **Create the Key File:** Create a text file in the root of your project. The name of the file must be your API key with a `.txt` extension (e.g., `your_api_key.txt`). The content of this file must be the API key itself.\n\nc. **Host the Key File:** This key file must be publicly accessible on your web server at the root. For example: `https://yourdomain.com/your_api_key.txt`.\n\nd. **Update config.ini:** Set the `API_KEY` and `KEY_LOCATION` in the `[BING]` section of your `config.ini` file.\n\n## 🚀 Step-by-Step Workflow for Beginners\n\nIf you are running the project for the first time, you should run the commands in the following sequence:\n\n### Step 1: Export Pelican Articles to the CSV Database\nFirst, scan your published articles and add them to your tracking database (`article_links.csv`):\n```bash\npython main.py export\n```\n*This command creates or updates the `article_links.csv` file in the project root.*\n\n### Step 2: Submit New URLs to Bing IndexNow\nSubmit all your new or updated URLs to Bing in a single batch request:\n```bash\n# Preview the submission (optional dry-run):\npython main.py bing --dry-run\n\n# Perform the actual submission:\npython main.py bing\n```\n*Since Bing IndexNow supports batch submissions, all pending URLs are sent efficiently in a single API call.*\n\n### Step 3: Run the Smart Google Indexing Workflow (Daily Routine)\nDetect non-indexed pages and submit only the pending ones (status `NEUTRAL`/`FAIL`) to the Google Indexing API, respecting the cooldown rules:\n```bash\n# Run a dry-run simulation:\npython main.py smart --dry-run --limit 10\n\n# Start the live status check and submission loop:\npython main.py smart --limit 50\n```\n*This command automatically queries Search Console for the status of your non-indexed URLs. If they are already indexed, it updates their status to `PASS`. If they are not indexed, it submits them to the Indexing API and initiates a 3-day cooldown timer to prevent repeated requests.*\n\n---\n\n## CLI Usage Guide\n\nAll actions are performed via `main.py`.\n\n### 1. Export Pelican Articles\nFind all published posts in the Pelican articles folder and append new ones to the CSV:\n```bash\npython main.py export\n```\n\n### 2. Inspect Google Index Status (Troubleshooting \u0026 Debugging)\nThese commands are optional utility tools used to query the Google Search Console index status without triggering any Indexing API submissions or cooldowns.\n\n- **Single URL Check** (inspects detailed coverage for a specific page):\n  ```bash\n  python main.py inspect --url https://yourdomain.com/my-post/\n  ```\n- **Newest N URLs Check** (inspects the status of the last N entries in the CSV):\n  ```bash\n  python main.py inspect --newest 10\n  ```\n- **Bulk Check** (inspects pending entries up to a specified limit):\n  ```bash\n  python main.py inspect --bulk --limit 50\n  ```\n\n### 3. Smart Google Indexing (Recommended)\nThis workflow inspects the status of pending URLs, and only triggers Google Indexing API submissions for pages that are not yet indexed (`NEUTRAL`/`FAIL`), while honoring the defined cooldown days.\n\n- **Simulation (Dry Run)**:\n  ```bash\n  python main.py smart --dry-run --limit 10\n  ```\n- **Submit Indexing API**:\n  ```bash\n  python main.py smart --limit 20\n  ```\n\n### 4. Bing IndexNow Submission\nSubmit all new URLs (that haven't been submitted to Bing yet) in a single batch:\n\n- **Simulation (Dry Run)**:\n  ```bash\n  python main.py bing --dry-run\n  ```\n- **Execute Submission**:\n  ```bash\n  python main.py bing\n  ```\n\n---\n\n## API Limits and Responsibility\n\n**IMPORTANT:** You are responsible for using these tools in accordance with the terms of service of each search engine.\n\n- **Google Indexing API:** Has a daily usage quota of **200 URLs per day**. The script submits URLs one by one to respect this.\n- **Bing IndexNow API:** Allows up to **10,000 URLs per submission**. Our script sends all new URLs in a single batch.\n\n**Warning:** Do not modify the scripts to bypass these limits or submit URLs excessively. Abusing the APIs by sending too many requests or submitting URLs that have not changed can lead to your site being temporarily or permanently flagged as spam by the search engines. **The responsibility for proper use and any consequences of misuse lies entirely with you.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuceltoluyag%2Fgoogle-indexing-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuceltoluyag%2Fgoogle-indexing-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuceltoluyag%2Fgoogle-indexing-tool/lists"}