API to get main account address from remote account address


Is there any API available to find the main account address from the remote account address? If not then any workaround?
Or to fetch importance type of transaction for the address?

You need public key of remote account:


Next get account by linked account:


Thank you so much for this!