> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/pages.md).

# Pages

Pages : `Instance`

## Overview

The Pages object is used to provide large data divided into multiple pages.

Each page consists of a list of key-value pairs sorted in order

## Properties

### IsFinished

`boolean`

Returns whether it is the last page.

This determines whether it is possible to request the next page while iterating through pages.

#### Code Samples

```lua
local MarketplaceService = game:GetService("MarketplaceService")

local function Request_GetWorldProductsAsync()
    local success, errorOrWorldProducts = pcall(function()
        return MarketplaceService:GetWorldProductsAsync()
    end)

    if success then
        local worldProducts = errorOrWorldProducts

        while true do
            local currentPage = worldProducts:GetCurrentPage()

            -- Exit loop if it's the last page
            if worldProducts.IsFinished or currentPage == nil then
                break
            end
        end
    end
end
```

## Methods

### AdvanceToNextPageAsync

Moves to the next page while iterating through the Pages object.

However, page transitions are processed only if there are remaining pages.

#### Parameters

#### Return

| `void` |   |
| ------ | - |

#### Code Samples

```lua
local MarketplaceService = game:GetService("MarketplaceService")

local function Request_GetWorldProductsAsync()
    local success, errorOrWorldProducts = pcall(function()
        return MarketplaceService:GetWorldProductsAsync()
    end)

    if success then
        local worldProducts = errorOrWorldProducts

        while true do
            local currentPage = worldProducts:GetCurrentPage()

            -- Exit loop if it's the last page
            if worldProducts.IsFinished or currentPage == nil then
                break
            else
                worldProducts:AdvanceToNextPageAsync()
            end
        end
    end
end
```

### GetCurrentPage

Returns all items included in the current page.

The key structure of the returned items varies depending on the data from which the Pages object was created.

#### Parameters

#### Return

| `Value` | The information configured in the current page. |
| ------- | ----------------------------------------------- |

#### Code Samples

```lua
local MarketplaceService = game:GetService("MarketplaceService")

local function Request_GetWorldProductsAsync()
    local success, errorOrWorldProducts = pcall(function()
        return MarketplaceService:GetWorldProductsAsync()
    end)

    if success then
        local worldProducts = errorOrWorldProducts

        while true do
            local currentPage = worldProducts:GetCurrentPage()

            if currentPage ~= nil then
                for _, productInfo in pairs(currentPage) do
                    print("World Product Name: " .. tostring(productInfo.Name))
                end
            end
        end
    end
end
```

## Events
