{"id":13454546,"url":"https://github.com/goenning/google-indexing-script","last_synced_at":"2025-05-14T04:09:36.764Z","repository":{"id":218416317,"uuid":"746244845","full_name":"goenning/google-indexing-script","owner":"goenning","description":"Script to get your site indexed on Google in less than 48 hours","archived":false,"fork":false,"pushed_at":"2024-10-10T18:39:11.000Z","size":179,"stargazers_count":6960,"open_issues_count":17,"forks_count":483,"subscribers_count":27,"default_branch":"main","last_synced_at":"2024-10-29T15:35:12.905Z","etag":null,"topics":["google","indexing","seo"],"latest_commit_sha":null,"homepage":"https://seogets.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goenning.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-01-21T14:01:42.000Z","updated_at":"2024-10-29T09:27:31.000Z","dependencies_parsed_at":"2024-01-27T21:53:29.471Z","dependency_job_id":"e425de26-f6c7-41f8-9133-4dcd750cceb8","html_url":"https://github.com/goenning/google-indexing-script","commit_stats":null,"previous_names":["goenning/google-indexing-script"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goenning%2Fgoogle-indexing-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goenning%2Fgoogle-indexing-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goenning%2Fgoogle-indexing-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goenning%2Fgoogle-indexing-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goenning","download_url":"https://codeload.github.com/goenning/google-indexing-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254070107,"owners_count":22009559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","indexing","seo"],"created_at":"2024-07-31T08:00:55.241Z","updated_at":"2025-05-14T04:09:31.749Z","avatar_url":"https://github.com/goenning.png","language":"TypeScript","readme":"# Google Indexing Script\n\nUse this script to get your entire site indexed on Google in less than 48 hours. No tricks, no hacks, just a simple script and a Google API.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e 1. This script uses [Google Indexing API](https://developers.google.com/search/apis/indexing-api/v3/quickstart) and it only works on pages with either `JobPosting` or `BroadcastEvent` structured data.\n\u003e 2. Indexing != Ranking. This will not help your page rank on Google, it'll just let Google know about the existence of your pages.\n\n## Requirements\n\n- Install [Node.js](https://nodejs.org/en/download)\n- An account on [Google Search Console](https://search.google.com/search-console/about) with the verified sites you want to index\n- An account on [Google Cloud](https://console.cloud.google.com/)\n\n## Preparation\n\n1. Follow this [guide](https://developers.google.com/search/apis/indexing-api/v3/prereqs) from Google. By the end of it, you should have a project on Google Cloud with the Indexing API enabled, a service account with the `Owner` permission on your sites.\n2. Make sure you enable both [`Google Search Console API`](https://console.cloud.google.com/apis/api/searchconsole.googleapis.com) and [`Web Search Indexing API`](https://console.cloud.google.com/apis/api/indexing.googleapis.com) on your [Google Project ➤ API Services ➤ Enabled API \u0026 Services](https://console.cloud.google.com/apis/dashboard).\n3. [Download the JSON](https://github.com/goenning/google-indexing-script/issues/2) file with the credentials of your service account and save it in the same folder as the script. The file should be named `service_account.json`\n\n## Installation\n\n### Using CLI\n\nInstall the cli globally on your machine.\n\n```bash\nnpm i -g google-indexing-script\n```\n\n### Using the repository\n\nClone the repository to your machine.\n\n```bash\ngit clone https://github.com/goenning/google-indexing-script.git\ncd google-indexing-script\n```\n\nInstall and build the project.\n\n```bash\nnpm install\nnpm run build\nnpm i -g .\n```\n\n\u003e [!NOTE]\n\u003e Ensure you are using an up-to-date Node.js version, with a preference for v20 or later. Check your current version with `node -v`.\n\n## Usage\n\n\u003cdetails open\u003e\n\u003csummary\u003eWith \u003ccode\u003eservice_account.json\u003c/code\u003e \u003ci\u003e(recommended)\u003c/i\u003e\u003c/summary\u003e\n\nCreate a `.gis` directory in your home folder and move the `service_account.json` file there.\n\n```bash\nmkdir ~/.gis\nmv service_account.json ~/.gis\n```\n\nRun the script with the domain or url you want to index.\n\n```bash\ngis \u003cdomain or url\u003e\n# example\ngis seogets.com\n```\n\nHere are some other ways to run the script:\n\n```bash\n# custom path to service_account.json\ngis seogets.com --path /path/to/service_account.json\n# long version command\ngoogle-indexing-script seogets.com\n# cloned repository\nnpm run index seogets.com\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith environment variables\u003c/summary\u003e\n\nOpen `service_account.json` and copy the `client_email` and `private_key` values.\n\nRun the script with the domain or url you want to index.\n\n```bash\nGIS_CLIENT_EMAIL=your-client-email GIS_PRIVATE_KEY=your-private-key gis seogets.com\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith arguments \u003ci\u003e(not recommended)\u003c/i\u003e\u003c/summary\u003e\n\nOpen `service_account.json` and copy the `client_email` and `private_key` values.\n\nOnce you have the values, run the script with the domain or url you want to index, the client email and the private key.\n\n```bash\ngis seogets.com --client-email your-client-email --private-key your-private-key\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAs a npm module\u003c/summary\u003e\n\nYou can also use the script as a [npm module](https://www.npmjs.com/package/google-indexing-script) in your own project.\n\n```bash\nnpm i google-indexing-script\n```\n\n```javascript\nimport { index } from \"google-indexing-script\";\nimport serviceAccount from \"./service_account.json\";\n\nindex(\"seogets.com\", {\n  client_email: serviceAccount.client_email,\n  private_key: serviceAccount.private_key,\n})\n  .then(console.log)\n  .catch(console.error);\n```\n\nRead the [API documentation](https://jsdocs.io/package/google-indexing-script) for more details.\n\n\u003c/details\u003e\n\nHere's an example of what you should expect:\n\n![](./output.png)\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e - Your site must have 1 or more sitemaps submitted to Google Search Console. Otherwise, the script will not be able to find the pages to index.\n\u003e - You can run the script as many times as you want. It will only index the pages that are not already indexed.\n\u003e - Sites with a large number of pages might take a while to index, be patient.\n\n## Quota\n\nDepending on your account several quotas are configured for the API (see [docs](https://developers.google.com/search/apis/indexing-api/v3/quota-pricing#quota)). By default the script exits as soon as the rate limit is exceeded. You can configure a retry mechanism for the read requests that apply on a per minute time frame.\n\n\u003cdetails\u003e\n\u003csummary\u003eWith environment variables\u003c/summary\u003e\n\n```bash\nexport GIS_QUOTA_RPM_RETRY=true\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAs a npm module\u003c/summary\u003e\n\n```javascript\nimport { index } from 'google-indexing-script'\nimport serviceAccount from './service_account.json'\n\nindex('seogets.com', {\n  client_email: serviceAccount.client_email,\n  private_key: serviceAccount.private_key\n  quota: {\n    rpmRetry: true\n  }\n})\n  .then(console.log)\n  .catch(console.error)\n```\n\n\u003c/details\u003e\n\n## 📄 License\n\nMIT License\n\n## 💖 Sponsor\n\nThis project is sponsored by [SEO Gets](https://seogets.com)\n\n![](https://seogets.com/og.png)\n","funding_links":[],"categories":["JavaScript","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoenning%2Fgoogle-indexing-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoenning%2Fgoogle-indexing-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoenning%2Fgoogle-indexing-script/lists"}