limit to number of search terms?
Home › Forums › TAGSExplorer Questions/Issues › limit to number of search terms?
Tagged: search terms
- This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by mhawksey.
-
AuthorPosts
-
December 22, 2016 at 4:20 pm #850khelmsmithParticipant
In addition to searching for #drought tweets, I’d like to search by state, i.e., #CAdrought, #MAdrought, etc. When I do three — #CAdrought OR #TXdrought OR #MAdrought — it works, but when I do all 50 states (plus DC and the general #drought) it gives me an error message. Is there a limit to how many search terms can be used, and if so, what is it? And is that because of TAGS or google?
I plan to collect data daily for a while, so it would be great to be as efficient as possible.
Many thanks!
December 22, 2016 at 8:06 pm #851mhawkseyKeymasterHi – yes there is a limit to the the query length which is set by Twitter. The maximum is 1,000 characters – this includes some parameters sent by the script so in reality it is a little less than this
December 23, 2016 at 5:38 pm #852khelmsmithParticipantCould there be something else going on? According to Word my entire list of search terms is 710 characters including spaces. When I tried cutting it in half this is what it said:
Request failed for https://api.twitter.com/1.1/search/tweets.json?q=%23drought%20OR%20%23ALdrought%20OR%20%23AKdrought%20OR%20%23AZdrought%20OR%20%23ARdrought%20OR%20%23CAdrought%20OR%20%23COdrought%20OR%20%23CTdrought%20OR%20%23DEdrought%20OR%20%23DCdrought%20OR%20%23FLdrought%20OR%20%23GAdrought%20OR%20%23HIdrought%20OR%20%23IDdrought%20OR%20%23ILdrought%20OR%20%23INdrought%20OR%20%23IAdrought%20OR%20%23KSdrought%20OR%20%23KYdrought%20OR%20%23LAdrought%20OR%20%23MEdrought%20OR%20%23MDdrought%20OR%20%23MAdrought%20OR%20%23MIdrought%20OR%20%23MNdrought%20OR%20%23MSdrought%20OR%20%23MOdrought%20OR%20%23MTdrought%20OR%20%23NEdrought%20OR%20%23NVdrought%20OR%20%23NHdrought%20OR%20%23NJdrought%20&count=100&result_type=recent&include_entities=1&since=2016-12-22&until=2016-12-23&max_id=812027943551639553 returned code 403. Truncated server response: {“errors”:[{“code”:195,”message”:”Missing or invalid url parameter.”}]} (use muteHttpExceptions option to examine full response)
thanks very much
January 16, 2017 at 9:08 pm #867mhawkseyKeymasterMy bag – looks like Twitter have limited the complexity of the search even further to 500 characters
A UTF-8, URL-encoded search query of 500 characters maximum, including operators. Queries may additionally be limited by complexity.
-
AuthorPosts
- You must be logged in to reply to this topic.