Process instances of filtered tasks

Is there anyway to retrieve process instances of list of tasks we get by RestAPIs? If I iterate the list of tasks to retrieve their process instances it has a performance issue. And also sometimes I need to filter by instance fields. Is there anyway to simulate joining Instance and Task tables with RestAPIs? Because I didn’t embed the engine in my application and integrate with engine just with RestAPIs and External Tasks.