Querying API On Input With Variables

In short you cannot do that with an input. There is a much longer response about doing it with a filter here.