How do I return token amount in USD using web3js ..or is there some kindof API to be used ?
For instance , say user has 3ETH and also want the user balance to show in USD just as metamask does
Ethereum doesn't do that.
You need a price source which could be on-chain or off-chain. Off-chain would be an exchange or other service, e.g CoinMarketCap and that would be an API. On-chain could be a price Oracle or liquidity pool, e.g. ChainLink or Uniswap. There are many in both cases.
Hope it helps.