I recently upgraded to the paid Premium version of Search Tweets API: Full Archive, which I understand permits use of Premium operators outlined here https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/overview/premium-operators

However, when I send the below query through I get the 422 error code “There were errors processing your request: Reference ot invalid field ‘country_code’ (at position 31), Reference to invalid operator ‘country_code’. Operator is not available in current product or product packaging.”

I got a similar message for the sample: 10 portion as well. I also rechecked to make sure my account was properly updated to Premium and it looks like it was. Also worth noting is that if i remove country_code and sample from the query, everything works perfectly fine.

Any help or insight would be really appreciated.

Thanks!

There is no country_code operator in a query, instead, you may want profile_country.

country_code is the field that is matched by the profile_country operator.

All the operators and fields are listed in Operators by product | Docs | Twitter Developer Platform - for paid premium it’s all the ones marked “Premium”

2 Likes

Thanks Igor!

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