âī¸Lens Profile Details
Learn how to fetch Lens profile details with 0x address, ENS domain, Lens profile name and ID, and Farcaster name and ID.
â Lens Profile Details
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
An Airstack account
Basic knowledge of GraphQL
Get Started
JavaScript/TypeScript/Python
If you are using JavaScript/TypeScript or Python, Install the Airstack SDK:
React
npm install @airstack/airstack-react
Node
npm install @airstack/node
React
yarn add @airstack/airstack-react
Node
yarn add @airstack/node
React
pnpm install @airstack/airstack-react
Node
pnpm install @airstack/node
pip install airstack
Then, add the following snippets to your code:
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>;
}
};
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);
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 Profile Details By Farcaster ID
You can get the Lens profile details by their Farcaster ID:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: { dappName: { _eq: lens }, identity: { _eq: "fc_fid:3" } }
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "fc_fid:5650",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Get Lens Profile Details By Farcaster Name
You can get the Lens profile details by their Farcaster Name:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: {
dappName: { _eq: lens }
identity: { _eq: "fc_fname:vitalik.eth" }
}
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "fc_fname:vitalik.eth",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Get Lens Profile Details By 0x address
You can get the Lens profile details by their 0x address:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: {
dappName: { _eq: lens }
identity: { _eq: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" }
}
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Get Lens Profile Details By ENS Domain
You can get the Farcaster user profile details by their ENS domain:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: { dappName: { _eq: lens }, identity: { _eq: "vitalik.eth" } }
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "vitalik.eth",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Get Lens Profile Details By Lens Profile Name
You can get the Lens profile details by their Lens profile name:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: { dappName: { _eq: lens }, identity: { _eq: "lens/@vitalik" } }
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "lens/@vitalik",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Get Lens Profile Details By Lens Profile ID
You can get the Lens profile details by their Lens profile ID:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: { dappName: { _eq: lens }, identity: { _eq: "lens_id:0x0187b3" } }
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "57e3c7ae14d823399f2e2c6c57c6c926766b4ca37ff60908822d91297eb13986",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_polygon",
"dappVersion": "polygon",
"userId": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"userCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userCreatedAtBlockNumber": 35512897,
"userLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"userLastUpdatedAtBlockNumber": 35512897,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"profileName": "lens/@vitalik",
"profileTokenId": "100275",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileCreatedAtBlockNumber": 35512897,
"profileLastUpdatedAtBlockTimestamp": "2022-11-12T11:05:35Z",
"profileLastUpdatedAtBlockNumber": 35512897,
"profileTokenUri": "",
"isDefault": false,
"identity": "lens_id:0x0187b3",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "79233663829379634837589865448569342784712482819484549289560981379859480642508",
"metadataURI": "ipfs://QmXbed4geE1dq7KXfQimFz26frmY6XxvudU2QFaPx4a9FX",
"profileMetadata": {
"appId": "LensClaimingApp",
"attributes": [
{
"displayType": "string",
"key": "app",
"value": "LensClaimingApp"
}
],
"bio": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds",
"cover_picture": null,
"location": null,
"metadata_id": "f98a49e2-3dae-40f6-9a74-9466efb4a56c",
"name": "Vitalik Buterin",
"social": [
{
"displayType": "string",
"key": "website",
"value": null
},
{
"displayType": "string",
"key": "twitter",
"value": null
}
],
"version": "1.0.0"
},
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@vitalik",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
]
}
}
}
Bulk Query Lens Profile Details
You can bulk query the profile details of multiple Lens profiles by their various web3 identities:
Try Demo
Code
query MyQuery {
Socials(
input: {
filter: {
dappName: { _eq: lens }
identity: { _in: ["lens/@stani", "vitalik.eth"] }
}
blockchain: ethereum
}
) {
Social {
id
chainId
blockchain
dappName
dappSlug
dappVersion
userId
userAddress
userCreatedAtBlockTimestamp
userCreatedAtBlockNumber
userLastUpdatedAtBlockTimestamp
userLastUpdatedAtBlockNumber
userHomeURL
userRecoveryAddress
userAssociatedAddresses
profileName
profileTokenId
profileTokenAddress
profileCreatedAtBlockTimestamp
profileCreatedAtBlockNumber
profileLastUpdatedAtBlockTimestamp
profileLastUpdatedAtBlockNumber
profileTokenUri
isDefault
identity
handleTokenAddress
handleTokenId
metadataURI
profileMetadata
coverImageURI
twitterUserName
website
location
profileHandle
profileHandleNft {
address
}
coverImageContentValue {
image {
small
}
}
profileImageContentValue {
image {
small
}
}
}
}
}
{
"data": {
"Socials": {
"Social": [
{
"id": "31a0d721f65a5d7f20c17ec949222ec8ed14e5b6ec986e08feb8dd575d0de7c9",
"chainId": "137",
"blockchain": "polygon",
"dappName": "lens",
"dappSlug": "lens_v2_polygon",
"dappVersion": "v2.0.0",
"userId": "0x7241dddec3a6af367882eaf9651b87e1c7549dff",
"userAddress": "0x7241dddec3a6af367882eaf9651b87e1c7549dff",
"userCreatedAtBlockTimestamp": "2023-02-10T19:45:20Z",
"userCreatedAtBlockNumber": 39146497,
"userLastUpdatedAtBlockTimestamp": "2023-02-10T19:45:20Z",
"userLastUpdatedAtBlockNumber": 39146497,
"userHomeURL": "",
"userRecoveryAddress": "",
"userAssociatedAddresses": [
"0x7241dddec3a6af367882eaf9651b87e1c7549dff"
],
"profileName": "lens/@lensofficial",
"profileTokenId": "47319",
"profileTokenAddress": "0xdb46d1dc155634fbc732f92e853b10b288ad5a1d",
"profileCreatedAtBlockTimestamp": "2022-07-29T12:56:05Z",
"profileCreatedAtBlockNumber": 31276512,
"profileLastUpdatedAtBlockTimestamp": "2022-09-14T07:06:19Z",
"profileLastUpdatedAtBlockNumber": 33085278,
"profileTokenUri": "",
"isDefault": false,
"identity": "",
"handleTokenAddress": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945",
"handleTokenId": "10322707611123449203585042902753743620951617632760953148287476439549633105187",
"metadataURI": "",
"profileMetadata": null,
"coverImageURI": "",
"twitterUserName": "",
"website": "",
"location": "",
"profileHandle": "@lensofficial",
"profileHandleNft": {
"address": "0xe7e7ead361f3aacd73a61a9bd6c10ca17f38e945"
},
"coverImageContentValue": {
"image": null
},
"profileImageContentValue": {
"image": null
}
}
// other Lens profiles
]
}
}
}
Developer Support
If you have any questions or need help regarding fetching Lens profile details, please join our Airstack's Telegram group.
More Resources
Last updated
Was this helpful?