Presumably, you know the number of words each user has used?
Have the users buy "credits" (in app purchase) before performing a query. These "credits" are consumed according to the number of words.
The only problem will be that given you don't know the size of the reply, that may use more credits than the user has left.
This is the way quite a few games work.
This works if you want to charge before use.
You can charge after use using in app billing as well, but there is a danger that the user will not pay.