Note that you must first create a Google Console project before you can follow this tutorial. More info on the official documentation.
Activate the Google Indexing API from Google Cloud Console
Sign in to Google Cloud Console.
Using the main navigation menu (click the hamburger icon), click on APIs & Services, Library, search for Web Search Indexing API (indexing.googleapis.com), click on it from the search results, and enable it.
You will be redirect after the activation to this API.
From the left menu, click on Credentials, then from the right panel, click on the Create credentials button. Choose the “Service account” option.
The first step is to enter a name and a description of your choice, then click Create.
Second step, choose Owner from the dropdown list and click Continue button.
Simply click Done at last step.
From the Service accounts table, click on the newly service account to edit it.
Click on Keys tab, Add key, Create a new key.
From the popup, choose JSON as key type and click Create.
Your browser will start downloading a JSON file.
Close the popup.
Add your service account as a site owner to Google Search Console
Now go Google Search Console.
Select the desired website property from the list.
Then, from the left navigation panel, click on Settings.
Under Property settings, click on Users and permissions.
Click Add user button.
Enter the email address provided by the Service account previously created.
Choose Owner and click Add.
Configure SEOPress to link your WordPress site with Google Indexing API
Sign in to your WordPress admin and go to SEO, Instant Indexing settings page, Settings tab.
Open your JSON file previously downloaded with a text editor (eg: Notepad on Windows or TextEdit on Mac).
Select all it’s content with CTRL+A (CMD+A on Mac) and copy it.
Then paste it to Google Indexing API key field.
Save changes.
Index your content
From SEO, Instant Indexing, General tab, select a search engine, the action to run, and enter up to 100 URLs to the “Submit URLs for indexing” textarea field.
Then click Submit URLs to Google & Bing.
The page reloads.
You should see a success message in the response section if all went well.
Automatically request indexing with IndexNow API
Since version 5.5 of SEOPress, you can now automatically notify search engines each time a post, page or post type is published, updated or deleted.
To activate this option, just go to the Setting tab of Instant Indexing and check “Enable automatic URL submission for IndexNow API“.
Save changes.
That’s it!
FAQ
Is there any quotas?
Yes! 200 requests per day for Google, 10,000 for Bing.
Is this completely Free?
Yes, Google and Bing doesn’t no charge anything.
Should I still use a XML sitemaps?
Yes, absolutely! These APIs are still experimental and doesn’t replace your XML sitemaps.
How long do I have to wait before seeing my URLs in the search results?
As always it depends on search engines but it should take few minutes, max few hours in general.
Will this improve my ranking?
Search engines will crawl and index your content faster. However, like any URL, it depends of your content, backlinks etc.
401 error?
You Google JSON key is probably incorrect from the Settings tab. Delete it and add it again. Save changes.
403 error?
Make sure the Google Cloud user added to Google Search Console has the correct permissions: “Owner“.