đĢ Lens Followers
Airstack provides easy-to-use APIs for enriching Lens applications and integrating on-chain and off-chain data with Lens .
Table Of Contents
In this guide you will learn how to use Airstack to:
Pre-requisites
Basic knowledge of GraphQL
Get Started
JavaScript/TypeScript/Python
If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
npm yarn pnpm pip
React
Copy npm install @airstack/airstack-react
Node
Copy npm install @airstack/node
React
Copy yarn add @airstack/airstack-react
Node
Copy yarn add @airstack/node
React
Copy pnpm install @airstack/airstack-react
Node
Copy pnpm install @airstack/node
Then, add the following snippets to your code:
React Node Python
Copy import { init , useQuery } from "@airstack/airstack-react" ;
init ( "YOUR_AIRSTACK_API_KEY" );
const query = `YOUR_QUERY` ; // Replace with GraphQL Query
const Component = () => {
const { data , loading , error } = useQuery (query);
if (data) {
return < p >Data: { JSON .stringify (data)}</ p >;
}
if (loading) {
return < p >Loading...</ p >;
}
if (error) {
return < p >Error: { error .message}</ p >;
}
};
Copy import { init , fetchQuery } from "@airstack/node" ;
init ( "YOUR_AIRSTACK_API_KEY" );
const query = `YOUR_QUERY` ; // Replace with GraphQL Query
const { data , error } = await fetchQuery (query);
console .log ( "data:" , data);
console .log ( "error:" , error);
Copy import asyncio
from airstack . execute_query import AirstackClient
api_client = AirstackClient (api_key = "YOUR_AIRSTACK_API_KEY" )
query = """YOUR_QUERY""" # Replace with GraphQL Query
async def main ():
execute_query_client = api_client . create_execute_query_object (
query = query)
query_response = await execute_query_client . execute_query ()
print (query_response.data)
asyncio . run ( main ())
Other Programming Languages
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
đ¤ AI Natural Language â Airstack provides an AI solution for you to build GraphQL queries to fulfill your use case easily. You can find the AI prompt of each query in the demo's caption or title for yourself to try.
Get Lens Followers of Lens Profile(s)
You can get the list of Lens followers of Lens profile(s) by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Show me the Lens followers of lens/@stani, lens_id:0x024, vitalik.eth, 0xeaf55242a90bb3289dB8184772b0B98562053559 Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
dappName : { _eq : lens }
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
}
blockchain : ALL
limit : 200
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followerProfileId
followerTokenId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
]
} ,
"followerProfileId" : "19989" ,
"followerTokenId" : "15527" ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
Check A Given Lens Profile is A Follower of User(s) on Lens
You can use Airstack to check if user(s) is following a given Lens profile on Lens protocol.
This can be done by providing the given Lens profile on the Wallet
top-level query's identity
input and the user(s) in the socialFollowers
:
Try Demo
Show me if lens/@shnoodles is a follower of a group of users on Lens Code
Query Response
Copy query isFollowing {
Wallet(input: { identity : "lens/@shnoodles" , blockchain : ethereum}) {
socialFollowers( # Check if lens/@shnoodles is a follower of these user identities on Lens
input: {filter: {identity: {_in: ["0xeaf55242a90bb3289dB8184772b0B98562053559", "betashop.eth", "yosephks.cb.id", "lens/@deepesh", "lens_id:100275", "fc_fname:dawufi", "fc_fid:602"]}, dappName: {_eq: lens}}}
) {
Follower {
dappName
dappSlug
followingProfileId
followerProfileId
followingAddress {
addresses
socials {
profileName
}
domains {
name
}
}
}
}
}
}
Copy {
"data" : {
"Wallet" : {
"socialFollowers" : {
"Follower" : [
{
"dappName" : "lens" ,
"dappSlug" : "lens_polygon" ,
"followingProfileId" : "94472" ,
"followerProfileId" : "27561" ,
"followingAddress" : {
"addresses" : [
"0xeaf55242a90bb3289db8184772b0b98562053559"
] ,
"socials" : [
{
"profileName" : "betashop.eth"
} ,
{
"profileName" : "lens/@betashop9" // lens/@shnoodles is a follower of lens/@betashop9 on Lens
}
] ,
"domains" : [
{
"name" : "jasongoldberg.eth"
} ,
{
"name" : "betashop.eth"
}
]
}
} ,
{
"dappName" : "lens" ,
"dappSlug" : "lens_polygon" ,
"followingProfileId" : "122312" ,
"followerProfileId" : "27561" ,
"followingAddress" : {
"addresses" : [
"0x0964256674e42d61f0ff84097e28f65311786ccb"
] ,
"socials" : [
{
"profileName" : "lens/@dawufi" // lens/@shnoodles is a follower of lens/@dawufi on Lens
} ,
{
"profileName" : "dawufi"
}
] ,
"domains" : [
{
"name" : "cantos.testbrand.eth"
} ,
{
"name" : "dawufi.eth"
}
]
}
}
]
}
}
}
}
If lens/@shnoodles
is a follower of any of the users on Lens, then it will appear as a response in the Follower
array as shown in the sample response .
Get The Most Recent Lens Followers of Lens Profile(s)
You can get the list of most recent Lens followers of Lens profile(s) by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
dappName : { _eq : lens }
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
}
blockchain : ALL
limit : 200
order : { followerSince : DESC }
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followerProfileId
followerTokenId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x58ff0410a60153edc925cfca1a42d104d669d3d9" ] ,
"socials" : [
{
"profileName" : "lens/@oglab" ,
"profileTokenId" : "97497" ,
"profileTokenIdHex" : ""
}
]
} ,
"followerProfileId" : "97497" ,
"followerTokenId" : "66673" ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
Get The Earliest Lens Followers of Lens Profile(s)
You can get the list of the earliest Lens followers of Lens profile(s) by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
dappName : { _eq : lens }
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
}
blockchain : ALL
limit : 200
order : { followerSince : ASC }
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followerProfileId
followerTokenId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x2c5667c6b4d442f8a9efb555ed6b465fff56710d" ] ,
"socials" : [
{
"profileName" : "lens/@tataraghoul303" ,
"profileTokenId" : "8560" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@meowed" ,
"profileTokenId" : "96953" ,
"profileTokenIdHex" : ""
}
]
} ,
"followerProfileId" : "96953" ,
"followerTokenId" : "28394" ,
"followingAddress" : {
"addresses" : [ "0x7241dddec3a6af367882eaf9651b87e1c7549dff" ] ,
"domains" : null ,
"socials" : [
{
"profileName" : "lens/@stani" ,
"profileTokenId" : "5" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@lilgho" ,
"profileTokenId" : "110056" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@lensofficial" ,
"profileTokenId" : "47319" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "5"
}
// more followers
]
}
}
}
Get Lens Followers of Lens Profile(s) that has ENS Domain
You can get the list of Lens followers of Lens profile(s) and check if they have any ENS domain by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {filter: {dappName: {_eq: lens}, identity: {_in: ["lens/@stani", "lens_id:0x024", "vitalik.eth", "0xeaf55242a90bb3289dB8184772b0B98562053559"]}}, blockchain: ALL, limit: 200}
) {
Follower {
followerAddress {
addresses
domains { # Show all domains owned by followers
name
isPrimary
}
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
}
followerProfileId
followerTokenId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
]
} ,
"followerProfileId" : "19989" ,
"followerTokenId" : "15527" ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// other followers
]
}
}
}
You can use the followerAddress.domains
that will return an array to see if there's any domain owned by the follower.
If the length of the followerAddress.domains
array is non-zero, then the follower has at least one ENS domain. Otherwise, it does not have any ENS domain.
Get Lens Followers of Lens Profile(s) that has XMTP Enabled
You can get the list of Lens followers of Lens profile(s) and check if they have XMTP enabled by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {filter: {dappName: {_eq: lens}, identity: {_in: ["lens/@stani", "lens_id:0x024", "vitalik.eth", "0xeaf55242a90bb3289dB8184772b0B98562053559"]}}, blockchain: ALL, limit: 200}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
xmtp {
isXMTPEnabled # Indicate if followers have XMTP enabled
}
}
followerProfileId
followerTokenId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
] ,
"xmtp" : [
{
"isXMTPEnabled" : true
}
]
} ,
"followerProfileId" : "19989" ,
"followerTokenId" : "15527" ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
You can use the followerAddress.xmtp.isXMTPEnabled
field to check if the follower has XMTP enabled or not.
If followerAddress.xmtp.isXMTPEnabled
field returns true
, then the follower has XMTP enabled. Otherwise, it will return null
and thus has not enabled XMTP.
Get Lens Profiles that have a certain amount of Followers
You can get all the Lens profiles that have a certain amount of followers, e.g. more than or equal to 1000 follower counts on Lens:
Try Demo
Code
Query Response
Copy query MyQuery {
Socials(
input: { filter : { followerCount : { _gte : 1000 }, dappName : { _eq : lens}}, blockchain : ethereum, limit : 200 }
) {
Social {
profileName
profileTokenId
profileTokenIdHex
followerCount # Show the total follower count of each follower
}
}
}
Copy {
"data" : {
"Socials" : {
"Social" : [
{
"profileName" : "lens/@metaverseplayer" ,
"profileTokenId" : "971" ,
"profileTokenIdHex" : "0x03cb" ,
"followerCount" : 1000
} ,
{
"profileName" : "lens/@thisisvoya" ,
"profileTokenId" : "36332" ,
"profileTokenIdHex" : "0x08dec" ,
"followerCount" : 1486
} ,
{
"profileName" : "lens/@timjeffries" ,
"profileTokenId" : "30824" ,
"profileTokenIdHex" : "0x07868" ,
"followerCount" : 1108
}
]
}
}
}
To get the individual follower count of each Lens profile, use followerCount
field that will return an integer type.
Get Lens and Farcaster Followers of Lens Profile(s)
You can get the list of Lens and Farcaster followers of Lens profile(s) by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
}
blockchain : ALL
limit : 200
}
) {
Follower {
followerAddress {
addresses
socials {
dappName
profileName
profileTokenId
profileTokenIdHex
userId
userAssociatedAddresses
}
}
followerProfileId
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x3a134eb077cda063dec6f507e969556ddcb4e1f9" ] ,
"socials" : [
{
"dappName" : "farcaster" ,
"profileName" : "florist" ,
"profileTokenId" : "13915" ,
"profileTokenIdHex" : "" ,
"userId" : "13915" ,
"userAssociatedAddresses" : [
"0x3a134eb077cda063dec6f507e969556ddcb4e1f9"
]
}
]
} ,
"followerProfileId" : "13915" ,
"followingAddress" : {
"addresses" : [
"0x66bd69c7064d35d146ca78e6b186e57679fba249" ,
"0xeaf55242a90bb3289db8184772b0b98562053559"
] ,
"domains" : [
{
"name" : "jasongoldberg.eth"
} ,
{
"name" : "betashop.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@betashop9" ,
"profileTokenId" : "94472" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "602"
}
// more followers
]
}
}
}
Get Lens Followers of Lens Profile(s) that Hold ERC20 Token(s)
You can get the list of Lens followers of Lens profile(s) and that hold certain ERC20 token(s), e.g. USDC , by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {filter: {identity: {_in: ["lens/@stani", "lens_id:0x024", "vitalik.eth", "0xeaf55242a90bb3289dB8184772b0B98562053559"]}, dappName: {_eq: lens}}, blockchain: ALL, limit: 200}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
tokenBalances(
input: {filter: {tokenAddress: {_in: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]}, tokenType: {_eq: ERC20}}}
) {
formattedAmount # Indicate if there's any USDC, otherwise `null`
}
}
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens}}}) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
] ,
"tokenBalances" : [
{
"formattedAmount" : 0.507491
}
]
} ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
Get Lens Followers of Lens Profile(s) that Hold ERC721/1155 NFT(s)
You can get the list of Lens followers of Lens profile(s) and that hold certain ERC721 or ERC1155 NFT(s), e.g. BAYC , by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
dappName : { _eq : lens }
}
blockchain : ALL
limit : 200
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
tokenBalances(
input: {
filter : {
tokenAddress : {
_in : [ "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" ]
}
tokenType : { _in : [ERC721, ERC1155] }
}
}
) {
formattedAmount # Indicate if there's any BAYC, otherwise `null`
}
}
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
] ,
"tokenBalances" : [
{
"formattedAmount" : 1
}
]
} ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
Get Lens Followers of Lens Profile(s) that Hold POAP(s)
You can get the list of Lens followers of Lens profile(s) and that hold certain POAP(s), e.g. EthCC[6] Attendee POAP , by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
dappName : { _eq : lens }
}
blockchain : ALL
limit : 200
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
poaps(input: { filter : { eventId : { _eq : "141910" } } }) {
mintHash
mintOrder
}
}
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [ "0x82cb4081ddba4ecb2eb45ad4b9ee7405351738b7" ] ,
"socials" : [
{
"profileName" : "lens/@elsu83877827" ,
"profileTokenId" : "19989" ,
"profileTokenIdHex" : ""
}
] ,
"poaps" : null
} ,
"followingAddress" : {
"addresses" : [ "0x8ec94086a724cbec4d37097b8792ce99cadcd520" ] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
}
// more followers
]
}
}
}
Get Lens Followers of Lens Profile(s) that Hold Certain Amount of ERC20 Token(s)
You can get the list of Lens followers of Lens profile(s) and that hold certain amount of ERC20 token(s), e.g. more than or equal to 1000 USDC , by inputting either their 0x address, Lens profile name or Lens profile ID (decimal or hex ):
Try Demo
Code
Query Response
Copy query MyQuery {
SocialFollowers(
input: {
filter : {
identity : {
_in : [
"lens/@stani"
"lens_id:0x024"
"vitalik.eth"
"0xeaf55242a90bb3289dB8184772b0B98562053559"
]
}
dappName : { _eq : lens }
}
blockchain : ALL
limit : 200
}
) {
Follower {
followerAddress {
addresses
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
tokenBalances(
input: {
filter : {
tokenAddress : {
_in : [ "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" ]
}
tokenType : { _eq : ERC20 }
formattedAmount : { _gte : 1000 }
}
}
) {
formattedAmount
}
}
followingAddress {
addresses
domains {
name
}
socials(input: { filter : { dappName : { _eq : lens } } }) {
profileName
profileTokenId
profileTokenIdHex
}
}
followingProfileId
}
}
}
Copy {
"data" : {
"SocialFollowers" : {
"Follower" : [
{
"followerAddress" : {
"addresses" : [
"0xc00bdafae2ddfca38c87b77c567d5f1891aa35fc"
] ,
"socials" : [
{
"profileName" : "lens/@takminn" ,
"profileTokenId" : "87700" ,
"profileTokenIdHex" : ""
}
] ,
"tokenBalances" : [
{
"formattedAmount" : 1099.566913 // hold more than 1000 USDC
}
]
} ,
"followingAddress" : {
"addresses" : [
"0x8ec94086a724cbec4d37097b8792ce99cadcd520"
] ,
"domains" : [
{
"name" : "tiktoktopmoments.eth"
} ,
{
"name" : "crimsonchin.eth"
} ,
{
"name" : "levelsdigital.eth"
} ,
{
"name" : "saintevie.eth"
} ,
{
"name" : "bradorbradley.eth"
}
] ,
"socials" : [
{
"profileName" : "lens/@westlakevillage" ,
"profileTokenId" : "99755" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@brad" ,
"profileTokenId" : "116598" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@bradorbradley" ,
"profileTokenId" : "36" ,
"profileTokenIdHex" : ""
} ,
{
"profileName" : "lens/@hanimourra" ,
"profileTokenId" : "116239" ,
"profileTokenIdHex" : ""
}
]
} ,
"followingProfileId" : "36"
} ,
// more followers
]
}
}
}
Developer Support
If you have any questions or need help regarding fetching Lens Followers data, please join our Airstack's Telegram group.
More Resources