GBP Node.js SDKThe Enterprise standard.
Manage locations, menus, attributes, media, reviews, verifications, and quotas with zero-config OAuth, auto-pagination, and strict type safety.
Manage locations, menus, attributes, media, reviews, verifications, and quotas with zero-config OAuth, auto-pagination, and strict type safety.

npm install @vitabletech/gbp-sdkManage accounts, fetch locations, update business hours, and handle special hours effortlessly across multiple locations.
Fetch daily time series, desktop & mobile search/maps impressions, customer search keywords, and breakdowns via Business Profile Performance API v1.
Full support for FoodMenus and Service APIs. Build strict TypeScript menus with dietary labels, allergens, and nutritional facts.
Reply to customer reviews, fetch metrics, and publish local posts, offers, or event updates directly to Google.
Patch specific location attributes safely. Handle complex amenities like accessibility, dining options, and service flags.
Trigger PIN/SMS verifications programmatically and associate your unverified locations with official global Chains.
Upload photos and videos directly to Googleβs v4 endpoints and manage category tags seamlessly.
Instead of struggling with raw Google APIs, REST endpoints, and manual token refreshing, this SDK provides an enterprise-ready DX:
Zero-config OAuth 2.0 flow with intelligent token refreshing and pluggable file/memory storage. Never write a token refresh loop again.
Stop writing boilerplate loops. The SDK automatically traverses nextPageToken to fetch thousands of records across pages instantly.
100% typed request/response bodies. Catch errors at compile time when writing food menus, attributes, or verification options.
Built-in exponential backoff and automatic retry logic for 429 and 5xx errors, ensuring your enterprise workflows don't crash.
We abstract away Google's fragmented APIs into a single unified client supporting locations, verifications, media, and more.
Install via your favorite package manager.
npm install @vitabletech/gbp-sdkyarn add @vitabletech/gbp-sdkpnpm add @vitabletech/gbp-sdkInitialize the client with your Google Cloud credentials.
import { GBPClient } from '@vitabletech/gbp-sdk';
const client = new GBPClient({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
redirectUri: 'http://localhost:3000/oauth/callback',
refreshToken: process.env.GOOGLE_REFRESH_TOKEN, // Optional
});You're ready! Start calling any GBP service with automatic token management.
// Fetch all locations for a specific account (auto-paginated)
const locations = await client.locations.listAll('accounts/1234567890');
// Update a location's attributes
await client.attributes.patchAttributes(locations[0].name, {
attributes: [{ name: 'has_delivery', valueType: 'BOOL', values: [true] }],
});π Performance API Expansion & v1.3.0 Release!
Version 1.3.0 introduces first-class native support for Google's Business Profile Performance API (v1), empowering applications with granular analytics, daily time series, keyword insights, and seamless auto-pagination.
MetricsService): locations.getDailyMetricsTimeSeries for precise daily counts (calls, website clicks, direction requests, bookings, food orders, impressions).locations.fetchMultiDailyMetricsTimeSeries with support for dailySubEntityType breakdowns (day of week, time of day) and flexible camelCase (startDate/endDate) or snake_case dates.locations.searchkeywords.impressions.monthly.list to discover exactly what search terms users typed to discover your business.listAllSearchKeywordsImpressionsMonthly (automatic traversal) and listSearchKeywordsImpressionsMonthlyPaginator (cursor-based traversal).client.locations.* without separate service instantiations.client.quotas.getPerformance(projectId) helper to check and monitor Performance API quotas.mybusinessverifications.googleapis.com).serviceusage.googleapis.com).patchAttributes vs updateLocationAttributes to choose the best method.MediaService now fully supports Google's v4 endpoints and allows category updates via patch().businessprofileperformance.googleapis.com added.