On the search results page, the diet pulldown filter allows you to restrict by a number of dietary options (vegan, vegetarian, pescatarian, gluten-free).
In addition to this, specific ingredients or entire groups can be excluded by prefixing with "-". Ingredient groups that can be exclude include nuts, soy, cheese, alliums (onion family) and fodmaps.
For example:
cookie nut -walnut -almond (any nuts apart from almonds and walnuts)