Skip to content

ayankcell/google-search-console-cli

 
 

Repository files navigation

Google Search Console and Indexing API with CLI interface

This package allows you to manage your Google Search Console and Indexing API through cli interface.

Build and Test Release Version MIT License

The use of Indexing API, is inspired by RankMath WordPress plugin, you can follow the steps there sto setup the service account on your Google cloud project.

Requirements

  • Node.js 10 or above

Install

  1. npm install -g gsc-cli.
  2. Follow the steps to set up your Google cloud service account, see the how to below.
  3. Run gsc config setup --jsonFile=<path to file>, and use your api token.
  4. Run gsc --help for all available commands.

Steps to set up Google Cloud API

  1. Create your Google cloud account if you don't have one.
  2. Feel free to create a new project or use existing one.
  3. Enable Google Indexing API, click here to automatically set it up.
  4. Now create a service account
  5. Select and copy the whole Service Account ID (the one that looks like an email address) because you will need it later.
  6. Now create the API Key in JSON format (you need this for authentication)
  7. Add the Service Account as an owner of your Google Search Console Property
  8. From Search Console > Settings > Users and Permissions, choose the "Manage property owners" from the main user.
  9. Add owner with the email address you copy before for the search console property
  10. That's it
  11. Now from you cli, run gsc config setup --jsonFile=<path to json file>
  12. Now the cli package is ready to use

Documentation

Documentation is available at the wiki page for all the available commands and the optional arguments.

Contributing

Pull requests and feedback are welcome. Contributing guideline will be added later.

Disclaimer

This tool will only give the signal to Google Indexing API that URL has content updated. It will not guarantee that Google crawl that immediately. Read more about this Indexing API

Changelog

A complete listing of all notable changes to this package in CHANGELOG.md.

About

Google Search Console API with CLI interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%