API search for multiple terms with spaces



I want to do a twitter search for keywords with the following format:

(A && B) || (C && D)

I want tweets that contain A and B in any order or C and D, again in any order. I checked the documentation and I believe that the OR operator can only be used for single words, it does not apply to terms with spaces. I tried a few combinations of spaces and OR operator with no success.

Is it possible to make a query like this?


Sure, OR supports brackets as far as i know, eg: (A B) OR (C D)


I thought I tried that, but maybe I didn’t. It appears to work, thanks!