Search query for a particular user under Premium Sandbox


Hi there, I’m trying to pull tweets from the 30day sandbox for a particular user/s using searchtweet library in Python using the tag ‘from’. However, I get the following error

ERROR:searchtweets.result_stream:HTTP Error code: 422: Unprocessable Entity: This is returned due to invalid parameters in a query or when a query is too complex for us to process. –e.g. invalid PowerTrack rules or too many phrase operators, rendering a query too complex.
ERROR:searchtweets.result_stream:rule payload: {‘query’: ‘from:<user_name>’, ‘maxResults’: 500}

The snippet of code is:
rule_a=gen_rule_payload(“from: <user_name>”)

Can anyone help me out?

Thank You for your help in advance.


@darshan941018 Can you try using this python tool specific for that API: