1.0.4 • Published 1 year ago
@jaliti/google-indexing v1.0.4
Google Indexing API
Index, delete, and request recrawls from Google servers.
Prerequisites
- Enable the indexing API from Google Developer Console
 - Create a new service account
 - Verify ownership in Google Search Console
 
Usage
import { Indexing } from "@jaliti/google-indexing";
const gi = new Indexing();
(async () => {
  // Provide service account email and private key
  await gi.configure({ email, privateKey });
  // Send requests
  const resp = await gi.publishURL(
    "https://example.com/my-new-page",
    "URL_UPDATED"
  );
  console.log(resp);
})();