How do you get total supply/market cap?

I’m trying to put something together and I need to know the market cap for a BSC token. I can get the token price but I can’t get the total supply. It must be possible to get it somehow mustn’t it? Poocoin uses BitQuery and they get all these details.

They get it directly from Web3, however, we have Supply but not for all tokens…

{
  ethereum(network: bsc) {
    address(address: {is: "0x55d398326f99059ff775485246999027b3197955"}) {
      annotation
      address
      smartContract {
        attributes {
          name
          type
          value
        }
        contractType
        currency {
          symbol
          name
          decimals
          tokenType
        }
      }
      balance
    }
  }
}

What do you mean by “They get it directly from Web3”?

Isn’t Web3 just a term for Blockchain-integrated internet? Or Is there some company with that name? Or how would someone access “Web3” in the way that poocoin does for supply and market cap info?

Sorry if that’s a stupid question.

Thank you

Web3.js is a utility that could be used for directly communicating with the blockchain. Here is a documentation that could assist you further.

https://web3js.readthedocs.io/