How to get organization member history?

I’d like to be able to see when people have joined or left an organization. For example, I’d like to be able to look up a user and get information like, “User X was a member of organization Y from 2018 to 2020”.

Is there an API call or combination of API calls which can help me get this information?