Skip to content

Search players by team, wallet or name

GET
/api/users/search
curl --request GET \
--url https://foxleague.ai/api/users/search

Answers up to 10 players whose team name, wallet or username contains q, ignoring case, highest ELO first. Only players with a team are listed. A q shorter than 2 characters after trimming answers an empty list.

Who: anyone.

Refusals:

q
string

Text to look for in team names, wallets and usernames, at least 2 characters.

dev_only
boolean

When true, lists only players with an active developer team and shows that team’s name and crest. Default false.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.

string | null
data

The answer. Present when success is true.

Array<object>

One player found by the search.

object
badge

The team badge; null when none. With dev_only=true, the developer team’s crest address.

string | null
elo_rating
required

ELO rating, lifetime.

integer format: int32
id
required

User id.

integer format: int32
team_name

The team name. With dev_only=true, the developer team’s name.

string | null
username

Display name; null when none.

string | null
wallet_address
required

The wallet address.

string
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": [
{
"badge": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
"elo_rating": 1688,
"id": 1093,
"team_name": "Red Kites",
"username": null,
"wallet_address": "erd124fl6zy54klay937yrnujckpak28lrdjg0eel92ue3gm36kcwf9tfwwqlt"
},
{
"badge": null,
"elo_rating": 1402,
"id": 1517,
"team_name": "Kestrel FC",
"username": "kestrel",
"wallet_address": "erd1sjqf6h5graeeeex7ervydu284rxqfxhpydcfskh788la77n9fx4s72pdhf"
}
],
"success": true
}