--- title: pages - GraphQL Admin description: List of the shop's pages. api_version: 2025-10 api_name: admin type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/queries/pages md: https://shopify.dev/docs/api/admin-graphql/latest/queries/pages.md --- # pages query List of the shop's pages. ## PageConnection arguments [PageConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/PageConnection) * after [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * first [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * query [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * created\_at time * handle string - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` Filter by the date and time when the page was created. - Example: * `created_at:>'2020-10-21T23:39:20Z'` * `created_at:=1234` * `id:<=1234` Filter by the date and time when the page was published. - Example: * `published_at:>'2020-10-21T23:39:20Z'` * `published_at:'2020-10-21T23:39:20Z'` * `updated_at: { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }`, ); 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 PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }`, }); ``` #### Response ```json { "pages": { "edges": [ { "node": { "id": "gid://shopify/Page/602767277" } }, { "node": { "id": "gid://shopify/Page/905192165" } } ], "pageInfo": { "endCursor": "eyJsYXN0X2lkIjo5MDUxOTIxNjUsImxhc3RfdmFsdWUiOiI5MDUxOTIxNjUifQ==", "hasNextPage": false, "hasPreviousPage": false, "startCursor": "eyJsYXN0X2lkIjo2MDI3NjcyNzcsImxhc3RfdmFsdWUiOiI2MDI3NjcyNzcifQ==" } } } ``` ## Retrieves a list of pages [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20PageList%20%7B%0A%20%20pages\(first%3A%2010\)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20pageInfo%20%7B%0A%20%20%20%20%20%20endCursor%0A%20%20%20%20%20%20hasNextPage%0A%20%20%20%20%20%20hasPreviousPage%0A%20%20%20%20%20%20startCursor%0A%20%20%20%20%7D%0A%20%20%7D%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 PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }`, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` query PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }" }' ``` ##### 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 PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }`, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } }`, }); ``` ##### 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 PageList { pages(first: 10) { edges { node { id } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } } } QUERY response = client.query(query: query) ``` ## Response JSON ```json { "pages": { "edges": [ { "node": { "id": "gid://shopify/Page/602767277" } }, { "node": { "id": "gid://shopify/Page/905192165" } } ], "pageInfo": { "endCursor": "eyJsYXN0X2lkIjo5MDUxOTIxNjUsImxhc3RfdmFsdWUiOiI5MDUxOTIxNjUifQ==", "hasNextPage": false, "hasPreviousPage": false, "startCursor": "eyJsYXN0X2lkIjo2MDI3NjcyNzcsImxhc3RfdmFsdWUiOiI2MDI3NjcyNzcifQ==" } } } ```