> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFLeaderboardsGetLeaderboardAsync

> Reference for PFLeaderboardsGetLeaderboardAsync, a PlayFab Services C API function that gets a leaderboard for an entity type and statistic.

Get the leaderboard for a specific entity type and statistic.

## Syntax

```cpp theme={null}
HRESULT PFLeaderboardsGetLeaderboardAsync(  
    PFEntityHandle entityHandle,  
    const PFLeaderboardsGetEntityLeaderboardRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFLeaderboardsGetEntityLeaderboardRequest\*](/services/playfab/api-references/c/pfleaderboardstypes/structs/pfleaderboardsgetentityleaderboardrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on all platforms. When the asynchronous task is complete, call [PFLeaderboardsGetLeaderboardGetResultSize](/services/playfab/api-references/c/pfleaderboards/functions/pfleaderboardsgetleaderboardgetresultsize) and [PFLeaderboardsGetLeaderboardGetResult](/services/playfab/api-references/c/pfleaderboards/functions/pfleaderboardsgetleaderboardgetresult) to get the result.

## Requirements

**Header:** PFLeaderboards.h

## See also

[PFLeaderboards members](/services/playfab/api-references/c/pfleaderboards/pfleaderboards_members)
