# pages Search and paginate through pages ## Authentication > **Public Access**: Accessible with the public API key ## Query Structure ```graphql { pages( first: Int after: String last: Int before: String query: String sortKey: PageSortKey reverse: Boolean ) { # PageConnection fields } } ``` ## Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | first | Int | No | Returns the first n elements. | | after | String | No | Returns elements after cursor. | | last | Int | No | Returns the last n elements. | | before | String | No | Returns elements before cursor. | | query | String | No | Search query string to filter pages by title or content. | | sortKey | [PageSortKey](/reference/storefront/v1/objects/page-sort-key) | No | The key to sort pages by. | | reverse | Boolean | No | Reverse the order of the underlying list. | ## Return Type [PageConnection](/reference/storefront/v1/connections/page-connection) - A connection object containing a list of pages with pagination information. ## Example ```graphql query { pages(first: 10, query: "about", sortKey: TITLE, reverse: false) { edges { node { id title handle body } cursor } pageInfo { hasNextPage hasPreviousPage } } } ``` ## Related Types - [PageConnection](/reference/storefront/v1/connections/page-connection) - [PageSortKey](/reference/storefront/v1/objects/page-sort-key)