Skip to content

Instantly share code, notes, and snippets.

@jack2jm
Last active February 12, 2024 05:52
Show Gist options
  • Save jack2jm/d3819344fa5f1a77c7c0e921fa085a69 to your computer and use it in GitHub Desktop.
Save jack2jm/d3819344fa5f1a77c7c0e921fa085a69 to your computer and use it in GitHub Desktop.
Master Link - https://developers.google.com/search/apis/indexing-api/v3/prereqs
---------------------------
Step: 1
1. Create project first. Give Name like Domain. (eg. example.com)
2. Enable Indexing API (https://console.developers.google.com/start/api?id=indexing.googleapis.com&credential=client_key)
(They are asking for - Data (select *appilcation data*))
2. Open the Service accounts page. If prompted, select a project. (https://console.developers.google.com/iam-admin/serviceaccounts)
3. Give service account name (any name you would like to add)
4. Its asking for Permission & Role (Skip this.)
5. Now We need to generate json file for API indexing
6. Go To Service accounts, select which you created. (https://console.cloud.google.com/iam-admin/serviceaccounts?authuser=1)
7. select on three dots, click manage keys, *click on new Key* and click on *JSON*.
8. It will be autometic download json file. store it anywhere. its private key.
----------------------------------------------------------------------------------
Step 2: Verify Owner Ship
1. Open webmaster and verify Domain proprty.
2. After your property has been verified, add your service account email as a full user.
You can find your service account email address in two places:
3. The client_email field in the JSON private key that you downloaded when you created your project.
The Service account ID column of the Service Accounts view in the Developers Console.
The email address has a format similar to the following:
my-service-account@project-name.google.com.iam.gserviceaccount.com
***Give Full access to created service account, other wise it will not work****
******** also give permission from old search console *******
1.Open this https://www.google.com/webmasters/verification/home
2. add owner same email into services.json
************ other wise it throw error - cannot verify ownership ************
------------------------------------------------
Step 3:
1. paste that to service.json, which wasdownloaded from services.json - service account.
2. Now paste your urls one by one into urls.txt file.
3. You need to install node.js into your pc.
4. go to that directory using CMD.
5. run command
node index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment