QueryBuilder API is used to query withing repository to get info which store in the repository. If you want to fetch something outside which is not store in the repo, then you have to go for another approach.
Could you please elaborate on the actual requirement brief/background (couldn't relate to the context in which details you are trying to fetch are needed)
Based on that we will be able to arrive at the exact API to be used.
QueryBuilder API is used to query withing repository to get info which store in the repository. If you want to fetch something outside which is not store in the repo, then you have to go for another approach.