3

I am currently using

https://api.stackexchange.com/2.2/search/advanced?order=desc&site=stackoverflow&accepted=False&sort=activity&tagged=MY_TAG in order to query all unanswered questions marked with MY_TAG.

Is it possible to do the same thing with multiple tags at the same time? From my understanding the API allows you to find questions that have all the tags specified at the same time by just separating them with ; (or a logical AND if you may). I would to like to find questions that might contain at least one of the specified tags (a logical OR)

Would I have to perform multiple queries in order to get what I need?

  • 1
    I don't think it's possible, the only separator allowed afaik is semicolon, and it performs the "AND" search - so probably you'll have to send two requests and join it by yourself. – Shadow Wizard Wearing Mask May 4 '16 at 11:53
2

Use the q parameter and treat it as you would treat a search box in any SE site, which means you can use the operator OR between two [tags]. For example:

https://api.stackexchange.com/2.2/search/advanced?
order=desc&site=stackoverflow&accepted=False&sort=activity&q=[tag1] OR [tag2]
| improve this answer | |
  • 1
    That seems to work. Cheers 👍 – Alex Styl May 5 '16 at 9:10

You must log in to answer this question.

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