I'm looking to build a Monero web wallet, but I'm not sure how to go about querying the remote Monero nodes to get an updated balance of an address. Let's say I have the Monero private keys, how do I get the balance from a remote RPC API Monero node? What is the API call I need to make? Is there an example of how this is done?
You'll want to use the
monero-wallet-rpc. Documentation for the API methods are here.
Note, this is a different application than the main Monero daemon
UPDATE based on comments:
If you don't want to work with wallet files you will need to implement something like this. You'll see it invokes a daemon RPC method
/get_address_info with parameters