XML sitemap vs Google Indexing API: Which is Better?

Google has become more sophisticated in ranking the most useful and user-friendly pages. But that's not the only thing. The way pages get into Google Index is changing too. That's when XML sitemap and Google Indexing API come into play.

Should you rely on the standard crawling or request indexing through API? Today you stop wondering which option is best for your ranking and SEO in general. 

We'll compare the XML sitemap and Google Indexing API to determine if you need both for your website. 

 

As usual, before we get to the main part, let's define what these concepts are.

What is XML Sitemap?

XML sitemap is a file where you include information about the pages, videos and other files on your website and the relationships between them. This file tells Google which pages are important on your website and which ones you want indexed. Google then uses the sitemap to crawl your pages and add them to the index. 

Before you ask, Google can discover your pages through internal and external linking. However, submitting the XML sitemap to Google improves crawling, especially for larger websites. 

You need an XML sitemap when: 

  • Your website is new — Google bots discover web pages by following links from one page to another. If your website is new and has no links to it yet, a sitemap is a must to be discovered by Google.
  • Your website is large — it's hard to ensure each page has at least one page linking to it on websites with a complex structure. Thus Google bots might not discover new or updated pages through linking alone.

What is Google Indexing API?

Google Indexing API is a way of setting indexing requests directly to Google whenever your pages are added, updated or removed. However, you shouldn't confuse indexing with crawling. 

Even though it is called the Indexing API, it doesn't send pages directly into Google index. The indexing API allows Google to schedule pages for a fresh crawl and scan instantly, skipping the crawling queue.

The URL still goes through the processing stage after which Google decides whether to add it to the index.

You need Google Indexing API when:

  • You frequently update content — as we've already specified, there usually is a crawling queue. If you add new or updated content frequently, Google Indexing API will help to bypass the crawling queue. So content is processed and indexed faster.
  • Your website is large — same as with a sitemap, complex structure with thousands of pages makes it hard for Google to discover updated or new pages through the sitemap or links alone. Google Indexing API, on the other hand, does it sooner.

XML Sitemap vs Google Indexing API

At this point, you're probably confused since the Google indexing API doesn't send pages directly to the index. Both, the XML sitemap and Google Indexing API work with the crawling stage. But there is still a difference.

The XML sitemap tells Google that something on the URL has changed. But Google still needs to visit the URL and crawl it to discover the changes. 

The Indexing API on the other hand sends the full page content to Google, bypassing the crawling queue. 

So, let's sum this up. 

XML Sitemap

Indexing API

Added through Google Search Console or robots.txt Managed in a separate interface
The number of requests depends on the crawl budget The number of requests doesn't depend on the crawl budget
More than 200 requests per day Limit of 200 requests per day
You don't know when the URL will be crawled (queue) You know when the URL will be crawled (indexing API bypasses the queue)
Request data is not always available in the Google Search Console Request data is always available in the Google Search Console

 

Should You Use Indexing API or XML sitemap?

Based on the data we've mentioned above, there is no one-size-fits-all answer to this question. The decision to use the Indexing API along with the sitemap really depends on your specific needs.

While Indexing API might be more beneficial for large websites that post and update content frequently, small websites can benefit from it too. 

If you have a modest publishing frequency but have reasons for wanting real-time indexing, go for it. But note that Google can still discover your pages through regular crawling if you follow good SEO practices.

In any case, you shouldn't use Google Indexing API instead of the XML sitemap, since Google recommend submitting a sitemap as a "backup". 

Google Indexing API and Sitemap for Magento

Those of you who use Magento as an eCommerce platform probably know it has very flexible XML sitemap settings. It's the only means of getting your pages indexed if you don't have any external links to your website yet. 

Magento 2 XML Sitemap List

As for the Google Indexing API, you need to implement it yourself, through coding or ready-to-use tools. 

Thus, if you've decided to give indexing API a try, check out this guide on how to set up Google Indexing API for Magento and get into Google Index faster.