Back to blog

Google Indexing Script

Get indexed in a few hours. No tricks, no hacks, just a simple open source script. Run the script and get your pages on Google.

Google Indexing Script

There are many different ways to get your pages indexed by Google. If your site has enough authority, a good sitemap and internal links pointing to the new pages, Google will eventually find and index them.

However with the influx of new pages being published every day, especially with the rise of AI-generated content, Google seems to be taking longer to index new pages.

Google Search Console (GSC) has a feature that allows you to request indexing for a specific page. This is useful when you publish a new page and want to get it indexed as soon as possible.

Manually requesting indexing takes around 1 minute, so submitting a handful of pages is not that time-consuming.

Here's how you can index your pages using GSC:

  1. Open Google Search Console
  2. Enter the URL you want to request index
  3. Wait a bit and then click on Request Indexing
  4. Wait between 24-48 hours to see it on Google
  5. It's that simple! 🎉
Requesting manual indexing on Google

What about Bulk Indexing?

I recently wanted to index 26 new pages and I really didn't want to do it manually on GSC. It wouldn't take that long, but next week I might have a few dozen more pages to index.

Manually requesting indexing is not a scalable solution, so I started looking for alternatives.

If you work in the SEO space you must have seen a large number of SaaS platforms that can index your page in hours. TagParrot is my favorite one, but there are also other Website Indexing Tools that you can check out if you prefer a less technical solution.

Most of these platforms use the Indexing API, which is a free API documented and officially supported by Google.

Ok, so what's the catch?

First you have to remember that Indexing != Ranking. Just because your page is indexed doesn't mean you'll get any traffic from Google. Using the Indexing API is not really giving you an unfair advantage, you still have to put in the work to rank your pages.

But anyway, here's an important quote from the official documentation:

Currently, the Indexing API can only be used to crawl pages with either JobPosting or BroadcastEvent embedded in a VideoObject. For websites with many short-lived pages like job postings or livestream videos, the Indexing API keeps content fresh in search results because it allows updates to be pushed individually.

In short, this API is meant to be used by Job Boards and Events platforms, supposedly because of the high volume of pages they have to add/remove due to the nature of their business.

But as reported by hundreds of site owners on Twitter, myself included, it works for ANY page, regardless of being a Job Post or Event page. It doesn't even need to have a Schema markup on it.

It's unclear if that's a bug or if the documentation is outdated, but the fact is that it works, and it works really well! Will it work next month or next year? No one knows, but for now, it's a great solution and as far as I know, it has been working for at least since 2022.

NOTE: I do not recommend using this API to index AI-generated, thin-content or spammy pages. Google is smart and will eventually catch up with you. Use it responsibly.

Here's an example of one Dany indexing about ~100 pages in less than 3 days. You can see how the number of indexed pages increased over time naturally, but then there's a spike when the API was used.

Report on recent indexed pages

Google Indexing Script

I decided to pack everything I learned into a simple script that you can use to index an entire site. The script is free and open source, so you can also modify it to fit your needs. It's available on my GitHub at goenning/google-indexing-script.

You can find the instructions on how to use it on the README. It's pretty straightforward, especially if you're familiar with Node.js and JavaScript.

Here's a quick summary of what the script does:

Find all site pages using sitemaps.
For each page, check if it's indexed or if already requested previously.
  ✅ If yes, skip it. We don't want to spam Google.
  ❌ If not, request indexing.

Here's the script output after executing it on one of my sites 82 pages were found, 79 were indexed, 1 did not need to be indexed and 2 were requested to be indexed.

Example of script output

As mentioned before, if you prefer a hands-free and less technical solution, you can use a SaaS platform like TagParrot.

That's it! 🥳

✨ Interested in simplifying your SEO analytics workflow? Try SEO Gets for free.
Try SEO Gets Free