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

# PFLobbyGetSearchProperty

> PFLobbyGetSearchProperty reference for reading a searchable property value by key on a PlayFab lobby using the PlayFab Multiplayer C++ SDK lobby APIs.

Get the search property value from its key.

## Syntax

```cpp theme={null}
HRESULT PFLobbyGetSearchProperty(  
    PFLobbyHandle lobby,  
    const char* key,  
    const char** value  
)  
```

### Parameters

**`lobby`**   PFLobbyHandle

The handle of the lobby.

**`key`**   char\*\
*is null-terminated*

The key of the property.

**`value`**   char\*\*\
*library-allocated output, may return nullptr*

The output value associated with the key. An output null value signifies the property wasn't present.

### Return value

Type: HRESULT

`S_OK` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PFMultiplayerGetErrorMessage()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/functions/pfmultiplayergeterrormessage.md).

## Remarks

Search properties are visible to non-members of the lobby as metadata which can be used to filter and sort lobby search results. \
\
&#x20;If this lobby object is still in the process of asynchronously being created, joined, or claimed via a call to [PFMultiplayerCreateAndJoinLobby()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayercreateandjoinlobby.md), [PFMultiplayerCreateAndClaimServerLobby](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayercreateandclaimserverlobby.md), [PFMultiplayerClaimServerLobby()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerclaimserverlobby.md) or [PFMultiplayerJoinLobby()](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pfmultiplayerjoinlobby.md), this method will return no properties.

## Requirements

**Header:** PFLobby.h

## See also

[PFLobby members](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)


## Related topics

- [PFMultiplayer C/C++ API overview - PFLobby.h](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members.md)
- [PFLobbyGetSearchPropertyKeys](https://docs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbygetsearchpropertykeys.md)
- [Lobby.GetSearchProperties](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/Lobby/GetSearchProperties.md)
- [LobbySearchResult.SearchProperties](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbySearchResult/SearchProperties.md)
- [Lobby.LobbyMaxSearchPropertyCount](https://docs.xbox.com/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyConstants/LobbyMaxSearchPropertyCount.md)
