Query api with strings

@OlegIlyenko @gogregor