Node.js – Bulk Submit URLs to Google Search Console

Node.js - Bulk Submit URLs to Google Search Console

Today in this article, we will learn how to perform Node.js – Bulk Submit URLs to Google Search Console.

Updated November 2026: a quota and supported-pages section, a 429 and duplicate-handling section, an FAQ, and a fix for the Java mislabel.

We will Node.js example to Bulk Submit URLs to Google Search Engine/Console for Indexing or Crawling purpose.

We already learned how to set up the service account, project, and other configurations so that we can leverage Google’s Indexing API before.

Today in this article, we will cover below aspects,

If you have not performed mandatory prerequisites, please follow the below article for more details,

You may find the need to submit the URLs due to many reasons like article update due to new data or upgrade or article enhancement, etc. In such scenarios, it is always difficult to perform indexing manually.

We shall be using below endpoints required for publishing the URLs,

Step1- Define the scope and endpoint

In your node js code please define the scopes and endpoint as below,

scopes as  "https://www.googleapis.com/auth/indexing";
url as "https://indexing.googleapis.com/v3/urlNotifications:publish";

Step2 – Include the service account access token

Please include the service account access token in your code. In the last article, we generated a service account token thecodebuzz-da659b2b8b0d.json which is the private key that you use to authenticate the service account using OAuth2.

For more details :

Step3 – Define the body of the request and invoke API

Defining service key

var request = require("request");
var { google } = require("googleapis");
var key = require("./service_account.json");

Define JWT client

const jwtClient = new google.auth.JWT(
  key.client_email,
  null,
  key.private_key,
  ["https://www.googleapis.com/auth/indexing"],
  null
);

Use jwtClient to call Post method

Below is a sample Node.js (JavaScript) code that can be used to send Bulk URLs to Indexing API

jwtClient.authorize(function(err, tokens) {
  if (err) {
    console.log(err);
    return;
  }
  let options = {
    url: "https://indexing.googleapis.com/v3/urlNotifications:publish",
    method: "POST",
    // Your options, which must include the Content-Type and auth headers
    headers: {
      "Content-Type": "application/json"
    },
    auth: { "bearer": tokens.access_token },
    // Define contents here. The structure of the content is described in the next step.
    json: {
      "url": "http://example.com/jobs/42",
      "type": "URL_UPDATED"
    }
  };
  request(options, function (error, response, body) {
    // Handle the response
    console.log(body);
  });
});

  • In the above code content is defined to contain the URL to be submitted.
  • We have to define request format ie. Content-Type as “application/json”

Once successfully submitted the URLs for indexing, you can see the status code as 200 for the request.

Node js for Bulk Submit URLs to Google indexing

References :

Please follow the below article for more details on prerequisites,

Do you have any comments or ideas or any better suggestions to share?

Please sound off your comments below.

Happy Coding !!



Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published (2026) best practices and guidelines for software design and development.



Indexing API quota, batching and what it officially supports

The Indexing API gives each Google Cloud project 200 publish requests per day by default, and Google only documents it for a narrow set of pages. Check both limits before you loop over a few thousand blog URLs.

How much quota do you get, and when does it reset?

Both URL_UPDATED and URL_DELETED notifications count toward the same 200-per-day pool. The quota resets at midnight Pacific Time, and a quota change can take up to 24 hours to apply.

Batching up to 100 URLs in one HTTP request saves connections, but each URL in the batch still uses one request from your quota. A batch of 100 leaves you with 100 requests for the day, not 199.

Note: Think of the quota as a daily allowance of postage stamps. Putting 100 letters in one mail bag saves you trips to the post office, but every letter still needs its own stamp.

Can you raise the 200 per day limit?

Don’t plan around it. One third-party guide reports that Google removed the quota-increase form from its docs in October 2026, but I found no second source, so treat it as unverified. Design your job to work within 200 a day.

Per-minute limits are listed as 180 getMetadata requests and 380 requests across all endpoints per project. An older cached copy of the same docs page showed a different all-endpoints number (600), so open the Quotas page for your project in the API Console and read your actual values.

What pages is the Indexing API meant for?

Google documents the API only for pages with JobPosting structured data, or BroadcastEvent embedded in a VideoObject. Using it for ordinary articles, as the examples above do, is outside the documented use. Requests may return 200, but indexing isn’t guaranteed.

For regular pages, submit a sitemap instead. The Search Console Sitemaps API has a sitemaps.submit method that does this. Don’t reach for the URL Inspection API as a substitute, because it only reads a URL’s index status and can’t request indexing.

Why do publish calls get rejected even with a valid token?

The usual cause is missing property access. Add the service account’s client_email address as an owner of the property in Search Console. Without ownership, publish calls are rejected, even though the token itself is valid.

  1. Copy the address: take client_email from your service account JSON file.
  2. Open the property: go to Settings, then Users and permissions, in Search Console.
  3. Add the user: paste the address and set the permission to Owner.

Frequently asked questions

Can the Google Indexing API be used for normal blog pages?

Officially, the API supports only pages with JobPosting structured data, or BroadcastEvent embedded in a VideoObject. Calls on other pages may return 200, but that is outside the documented use, and Google doesn’t promise those pages will be indexed. For ordinary blog posts, submit an XML sitemap through Search Console instead.

How many URLs can I submit per day with the Google Indexing API?

The default is 200 publish requests per day per Cloud project. URL_UPDATED and URL_DELETED calls share that same pool. Batching doesn’t raise the limit, because each URL in a batch still uses one request from your quota. The quota resets at midnight Pacific Time, and the per-minute limits can differ from what older posts quote, so check the quota page for your project in the API Console for the exact figures.

Does the Search Console URL Inspection API request indexing?

No. It only reads a URL’s index status, and it can’t submit anything for crawling. Its quota is enforced per Search Console property at 2,000 queries per day and 600 per minute. Use it to filter out URLs that are already indexed before you spend any of your 200 daily Indexing API requests.

Why do my publish calls fail even though my service account key is valid?

The most common cause is that the service account’s client_email hasn’t been added as an owner of the property in Search Console. Without that, publish calls are rejected even when authentication succeeds. Also check for 429 responses, which mean you’ve hit a quota. Finally, run the script on a supported Node.js version (22, 24 or 26), since Node.js 20 reached end-of-life on 30 April 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *