--- title: page - GraphQL Admin description: Returns a `Page` resource by ID. api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/queries/page md: https://shopify.dev/docs/api/admin-graphql/unstable/queries/page.md --- # page query Returns a `Page` resource by ID. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required The ID of the `Page` to return. *** ## Possible returns * Page [Page](https://shopify.dev/docs/api/admin-graphql/unstable/objects/Page) A page on the Online Store. *** ## Examples * ### Retrieves a single page by its ID #### Query ```graphql query PageShow($id: ID!) { page(id: $id) { id title handle } } ``` #### Variables ```json { "id": "gid://shopify/Page/602767277" } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query PageShow($id: ID!) { page(id: $id) { id title handle } }", "variables": { "id": "gid://shopify/Page/602767277" } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query PageShow($id: ID!) { page(id: $id) { id title handle } }`, { variables: { "id": "gid://shopify/Page/602767277" }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query PageShow($id: ID!) { page(id: $id) { id title handle } } QUERY variables = { "id": "gid://shopify/Page/602767277" } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `query PageShow($id: ID!) { page(id: $id) { id title handle } }`, "variables": { "id": "gid://shopify/Page/602767277" }, }, }); ``` #### Response ```json { "page": { "id": "gid://shopify/Page/602767277", "title": "Sample Page", "handle": "samplepage" } } ``` ## Retrieves a single page by its ID [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20PageShow\(%24id%3A%20ID!\)%20%7B%0A%20%20page\(id%3A%20%24id\)%20%7B%0A%20%20%20%20id%0A%20%20%20%20title%0A%20%20%20%20handle%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22id%22%3A%20%22gid%3A%2F%2Fshopify%2FPage%2F602767277%22%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query PageShow($id: ID!) { page(id: $id) { id title handle } }`, { variables: { "id": "gid://shopify/Page/602767277" }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` query PageShow($id: ID!) { page(id: $id) { id title handle } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query PageShow($id: ID!) { page(id: $id) { id title handle } }", "variables": { "id": "gid://shopify/Page/602767277" } }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query PageShow($id: ID!) { page(id: $id) { id title handle } }`, { variables: { "id": "gid://shopify/Page/602767277" }, }, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `query PageShow($id: ID!) { page(id: $id) { id title handle } }`, "variables": { "id": "gid://shopify/Page/602767277" }, }, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query PageShow($id: ID!) { page(id: $id) { id title handle } } QUERY variables = { "id": "gid://shopify/Page/602767277" } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "id": "gid://shopify/Page/602767277" } ``` ## Response JSON ```json { "page": { "id": "gid://shopify/Page/602767277", "title": "Sample Page", "handle": "samplepage" } } ```