I want to programmatically get the age of a contract or token on the ethereum blockchain. Is there a reliable way to do this with the etherscan api?
XXX is your token address, and
YYY is your Etherscan API key.
The genesis block number of your token contract should be at the
blockNumber field of the first entry, provided that the
to field of that entry is empty.
Otherwise, the token contract was created on-chain (i.e., from a function in another contract), in which case, I'm not so sure how you could obtain it via Etherscan API.