I am using Twitter API for searching tweets, by querying the /search/tweets endpoint.
There is a problem with my search I guess All those words that contains "_" (underscore) in them, results in weird tweets. For example when i query using "happy hour" Or "AAPL" the search results are perfect, But the problem occurs when search words like "CL_F" Or "FN_F" I have googled this problem but didn't get any proper solution. Any Help would be greatly appreciated. Thanks in advance
When you search using the Twitter REST API endpoint search/tweets
, Twitter tokenizes the string you pass in the q
parameter. An underscore happens to be one of characters used as a word separator. So, searching for "CL_F" will always be treated as a search for tweets containing both "CL" and "F". You will have to filter your search results for the pattern "CL_F".