Updated API to handle filtering criteria on posts listing