<br />

> [!NOTE]
> **Note:** Attributes available to listings differ based on the category and country. They are dynamic and can change at any time.

Attributes allow businesses to include additional information, such as
accessibility options and amenities.

> [!NOTE]
> **Note:** To add or modify place action links, use the [Place Actions API](https://developers.google.com/my-business/reference/placeactions/rest), and for attributes specific to lodging, use the [Lodging API](https://developers.google.com/my-business/reference/lodging/rest).

## List available attributes (metadata)

To discover which attributes are supported for a business category and
country, request
[`attributes.list`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/attributes/list).
Attributes are dynamic and should be retrieved often. See the example shown in
the following section.

> [!NOTE]
> **Note:** `attributes.list` returns metadata describing the attributes that **can** be applied to a location along with their supported choices (`valueMetadata`). It does **not** return the attribute values configured on a specific listing. To view the values set on a listing, see [Get attributes for a listing](https://developers.google.com/my-business/content/attributes#get-attributes).

### Request

To list available attributes for a particular category, region code, and
language code:
HTTP

```
GET https://mybusinessbusinessinformation.googleapis.com/v1/attributes?regionCode=US&languageCode=EN&categoryName=gcid:restaurant
```

To list available attributes for a particular listing using its location ID:
HTTP

```
GET https://mybusinessbusinessinformation.googleapis.com/v1/attributes?parent=locations/{locationId}
```

### Response

The following partial response returns attribute definitions with various
[`AttributeValueType`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/AttributeValueType)
values. Note that `valueMetadata` describes the allowable values and their
display names, not the location's selected values.

```
{
  "attributes": [
    {
      "attributeId": "has_live_music",
      "valueType": "BOOL",
      "displayName": "Live music",
      "groupDisplayName": "Highlights",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Live music"
        }
      ],
      "displayStrings": {
        "uiText": "Live music",
        "standaloneText": "Has live music",
        "negativeText": "No live music"
      }
    },
    {
      "attributeId": "has_wheelchair_accessible_entrance",
      "valueType": "BOOL",
      "displayName": "Wheelchair accessible entrance",
      "groupDisplayName": "Accessibility",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Wheelchair accessible entrance"
        },
        {
          "value": false,
          "displayName": "No wheelchair accessible entrance"
        }
      ],
      "displayStrings": {
        "uiText": "Wheelchair accessible entrance",
        "standaloneText": "Has wheelchair accessible entrance",
        "negativeText": "No wheelchair accessible entrance"
      }
    },
    {
      "attributeId": "has_braille_menu",
      "valueType": "BOOL",
      "displayName": "Braille menu",
      "groupDisplayName": "Offerings",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Braille menu"
        }
      ],
      "displayStrings": {
        "uiText": "Braille menu",
        "standaloneText": "Has braille menu",
        "negativeText": "No braille menu"
      }
    },
    {
      "attributeId": "has_no_contact_delivery",
      "valueType": "BOOL",
      "displayName": "No-contact delivery",
      "groupDisplayName": "Offerings",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "No-contact delivery"
        }
      ],
      "displayStrings": {
        "uiText": "No-contact delivery",
        "standaloneText": "Has no-contact delivery",
        "negativeText": "No no-contact delivery"
      }
    },
    {
      "attributeId": "welcomes_lgbtq",
      "valueType": "BOOL",
      "displayName": "LGBTQ friendly",
      "groupDisplayName": "Planning",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "LGBTQ friendly"
        }
      ],
      "displayStrings": {
        "uiText": "LGBTQ friendly",
        "standaloneText": "LGBTQ friendly",
        "negativeText": "Not showing LGBT friendly"
      }
    },
    {
      "attributeId": "wi_fi",
      "valueType": "ENUM",
      "displayName": "Wi-Fi",
      "groupDisplayName": "Amenities",
      "valueMetadata": [
        {
          "value": "free_wi_fi",
          "displayName": "Free"
        },
        {
          "value": "paid_wi_fi",
          "displayName": "Paid"
        }
      ],
      "displayStrings": {
        "uiText": "Wi-Fi",
        "standaloneText": "Has Wi-Fi",
        "negativeText": "No Wi-Fi"
      }
    },
    {
      "attributeId": "pay_credit_card_types_accepted",
      "valueType": "REPEATED_ENUM",
      "displayName": "Credit cards",
      "groupDisplayName": "Payments",
      "isRepeatable": true,
      "valueMetadata": [
        {
          "value": "american_express",
          "displayName": "American Express"
        },
        {
          "value": "china_union_pay",
          "displayName": "China Union Pay"
        },
        {
          "value": "diners_club",
          "displayName": "Diners Club"
        },
        {
          "value": "discover",
          "displayName": "Discover"
        },
        {
          "value": "jcb",
          "displayName": "JCB"
        },
        {
          "value": "mastercard",
          "displayName": "MasterCard"
        },
        {
          "value": "visa",
          "displayName": "VISA"
        }
      ],
      "displayStrings": {
        "uiText": "Credit cards",
        "standaloneText": "Credit cards accepted",
        "negativeText": "Credit cards not accepted"
      }
    }
  ]
}
```

## Get attributes for a listing

To retrieve the attributes and values configured for a specific
location, use
[`locations.getAttributes`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/locations/getAttributes).

### Merchant-managed attributes

To get attributes as configured by the merchant:
HTTP

```
GET https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}/attributes
```

The response returns the actual values set for the location:

```
{
  "name": "locations/{locationId}/attributes",
  "attributes": [
    {
      "name": "attributes/has_wheelchair_accessible_seating",
      "valueType": "BOOL",
      "values": [
        false
      ]
    },
    {
      "name": "attributes/wi_fi",
      "valueType": "ENUM",
      "values": [
        "free_wi_fi"
      ]
    }
  ]
}
```

### Google-updated attributes (live view)

To retrieve attributes as they appear live on Google Search and Maps (which may
include Google updates or user-generated content), use
[`locations.attributes.getGoogleUpdated`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/locations.attributes/getGoogleUpdated):
HTTP

```
GET https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}/attributes:getGoogleUpdated
```

### Extended attributes with edit status (v1alpha)

To retrieve both the merchant-provided attributes and the consumer-facing
attributes along with per-attribute edit lifecycle stages (such as
`EDIT_LIFECYCLE_STAGE_PENDING` or `EDIT_LIFECYCLE_STAGE_REJECTED`), edit source
(`SOURCE_API` or `SOURCE_UI`), and policy violation reasons in a single call,
use
[`locations.attributes.getExtended`](https://developers.google.com/my-business/reference/businessinformation/rest/v1alpha/locations.attributes/getExtended)
in `v1alpha`:
HTTP

```
GET https://mybusinessbusinessinformation.googleapis.com/v1alpha/locations/{locationId}/attributes:getExtended
```

For full response examples and details on interpreting attribute edit status and
policy violations, see
[Check edit status for locations and attributes](https://developers.google.com/my-business/content/edit-status).

## Set attributes for a listing

> [!NOTE]
> **Note:** To add a menu URL to a listing, first confirm that a listing has the following attribute supported: `attributes/url_menu` using [`attributes.list`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/attributes/list), and then set the attribute for the listing using the following method.

To set attributes with
[`locations.updateAttributes`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/locations/updateAttributes),
set the `attributeMask` parameter with the attributes you want to update.

The following example sets the accepted credit card types and delivery option
attributes for a listing.

> [!IMPORTANT]
> **Important:** Only use attributes supported in [`attributes.list`](https://developers.google.com/my-business/reference/businessinformation/rest/v1/attributes/list).

HTTP

```
PATCH
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}/attributes?attributeMask=pay_credit_card_types_accepted,has_no_contact_delivery
{
  "name": "locations/{locationId}/attributes",
  "attributes": [
    {
      "name": "has_no_contact_delivery",
      "values": [ true ]
    },
    {
      "name": "pay_credit_card_types_accepted",
      "repeatedEnumValue": {
        "setValues": [
          "american_express",
          "visa"
        ]
      }
    }
  ]
}
```