I need help finding a way to automatically get the Twitter username for verified NFT projects using their contract address. I already tried using the OpenSea collections API but the twitter_username field keeps returning null values even for projects that are verified and have active Twitter accounts. When I attempted to scrape the information directly from web pages, I ran into Cloudflare blocking issues with error code 1020. I’m wondering if anyone has successfully used services like Moralis NFT API or similar GraphQL endpoints to fetch social media handles for NFT collections. What’s the most reliable method to map a contract address to its official Twitter account programmatically?
i tried alchemy’s nft api too, it works ok sometimes. the getContractMetadata can pull social links but ya, its a bit random. also check out the tokenURI metadata; some projects have their twitter there. etherscan might help if alchemy doesn’t work for ya.
Contract metadata is all over the place - there’s no standard for social media links. I’ve found it works better to use multiple approaches instead of just one API. QuickNode’s NFT API sometimes catches social data that OpenSea misses, and CovalentHQ makes a decent backup. If projects store metadata on IPFS, you might have to parse the JSON files straight from the tokenURI. You can also check if they use EIP-2981 royalty standards since some creators put contact info there. Truth is, lots of older contracts just don’t have this data at all, so you’ll need backup methods if you want full coverage.