Iterate over containers and get search query