Classic APIs
ClassicFriendsApi
friendsSearch

friendsSearch

Search through a users friends list.

Parameters

NameTypeDescription
userIdIdentifierThe id of the user to get online friends for.
querystringThe query to search for.
userSort?Exclude<FriendsUserSort, "Alphabetical">Specifies how to sort the returned friends.
limit?numberThe number of results to be returned per request.
cursor?stringThe paging cursor for the previous or next page.

Example

const { data: searchedFriend } = await ClassicFriendsApi.friendsSearch({ userId: 45348281, query: "b" }); 

Example Data

[
  { id: 2027974391, hasVerifiedBadge: false },
  { id: 176144016, hasVerifiedBadge: false },
  { id: 3116019601, hasVerifiedBadge: false },
] 

Endpoint

GET /v1/users/{userId}/friends/search