Search API and Twitter Search both return different results


#1

I am trying to search with the Twitter API v1.1 but I can get different results to the main Twitter Search
e.g. Here is the Twitter Site Search url (https://twitter.com/search?q=from%3AMelbRecital+%23HA2013), this returns a single result

If I try and pass
q=from%3AMelbRecital+%23HA2013
in to the API (https://api.twitter.com/1.1/search/tweets.json) I get 0 results (the statuses property is empty) if I just use the ‘from’ then I get the results I would expect


#2

The Search API’s index only goes back about a week while the website has some additional features not found in the API.


#3

Hi Taylor,
The result I get via the site is for the 29th July (over a week ago), seems to more be a combination of ‘from:’ and ‘#’ values e.g.
https://twitter.com/search?q=from%3AMelbRecital%20%23MRCMOTM&mode=relevance&src=typd

This causes the same issue, via the site I get a number of results from 15 July going back, but none via the API


#4

Hi Taylor, I don’t think my previous reply went through, having internet issues

I think it is more to do with the ‘#’ tag being used with the ‘from:’ as I have found another example
https://twitter.com/search?q=from%3AMelbRecital%20%23MRCMOTM&mode=relevance&src=typd
returns results from the 15th July where as the API search
q=from:MelbRecital #MRCMOTM
still returns nothing
{“statuses”:[],“search_metadata”:{“completed_in”:0.004,“max_id”:364777425441271808,“max_id_str”:“364777425441271808”,“query”:“from%3AMelbRecital+%23MRCMOTM”,“refresh_url”:"?since_id=364777425441271808&q=from%3AMelbRecital%20%23MRCMOTM&include_entities=1",“count”:15,“since_id”:0,“since_id_str”:“0”}}


#5

I’m also facing the same issue. Infact I’m getting a more severe case. Fom API hit I recieve only 1 result. While if I go on twitter itself or search from Twitter’s Advance Search Platform I get all the results (https://twitter.com/search?q=from%3Aknexus&src=typd).

Response from API -

{"statuses":[{"metadata":{"iso_language_code":"en","result_type":"recent"},"created_at":"Tue Jan 13 12:50:12 +0000 2015","id":554983754826260480,"id_str":"554983754826260480","text":"These 2015 Resolutions may help you benefit from your Data. http:\/\/t.co\/wJlF43Z2Wt","source":"\u003ca href=\"http:\/\/www.hootsuite.com\" rel=\"nofollow\"\u003eHootsuite\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":15929523,"id_str":"15929523","name":"Knexus","screen_name":"Knexus","location":"London \/ New York","profile_location":null,"description":"The leading provider of Cloud based Customer Engagement software. Maximise the reach of your content across all media & achieve clear ROI from engagement.","url":"http:\/\/t.co\/0xI0RI2RmC","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/0xI0RI2RmC","expanded_url":"http:\/\/www.knexusgroup.com","display_url":"knexusgroup.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":4095,"friends_count":2358,"listed_count":92,"created_at":"Thu Aug 21 09:24:00 +0000 2008","favourites_count":0,"utc_offset":0,"time_zone":"London","geo_enabled":false,"verified":false,"statuses_count":3278,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"E4E4E4","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/15034424\/123.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/15034424\/123.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/1737674172\/Knexus_Logo_Twitter_normal.png","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/1737674172\/Knexus_Logo_Twitter_normal.png","profile_link_color":"0084B4","profile_sidebar_border_color":"BDDCAD","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":true,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}],"search_metadata":{"completed_in":0.012,"max_id":554983754826260480,"max_id_str":"554983754826260480","query":"from%253Aknexus","refresh_url":"?since_id=554983754826260480&q=from%253Aknexus","count":15,"since_id":0,"since_id_str":"0"}}

#6

The public search API is not guaranteed to return all of the same results as on the web client - it is limited to around 7 days of more real-time information.

it’s important to know that the Search API is focused on relevance and not completeness. This means that some Tweets and users may be missing from search results.


#7

Thanks. But only 1 tweet ? somtimes even 0 results ? That is bit extreme ? Is there any solution to this or any other alternative ?


#8

If there were no tweets with a certain term within that time period, then it is valid to get 0 results.

For a more comprehensive set of results, you could look at the Gnip products which cover the entire historical index.


#9

I am facing the same issue, and i cannot found what i need from the response json data. I am trying to search news about ‘India’, here is the web search link “https://twitter.com/search?f=news&vertical=news&q=india&src=typd”.
Can get the list on twitter web search, but the api always give me the response that useless to me. Does anyone know how to get those links ?