{"id":20577989,"url":"https://github.com/theriturajps/gsc-auto-index-script","last_synced_at":"2026-04-15T11:32:41.906Z","repository":{"id":231995817,"uuid":"783193841","full_name":"theriturajps/GSC-Auto-Index-Script","owner":"theriturajps","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-07T07:51:34.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T11:38:26.690Z","etag":null,"topics":["google","gsc","gsc-script","indexing","indexing-api"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/theriturajps.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}},"created_at":"2024-04-07T07:38:20.000Z","updated_at":"2024-04-07T07:57:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed7014cc-1a5c-4c7e-bff0-f2b57dd22072","html_url":"https://github.com/theriturajps/GSC-Auto-Index-Script","commit_stats":null,"previous_names":["theriturajps/gsc-auto-index-script"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theriturajps/GSC-Auto-Index-Script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theriturajps%2FGSC-Auto-Index-Script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theriturajps%2FGSC-Auto-Index-Script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theriturajps%2FGSC-Auto-Index-Script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theriturajps%2FGSC-Auto-Index-Script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theriturajps","download_url":"https://codeload.github.com/theriturajps/GSC-Auto-Index-Script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theriturajps%2FGSC-Auto-Index-Script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31839210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T11:29:19.690Z","status":"ssl_error","status_checked_at":"2026-04-15T11:29:19.171Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","gsc","gsc-script","indexing","indexing-api"],"created_at":"2024-11-16T06:09:37.866Z","updated_at":"2026-04-15T11:32:41.894Z","avatar_url":"https://github.com/theriturajps.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Search Console Auto-Indexing Script (GSC-Auto-Indexing)\n\nThis script will automatically submit all your website URLs to Google Search Console for indexing (or re-indexing).\n\nThere are heaps of paid SEO tools available to automatically submit your sites to Google for indexing. They're great, but you can also use this script to do the same thing for free.\n\nThis script uses a Google Cloud Service Account to connect to your Google Search Console instance, pull in your sitemap, and submit each page automatically for indexing.\n\nPlus, it's easy to get started.\n\n## Setup\n\nSetting up this script is easy. You just need to create a (free) Google Cloud service account, authenticate this script using the `.json` service account keys, then invite the service account to your Google Search Console account.\n\n0. Clone this script and install packages\n\n   Download this script directly, or clone it. Make sure you've got `ruby` installed locally, then run `bundle` to install all required packages —\n\n   ```sh\n   git clone git@github.com:theriturajps/GSC-Auto-Index-Script.git\n   cd GSC-Auto-Index-Script\n   bundle\n   ```\n1. Create a service account in Google Cloud\n\n   - Visit https://console.cloud.google.com/iam-admin/serviceaccounts and create a new service account (click the big `+ Create Service Account` button).\n   - Click \"Actions\" \u003e \"Manage keys\" \u003e \"Add key\" \u003e \"Create new key\" \u003e \"JSON\". A `.json` key file will automatically download — move it into this project directory\n2. Authenticate the script\n\n   - Edit `script.rb` and change the line with `service_account_file = \"_.json\" to be the name of your `.json` key file.\n   - For example,\n\n   ```ruby\n   service_account_file = \"main_service_account.json\"\n   ```\n3. Invite your service account into your Google Search Console\n\n   - Open Google Search Console and, in the sidebar, click \"Settings\" \u003e \"Users and Permissions\" \u003e \"Add User\" and enter the email of your service account\n     - ie: \"`example@project-400005.iam.gserviceaccount.com`\"\n     - Set the permissions for the account to \"Owner\"\n4. Run the script!\n\n   - Run `ruby script.rb` to start the script. It will automatically pull in the sites available in your Google Search Console, and let you choose between them.\n   - Once you choose a site, it will parse the sitemap (from the URL within Google Search Console), and submit each page for indexing.\n\n## Optional Configuration and Flags\n\n### `INDEX_FROM_CSV`\n\nIf this flag is set `true`, the script will look for a CSV file called `urls.csv`. This file should contain a comma-separated list of URLs to index, like this —\n\n```csv\nhttps://www.riturajps.in, https://riturajps.in/p/about-us.html\n```\n\nThis can be helpful for sites with a massive number of pages, so you can index a subset rather than all of them.\n\nBy default, this flag is set `false`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheriturajps%2Fgsc-auto-index-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheriturajps%2Fgsc-auto-index-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheriturajps%2Fgsc-auto-index-script/lists"}