If I choose not to verify a smart contract, the source code will be not visible, but would other people be able to see the content anyway? I am asking this because I want to call an API and that would expose the key and secret. Is there a way to hide it?
Anything that is stored on the blockchain is possible for anyone to see.
Therefore it is not possible to hide any of the code, because it can just be reverse engineered from the bytecode that is uploaded to the blockchain.
But if you are serious about the smart contract you are developing then verifying the contract would be highly recommended.
Because if you don't, that would look awfully suspicious for anyone wanting to use your smart contract.
If calling something on your smart contract would expose the key and secret, then seriously need to redesign that portion of your code. As John DeBord said, using anything on the blockchain is possible to see, including the contents of your transaction as you send it to your smart contract. If you need things kept secret, then you should encrypt that before transmitting it to the blockchain, and store it encrypted in your contract.