How to effectively return Wallet-id from address?

Given an address e.g. DdzFFzCqrht5dbwrAkRB...
How can I effectively return the Wallet-id (e.g. Ae2tdPwUPEZM3KPgdp3sjz6MxkxZzsV26...) that the address belongs to via the API (or other way)?

I can iterate the wallets via api/v1/wallets then for each entry call
api/v1/wallets/{walletid}/accounts
And only then look for a match with addresses.

This is really seems to be very un-effective for very large volume of wallets/addresses :confused:
Is there some other way? is the wallet-id encoded in the address?