Learn how to use Airstack to fetch all NFT mints data, from or to user(s), across Ethereum, Base, Degen Chain, and other Airstack-supported chains.
All tokens minted are essentially NFT transfers from a null address (0x00...00) to a user address that are executed by the receiving user itself. Thus, with Airstack, you can use the TokenTransfers API to fetch all user's token mints by specifying the input as follows:
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.
queryMyQuery {Ethereum: TokenTransfers( input: {filter: { # Only get mints that are executed by the same useroperator: {_eq: "betashop.eth"}, # Mints are token transfers that has null address as `from`from: {_eq: "0x0000000000000000000000000000000000000000"}, # Set this to the user that receive the token mintsto: {_eq: "betashop.eth"}, # Get only NFTs (ERC721/1155)tokenType: {_in: [ERC721, ERC1155]}, },blockchain: ethereum,order: {blockTimestamp: DESC} } ) { TokenTransfer { blockchain formattedAmount tokenAddress tokenId tokenNft { metaData { name } contentValue { image { medium } } } tokenType } }Base: TokenTransfers( input: {filter: { # Only get mints that are executed by the same useroperator: {_eq: "betashop.eth"}, # Mints are token transfers that has null address as `from`from: {_eq: "0x0000000000000000000000000000000000000000"}, # Set this to the user that receive the token mintsto: {_eq: "betashop.eth"}, # Get only NFTs (ERC721/1155)tokenType: {_in: [ERC721, ERC1155]}, },blockchain: base,order: {blockTimestamp: DESC} } ) { TokenTransfer { blockchain formattedAmount tokenAddress tokenId tokenNft { metaData { name } contentValue { image { medium } } } tokenType } }}