Skip to main content
shoppy.pages.get(idOrHandle)
Fetches a single page by handle or Shopify GID.

Parameters

ParamTypeRequiredDescription
idOrHandlestringYesPage handle or Shopify GID

Returns

ShopifyPage | null

Examples

Get by handle

const page = await shoppy.pages.get('about-us')

if (page) {
    console.log(page.title)
}

Get by Shopify GID

const page = await shoppy.pages.get(
    'gid://shopify/Page/123456789'
)

With field selection

const page = await shoppy.pages
    .select(['title', 'body', 'seo'])
    .get('contact')

Handle not found

const page = await shoppy.pages.get('non-existent')

if (!page) {
    console.log('Page not found')
}