Extended query api.