Our new LangChain Academy Course Deep Research with LangGraph is now live! Enroll for free.
OSS (v1-alpha)
LangChain and LangGraph
# get ALCHEMY_API_KEY from https://www.alchemy.com/ alchemyApiKey = "..."
from langchain_community.document_loaders.blockchain import ( BlockchainDocumentLoader, BlockchainType, ) contractAddress = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" # Bored Ape Yacht Club contract address blockchainType = BlockchainType.ETH_MAINNET # default value, optional parameter blockchainLoader = BlockchainDocumentLoader( contract_address=contractAddress, api_key=alchemyApiKey ) nfts = blockchainLoader.load() nfts[:2]
contractAddress = ( "0x448676ffCd0aDf2D85C1f0565e8dde6924A9A7D9" # Polygon Mainnet contract address ) blockchainType = BlockchainType.POLYGON_MAINNET blockchainLoader = BlockchainDocumentLoader( contract_address=contractAddress, blockchainType=blockchainType, api_key=alchemyApiKey, ) nfts = blockchainLoader.load() nfts[:2]