Bitcoin API(s) - how to pair (or obtain) BOTH sender and receiver addresses with a transaction ID (hash) Various block explorers exist, which offer REST APIs. So far been using blockchain.info and btc.com

Here is what we have:
- List of bitcoin addresses

Here is what can easily be got with that info:
 - Historic list of transactions (hashes, or IDs) for the given addresses
 - I can also discover which input or output was OUR address, and therefore:
 - value, and whether the transaction was being sent or received

Now, here's what we need to obtain:
 - the OTHER (to/from) address!

So:
How can you use a transaction ID to obtain BOTH the sender's and receiver's wallet address - with some kind of REST API preferably?

(...knowing that sometimes transaction IDs are associated with multiple inputs and multiple outputs)

Endpoint references:
https://blockchain.info/q
https://btc.com/api-doc
The Bitcoin system doesn't have a "sender's address".  You can walk the transaction history to find out what destination the coins you were paid was last sent to but that is not a "sender's address".

Imagine if you had a magic wand you could wave over any package you received in the mail that would tell you where it was last mailed before you. You wave the wand over a package and find it was last mailed to a large distribution warehouse in china.  Is this the sender's address?  No. You bought the package from a shop in New York that purchased it for drop shipment from a distributor in Texas that fulfilled it out of a third party operated warehouse in Seattle, who recently pulled it out of a container from transoceanic shipment from the warehouse in china that your wand returned.

The previous to address might be useful information, just like the wand example-- but it is not the sender-- or at least not necessarily so--, it is not a return or refund address.  And this failure to map to the sender is not a fringe situation, just like the wand returning someone other than the party who sold you something would not be fringe: people frequently pay bitcoin's out of third parties wallets.