Find variant with searchquerry

I want to find a variant that has a certain value on one of its fields, I’ve tried to use dataservice to query but the example in the docs only show how to do it with a base product. Is there a way to query a variant or do I have to do it in a different way?

Litium version: 7

You have to query for the variant inside the BaseProduct.

You query the variant on the same way as the base product, change only the word BaseProduct to Variant when you create the query.