Added api filter code