Search results in Twitter API dont match Twitter website search results - twitter

I am using REST API to extract twitter search results in Hindi and Hebrew.
Search phrase in Hindi - "मुझे सपना आया" OR "मैंने सपना देखा की"
Twitter search results return about 100 results for this phrase - https://twitter.com/search?src=typd&q=%22%E0%A4%AE%E0%A5%88%E0%A4%82%E0%A4%A8%E0%A5%87%20%E0%A4%B8%E0%A4%AA%E0%A4%A8%E0%A4%BE%20%E0%A4%A6%E0%A5%87%E0%A4%96%E0%A4%BE%20%E0%A4%95%E0%A5%80%22%20OR%20%22%E0%A4%AE%E0%A5%81%E0%A4%9D%E0%A5%87%20%E0%A4%B8%E0%A4%AA%E0%A4%A8%E0%A4%BE%20%E0%A4%86%E0%A4%AF%E0%A4%BE%22
However Twitter explorer console API (https://dev.twitter.com/console) returns only 1 result.
Same thing happens for the Hebrew phrase as well. Website returns correct results. API only returns 1 result
Search phrase in Hebrew - "אתמול בלילה חלמתי"
Please Help!!
Thanks,
DB

Found out that for Twitter search api results only go back 1 week for exact phrase matches versus keyword matches. So changed my search criteria from exact phrases to separate words to solve the problem.
Here are the links from Twitter discussions which I found related to this topic.
https://dev.twitter.com/discussions/20596
https://dev.twitter.com/discussions/23726

When I try to console (With OAUTH) it returns more than 1 result.
If it doesn't for you try to make the count value higher.
this is my result:
http://pastebin.com/H2HVs71G
-Tim

Related

How to track and stream tweets for keywords with AND operator using phirehose library?

I am trying to connect to streaming API of twitter and retrieve tweets keywords using specific keywords. I am using the phirehose library for the same. It says in the twitter documentation that "commas as logical ORs, while spaces are equivalent to logical ANDs (e.g. ‘the twitter’ is the AND twitter, and ‘the,twitter’ is the OR twitter)."
But I want to search for keywords with AND operator even if there are other words in between. Meaning if we want to search for tweets having Keyword1 AND Keyword2, tweets which have only one keyword should not be retrieved.
Using the settrack function of the phirehose library -
setTrack(array('the , twitter'));
retrieves tweets with either the OR twitter while
setTrack(array('the twitter'));
retrieves tweets with the phrase the twitter and does not retrieve tweets like the busy twitter for example.
Please help.
140dev by Adam Green gives a solution for this by using ``typeenum('words','phrase') NOT NULL DEFAULT 'words'
Please see - http://140dev.com/twitter-api-programming-blog/streaming-api-enhancements-part-2-keyword-collection-database-changes/ and
http://140dev.com/twitter-api-programming-blog/streaming-api-enhancements-part-3-collecting-tweets-based-on-table-of-keywords/

Twitter Tweet Search FROM particular date to TO particular date wrt/ and without user using java api

I would like to search for a tweets within a range of between dates by using Twitter API v1.1
let Query query=new QUery(String query);
what is the query thats suits for my question ??
Thanks in advance for reply back.
I suggest setting until to limit your query to an upper date bound, e.g.:
query.setUntil("2014-07-01");
Then step back through the result set, by making subsequent search calls, until you hit your lower date bound.
Be aware that the search API may not contain all Tweets and it may not 'go back' as far as you need. For more information on it, and other query parameters, take a look at Twitter's documentation on searching.

Twitter API - Search latin special characters

How can I perform a search in Twitter API that matches with special chars like Ñ or Ç?
Even web search seems to be confused with those characters
Ex:
https://twitter.com/search?q=u%C3%B1as&src=typd
It returns a list of tweets matching with 'unas' and 'uñas', and the same result is returned if an API search is performed
And it happens in inverse way, if you search 'barca' twitter will return tweets matching with 'barça' and 'barca'
The only way I found to ensure that the keyword, and only the keyword, is in tweets, is a programming filtering when results are fetched. Is there any better way?

Twitter Search Api to find exact results

I am using twitter search api
https://dev.twitter.com/docs/using-search
I want to search for a word (exact match) and count the no of mentions or hashtags of that word (exact match).
I have tried q="json" OR #json OR #json but they retun something like json_decode or #json_dude but I want exact match.
Also, is there anyway to count the no of retweets without 'popular' search ?
In the page you linked, see the paragraph of "Search Operators", the 2nd example is what you are looking for. It says you sould use "
just like in a google search.
You cannot do exact search like this, there's no way.
You can do exact search only when you are not using `OR'
i.e. you can do q="json" but not q="json" OR #json OR #json.
But you can count the retweets by looking at field in_reply_to_status_id_str. Each in_reply_to_status_id_str represents that its a reply against a tweet , thus a retweet :)

Delay and Inconsistent results using Twitter search API when using "since_id" parameter

We've noticed what seems to be a delay and/or inconsistent results using the Twitter Search API when specifying a sinceid in the param clause. For example:
http://search.twitter.com/search?ors=%23b4esummit+#b4esummit+b4esummit&q=&result_type=recent&rpp=100&show_user=true&since_id=
Will give the most recent Tweets, but:
http://search.twitter.com/search?ors=%23b4esummit+#b4esummit+b4esummit&q=&result_type=recent&rpp=100&show_user=true&since_id= 12642940173
will often not give tweets that are after that ID for several hours (even though they're visible in the first query)...
anyone have similar problems?
First off, those are not Twitter search API URLs. You should be querying the API like this:
http://search.twitter.com/search.json?q=%23b4esummit%20OR%20#b4esummit%20OR%20b4esummit&result_type=recent&rpp=100&show_user=true
Second, since_id cuts off from the bottom of the list. You can see the behavior illustrated in this documentation: https://dev.twitter.com/docs/working-with-timelines
For an example, at the time of this writing, the above URL returns 31 entries. Picking the ID of a Tweet in the middle of that list, I constructed:
http://search.twitter.com/search.json?q=%23b4esummit%20OR%20#b4esummit%20OR%20b4esummit&result_type=recent&rpp=100&show_user=true&since_id=178065448397574144
Which only returns 12 entries, which match the top 12 entries of the first URL.

Resources