Added query api