Hi,

In v 1.1. would this be the correct query to exclude two specific user ids when obtaining tweets in a POST request?

data = '{"query":"#MyChosenHashtag lang:en -is:retweet -from:userid1 -from:userid2", "maxResults": 500, "fromDate": "mychosendate", "toDate": "' mychosendate '"}'

No, this looks like a v2 query - is:retweet is a v2 only operator. and fromDate, toDate are v2 url parameters.

But for v1.1, to exclude a user, -from:userid1 is correct. However, spaces are logical ANDs so to exclude multiple authors you would write:

#MyChosenHashtag lang:en -filter:retweets (-from:user1 OR -from:user2)

as the query in v1.1. See Search operators | Docs | Twitter Developer Platform

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.