While access Admin REST API for product. Not able to get the meta fields in the REST API response.
Not able to see it even with /products/productid.json
we have properly given all the access scope in app configuration. but still not able to get meta fields. Please assist
If you make a graphql call instead of a REST call, do you see the meta description:
query GetProductMetaDescription {
product(id: "gid://shopify/Product/PRODUCT_ID") {
metafield(namespace: "global", key: "description_tag") {
value
}
}
}
eg:
1 Like
Using the GraphQL API to obtain product information, usually when seo.title is the same as product.title, seo.title will return null, and the same applies to the description
query getProduct ($id: ID!){
product(id: $id) {
title
description
seo{
title
description
}
}
}
query GetProductMetaDescription {
product(id: "gid://shopify/Product/10255866560817") {
seoTitle: metafield(namespace: "global", key: "title_tag") {
value
}
seoDescription: metafield(namespace: "global", key: "description_tag") {
value
}
}
}