Learn how to fetch all the Farcaster users that are currently designated as Moxie Heroes and the variable boost they received on their FarScore.
Moxie Heroes are designated each week based on their prior week's quality and diversity of engagement. Every week Moxie Heroes get a variable boost to their FarScore based on their existing score.
Heroes can keep these powers for themselves or transfer to another user. Heroes' superpowers last for a full week. A new set of heroes is launched each week based on previous week diversity and quality of engagement. It will be rotated so no one is hero in consecutive weeks.
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
Get All The Current Moxie Heroes
You can get the Farcaster users that are currently Moxie Heroes by using the FarScores API and configure the API by setting the heroBoost filter to greater than 0 to only fetch those with Hero boost:
Try Demo
Code
query MyQuery {
FarScores(
input: {
filter: {
# Only get user that have hero boost
heroBoost: {_gt: 0}
},
limit: 200
}
) {
FarScore {
farScore
heroBoost
social {
profileName
fid: userId
}
}
}
}