googleapis: Google's Node.js client for API access, in maintenance mode
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
At a glance
- What is it?
- The googleapis package generates a typed Node.js client for every Google API from discovery documents. It handles OAuth2, API keys and service accounts, but Google states the library is complete and will not receive new features.
- Who is it for?
- Adopt googleapis if you call a Google API that has no dedicated @google-cloud package, or if you need OAuth2 on behalf of end users. Do not adopt it for Cloud Storage, Pub/Sub or Datastore, where the README points you to the purpose-built @google-cloud clients instead.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What googleapis solves, and for whom
Google publishes hundreds of HTTP APIs, each with its own discovery document describing methods, parameters and schemas. Calling one by hand means writing URL builders, serialising request bodies, refreshing tokens and parsing errors for every service you touch. The googleapis package turns those discovery documents into a single Node.js client with a method for each endpoint. The README describes it as a "Node.js client library for using Google APIs" with authorization and authentication support for OAuth 2.0, API keys and JWT tokens.
The audience is Node.js developers integrating a Google product that is not covered by a dedicated Cloud client. The README is explicit about the split: for Google Cloud Platform APIs such as Datastore, Cloud Storage or Pub/Sub it advises using the @google-cloud libraries, which are "purpose-built, idiomatic Node.js clients designed for specific Google Cloud Platform services". That leaves the rest of the Google API surface, Blogger, Docs, Drive, Gmail, Sheets, YouTube and the many versioned APIs under src/apis, as the territory this package is built for.
One design consequence is worth stating plainly. The README says the API endpoints are "automatically generated, so if the API is not in the list, it is currently not supported by this API client library". Support is not a roadmap decision; it follows from whether a discovery document exists.
How the generated client is structured
The repository layout makes the mechanism visible. A generator directory under src/ produces the per-API code, the npm scripts include a generate target that runs the generator with a raised heap limit, and the generated output lands under src/apis/api-name/version. The README points developers at documentation "embedded in the source code comments (under src/apis/api-name/version)", which confirms that the shipped code is the reference for each API version.
At runtime you import the package, name the API and version, and supply an auth object. The returned object mirrors the API's resource tree, so blogger.blogs.get maps to the blogs.get method of the Blogger v3 API. Every method accepts a params object and, in the README's examples, can be consumed with a Node-style callback, a promise, or async/await. The response object carries a data property holding the parsed body.
Authentication is pluggable rather than baked into each method. The README lists four routes: OAuth2 for calls on behalf of a user, API keys for a limited subset of services, application default credentials that resolve through the Google Cloud SDK locally or the GCE metadata server in Google Cloud, and service account credentials for server-to-server calls. The README also documents setting auth globally or per service, which matters when one process talks to several APIs under different identities. There is a real constraint hidden in that list: the README warns that some services support all authentication methods while others support only one or two, so the choice is dictated by the target API, not by preference.
Installing googleapis and making a first call
The package is distributed on npm. From package.json, the current version is 181.0.0 and the engines field requires Node.js >=22.0.0, so check your runtime before anything else. The README gives this install command:
npm install googleapisThe README also notes an alternative for startup time: install a single API as its own scoped package, for example `npm install @googleapis/docs`, which pulls in only that API's generated code instead of the full set. The README says submodules are published for APIs that are not in the google-cloud-node client list, and that a search for `scope:@googleapis` on npm lists what is available.
The README's first example creates a Blogger v3 client with an API key and fetches one blog. It is reproduced here as the README gives it:
const {google} = require('googleapis');
const blogger = google.blogger({
version: 'v3',
auth: 'YOUR API KEY'
});
const params = {
blogId: '3213900'
};
blogger.blogs.get(params, (err, res) => {
if (err) {
console.error(err);
throw err;
}
console.log(`The blog url is ${res.data.url}`);
});On success the callback receives a response whose data.url is the blog address. The README shows the same call written as a promise and as async/await; the async form is the one most new code should copy, since it keeps error handling in a try/catch rather than in a callback branch.
For service-account authentication the README's submodule example is the clearer starting point. It constructs a GoogleAuth instance from a key file, requests a scope, resolves a client, and then calls the API. Note that this sample uses the scoped @googleapis/docs package, not the monolithic import:
const docs = require('@googleapis/docs')
const auth = new docs.auth.GoogleAuth({
keyFilename: 'PATH_TO_SERVICE_ACCOUNT_KEY.json',
scopes: ['https://www.googleapis.com/auth/documents']
});
const authClient = await auth.getClient();
const client = await docs.docs({
version: 'v1',
auth: authClient
});After that, client.documents.create with a requestBody containing a title returns the created document in the response data. The README's samples directory holds runnable versions of these patterns for analytics, drive, gmail, sheets and others, and the README advises looking there first when working out how to call a given API.
Where googleapis is the wrong tool
The clearest boundary is Google Cloud Platform. The README does not merely prefer the @google-cloud packages for Datastore, Cloud Storage and Pub/Sub; it recommends installing individual API packages such as @google-cloud/storage and points to the Cloud Node.js reference for the full list. Those clients expose service-specific ergonomics that a generated REST wrapper cannot. If you are writing to a bucket, the generated storage surface is the long way round.
The second boundary is feature velocity. The README states that these libraries are "considered complete and are in maintenance mode", that critical bugs and security issues will be addressed, and that no new features will be added. That is a deliberate posture, not neglect: the repository's last push was on 2026-09-16, and releases continue, with youtubereporting-v11.0.0, youtubeanalytics-v11.0.0 and youtube-v39.0.0 all published on 2026-09-14. Those version bumps track upstream API changes. They are not new client capabilities. Anyone choosing this library should expect the surface to stay where it is.
The third boundary is bundle and startup cost. Importing googleapis pulls in generated code for every supported API. The README offers the scoped @googleapis submodules as the mitigation, and that is a real answer, but it means the import path in your code differs from the monolithic examples. If you are deploying to a size-constrained environment, decide which import style you want before writing call sites.
Finally, authentication is not uniform. Because the README states that some services support only one or two of the four methods, a pattern that works against one API may be unavailable on the next. An API key is described as typically less secure and available only on a small subset of services with limited scopes, so it is not a general-purpose fallback.
How it compares with google-cloud-node
The obvious alternative is google-cloud-node, the set of @google-cloud packages. The difference is generation versus hand-writing. googleapis derives its clients from discovery documents, so coverage is broad and mechanical: every API with a published discovery document gets a client, and the method names follow the API's own resource tree. google-cloud-node is organised by product, with each package written for one service and its idioms.
The README states the trade-off from Google's side. For Cloud APIs it recommends the purpose-built clients and notes that google-cloud-node is "under active development", while the googleapis libraries are complete and in maintenance mode. That sentence is the whole decision in miniature. If your target is a Cloud service, you get a library that is still changing shape. If your target is anything else in the Google API catalogue, you get a generated client that is stable by policy and will not gain features.
There is a practical overlap to watch. The README says submodules are published for APIs that are not in the google-cloud-node client list, which means a given Google service may have both a @googleapis submodule and a @google-cloud package. Picking the Cloud package when one exists matches the README's guidance; picking the submodule is the route when it does not.
Licence, versioning and the cost of upgrades
The package is licensed under Apache-2.0, per both package.json and the LICENSE file at the repository root. That is a permissive licence with an explicit patent grant, and it imposes no copyleft obligation on your application. This is a description of the licence text, not legal advice; if your organisation has licence review requirements, the file to read is LICENSE.
Upgrade cost is shaped by the versioning scheme. The package version is 181.0.0, and the recent releases show per-API packages moving in lockstep, with youtubereporting, youtubeanalytics and youtube all landing on v11.0.0 or v39.0.0 on the same day. Those major numbers track the upstream API versions rather than client redesigns, so a major bump on a submodule usually means the API surface changed underneath you. The practical consequence is that you should read the changelog for the specific API you call, not just the top-level googleapis version.
The repository carries the infrastructure you would expect from a Google-maintained project: a CHANGELOG.md, release-please configuration for automated releases, a renovate.json for dependency updates, and a system-test directory. None of that changes the maintenance-mode statement. It means the existing surface is kept working, not extended.
Editorial conclusion
Adopt googleapis if you call a Google API that has no dedicated @google-cloud package, or if you need OAuth2 on behalf of end users. Do not adopt it for Cloud Storage, Pub/Sub or Datastore, where the README points you to the purpose-built @google-cloud clients instead. Before you commit, verify that your API appears in the generated client list, check that your runtime is Node.js >=22.0.0 per package.json, and confirm which authentication method your target API actually accepts, since the README notes some services support only one or two. The library is officially supported but in maintenance mode, so treat it as a stable surface rather than one that will grow.
Frequently asked questions
What is the googleapis Node.js client?
It is Google's officially supported Node.js client library for accessing Google APIs, with support for authorization and authentication using OAuth 2.0, API keys and JWT tokens. The API endpoints are automatically generated, so an API that is not in the list is not supported by the client.
How do I install googleapis?
The README gives the command npm install googleapis. If you want to reduce startup times, the README says you can instead install a single API as a submodule, for example npm install @googleapis/docs, and that searching npm for scope:@googleapis lists the available submodules.
Which authentication methods does googleapis support?
The README lists OAuth2 for calls on behalf of a user, API keys for a limited subset of services, application default credentials that resolve through the Google Cloud SDK or the GCE metadata server, and service account credentials for server-to-server calls. It notes that some services support all of these while others support only one or two.
Does googleapis work with Google Cloud Platform services like Cloud Storage?
The README advises using the @google-cloud client libraries for Google Cloud Platform APIs such as Datastore, Cloud Storage and Pub/Sub, describing them as purpose-built, idiomatic Node.js clients for specific services. It recommends installing individual packages such as @google-cloud/storage.
Which Node.js version does googleapis require?
The engines field in package.json requires Node.js >=22.0.0. The README adds that the library supports the maintenance LTS, active LTS and current release of Node.js, and links to the Node.js release schedule.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/googleapis-google-api-nodejs-client)