4

We can use the symbols ; (respectively &) on the tagged parameter to represent an AND (respectively an OR) boolean operator on tags. For example, the API call

/2.2/search/excerpts?order=desc&sort=activity&tagged=fortran;blockchain&site=stackoverflow

returns an empty list since there is no question that is simultaneously tagged with the [fortran] and [blockchain] tags.

Is there a similar way to use boolean operators in the query parameter q?

5

The q parameter roughly supports the same syntax as the search field on the sites, so you can do boolean logic on tags, provided that you use square brackets:

Query API search Site search Number of results
[fortran] OR [blockchain] link link 32512
[fortran] link link 24711
[blockchain] link link 7801
[fortran] [blockchain] link link 0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .