Get attribute metadata
Returns metadata about which Google Business Profile attributes are available for a location or business category. Use this endpoint to discover valid attribute names, value types, and allowed enum values before reading or writing via gmb-attributes.
Two mutually exclusive query modes:
Location mode: pass locationId (or rely on the account's stored selectedLocationId).
Google returns attributes valid for that specific location.
Category mode: pass categoryName (must start with categories/) and regionCode.
Google returns attributes valid for that category across the given region.
languageCode is optional in category mode.
Both modes support pageSize and pageToken for pagination.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Query Parameters
GBP location ID (e.g. "6257659026299438786"). If omitted, uses the account's stored selectedLocationId. Mutually exclusive with categoryName.
Category resource name, must start with "categories/" (e.g. "categories/gcid:plumber"). Required together with regionCode. Mutually exclusive with locationId.
BCP-47 region code (e.g. "US", "ES"). Required when categoryName is provided.
BCP-47 language code for display names (e.g. "en", "es"). Optional when categoryName is provided. Omitted from the Google call when not supplied.
Maximum number of attribute metadata items to return. Google defaults to 200.
1 <= value <= 200Pagination token from a previous response's nextPageToken field.
Response Body
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.gmbattributes.getGmbAttributeMetadata({ path: { accountId: 'account_abc123', },});console.log(data);{
"success": true,
"accountId": "64f1a2b3c4d5e6f7a8b9c0d1",
"locationId": "6257659026299438786",
"attributeMetadata": [
{
"parent": "attributes/has_delivery",
"valueType": "BOOL",
"displayName": "Delivery",
"groupDisplayName": "Service options"
},
{
"parent": "attributes/pay_credit_card_types_accepted",
"valueType": "REPEATED_ENUM",
"displayName": "Credit cards accepted",
"valueMetadata": [
{
"value": "visa",
"displayName": "Visa"
},
{
"value": "mastercard",
"displayName": "Mastercard"
}
]
}
]
}{
"error": "string",
"details": {}
}{
"error": "string",
"details": {}
}{
"error": "string",
"details": {}
}