Filter API results to reduce number of queries needed