Product SEO Information

International Enhancements for Multi-Storefront

This feature is currently available for Enterprise stores and Partner Sandboxes. If the feature is not working as expected, please contact technical support, as the feature likely needs to be enabled for the individual store. To become an enterprise customer, contact your BigCommerce Customer Service Manager or our support team.

Using the Catalog features of the Admin API, you can set and query product SEO information, for example, page title and meta description.

You can perform the following:

For a full schema, see the GraphQL Admin API reference.

Input fields

Setting or removing information requires that you specify ID fields in the input. For more information on how to specify ID fields, see Input fields.

Set product SEO information at the global level

The following example sets global product SEO information for the store, from which channels inherit by default. You can set the title and meta description for the product page.

Example mutation: Set product SEO information globally
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation (
7 $input: SetProductSeoInformationInput!
8) {
9 product {
10 setProductSeoInformation(input: $input) {
11 product {
12 id
13 seoInformation {
14 pageTitle
15 metaDescription
16 }
17 }
18 }
19 }
20}
GraphQL variables
1{
2 "input": {
3 "productId": "bc/store/product/111",
4 "data": {
5 "pageTitle": "Global page title",
6 "metaDescription": "Global meta description"
7 }
8 }
9}

Set product SEO information for a locale

The following example sets product SEO information for the specified storefront channel and locale within the channel. These will override global store information. You can set the title and meta description for the product page.

Example mutation: Set product SEO information for a locale
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation (
7 $input: SetProductSeoInformationInput!
8) {
9 product {
10 setProductSeoInformation(input: $input) {
11 product {
12 id
13 overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "fr" }) {
14 seoInformation {
15 pageTitle
16 metaDescription
17 }
18 }
19 }
20 }
21 }
22}
GraphQL variables
1{
2 "input": {
3 "productId": "bc/store/product/111",
4 "localeContext": {
5 "channelId": "bc/store/channel/2",
6 "locale": "fr"
7 },
8 "data": {
9 "pageTitle": "Page title override FR",
10 "metaDescription": "Meta description override FR"
11 }
12 }
13}

Remove product SEO information for a locale

The following example removes product SEO information for the specified channel and locale.

Omitting the overridesToRemove field from the input removes all overrides for product SEO information from the locale.

Example mutation: Remove product SEO information for a locale
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6mutation (
7 $input: RemoveProductSeoInformationOverridesInput!
8) {
9 product {
10 removeProductSeoInformationOverrides(input: $input) {
11 product {
12 id
13 overridesForLocale (localeContext: { channelId: "bc/store/channel/2", locale: "fr" }) {
14 seoInformation {
15 pageTitle
16 metaDescription
17 }
18 }
19 }
20 }
21 }
22}
GraphQL variables
1{
2 "input": {
3 "productId": "bc/store/product/111",
4 "localeContext": {
5 "channelId": "bc/store/channel/2",
6 "locale": "fr"
7 },
8 "overridesToRemove": ["PRODUCT_PAGE_TITLE_FIELD"]
9 }
10}

Query product SEO information

The following example retrieves product SEO information. You can retrieve global information for the store and overrides for the specified channel and locale.

Example query: Get product SEO information
1POST https://api.bigcommerce.com/stores/{{STORE_HASH}}/graphql
2X-Auth-Token: {{ACCESS_TOKEN}}
3Content-Type: application/json
4Accept: application/json
5
6query {
7 store {
8 product (id: "bc/store/product/111") {
9 id
10 seoInformation {
11 pageTitle
12 metaDescription
13 }
14 overridesForLocale(localeContext: { channelId: "bc/store/channel/2", locale: "fr" }) {
15 seoInformation {
16 pageTitle
17 metaDescription
18 }
19 }
20 }
21 }
22}
  • The id field contains the product’s global ID that you can retrieve from the Get all products endpoint. For example, a product with a global ID of 111 will have an id of "bc/store/product/111".
  • The channelId field contains the channel’s global ID that you can retrieve from the Get all channels endpoint. For example, a channel with a global ID of 2 will have a channelId of "bc/store/channel/2".