/users/ endpoint only supports retrieving an individual user’s information or retrieving the whole list of users.
If you already know their user ids, you can iterate over those using
session.jget if you’re using pdpyras.
There is not a search endpoint in the API, so if you don’t know the user ids, it’s much harder to get what you need, especially if you have a lot of users. You can use the iterator, but you’d need to do the matching on your own.
You can use the CLI for these tasks as well. The default output isn’t particularly helpful for programmatic use, but with
--output you should be able to get json, yaml, or csv formatted data.