add query api and categories