Is there a way of getting v1.1 REST search api to return retweeted_status

stevewillbe
@stevewillbe Steve Butterworth

The v1.1 streaming api does a great job of returning retweeted_status and retweet_count. I thought with v1.1 the idea was to get the REST and streaming api's returning the same things. However it looks like the v1.1 REST search api doesn't set either of these parameters. Is this a bug? Is it likely to change? or is this as expected?

27 weeks 15 hours ago

Replies

stevewillbe
@stevewillbe Steve Butterworth

I notice popular results include at least the retweet_count but still no retweeted_statuses. I'm not sure how to stay within twitters new display rules without having this information.

26 weeks 6 days ago
episod
@episod Taylor Singletary

I'm looking into this -- but just to be clear on what you're looking for/experiencing:

When using the 1.1 search API you are searching for tweets. When you come across a retweeted tweet, you see the out object that represents the retweeting of the tweet but not the inner object (the retweeted_status) that represents the tweet that was retweeted?

Can you share some example queries you're running for this and provide any tweet IDs that correspond to tweets that would have the child retweeted_status embedded within them when using statuses/show but do not in the Search API?

Thanks

26 weeks 6 days ago
stevewillbe
@stevewillbe Steve Butterworth

Thanks for the response.

Yes you've got my issue absolutely right. Using the new search endpoint like so..

https://api.twitter.com/1.1/search/tweets.json?lang=en&q=romney%20video&count=100

I typically get back a bunch of RT's and they now have an embedded user object but no embedded retweeted_status. Whereas I do see this information as expected in the v1.1 streaming api when I set up an equivalent filter.

Without this "inner tweet" I don't have enough information to render retweets as required by the new display rules.

It seems to be a problem with any example I try. For instance if I used the statuses/show endpoint for 248131980099727360 I get the retweeted_status and this id is a retweet of 248131883735580672.
However any retweets of 248131883735580672 that are returned by a search for "romney video" using the new REST search endpoint don't include the retweeted_status.

Thanks for your help.

26 weeks 6 days ago
episod
@episod Taylor Singletary

I've confirmed the issue and we're working to resolve -- hope to have it fixed soon! Thanks.

26 weeks 5 days ago
stevewillbe
@stevewillbe Steve Butterworth

Excellent thanks. Would be great if you could let me know when this is resolved.

Thanks for your help on this!

26 weeks 4 days ago
episod
@episod Taylor Singletary

Follow along with this issue:

Issue #513: Search API v1.1 Errata

The following remaning issues with 1.1 Search are currently identified and being worked on:

  • Search's metadata response contains language suggesting that pagination is still possible.
  • Native retweets do not contain the retweeted_status child object

Updates

We're currently working to resolve these issues.

2012-09-26 update:
* the retweeted_status node should now surface in 1.1 search results that are native retweets
* The first phase of improving the search metadata has been completed. However, you'll still find a "results_per_page" field in the response that should actually just be called "count." This field isn't typically used but acts as an echo for what parameters you've used in search.
* Since search results are no longer explicitly paginated, we've changed the "next_page" field to be "next_results". If next_results is not present, there are no more results to fetch.
* The retweeted_status node availability may still be sporadic for the next week.

Update 2012-10-08: The "results_per_page" field of the metadata response is now "count"; consistent native retweet support in API v1.1's search will arrive later today.

October 9th, 2012 update: Native retweets should now appear consistently. Search metadata is in its final form. All 1.1 release-specific errata with GET search/tweets is complete. Thank you for your patience and let us know if you continue experiencing issues. - @episod

Here's the finalized search_metadata node:

  1. "search_metadata": {
  2.     "max_id": 251079859537842177,
  3.     "since_id": 0,
  4.     "refresh_url": "?since_id=251079859537842177&q=search&include_entities=1",
  5.     "next_results": "?max_id=251079828361596927&q=search&include_entities=1",
  6.     "count": 15,
  7.     "completed_in": 0.285,
  8.     "since_id_str": "0",
  9.     "query": "search",
  10.     "max_id_str": "251079859537842177"
  11.   }
26 weeks 4 days ago
episod
@episod Taylor Singletary

This specific issue should now be resolved; let me know if you run into any issues.

25 weeks 5 days ago
stevewillbe
@stevewillbe Steve Butterworth

Just checked it and I can confirm thats its showing exactly what I expect with the retweeted_status. Thank you very much for your help!

25 weeks 4 days ago
episod
@episod Taylor Singletary

Great -- you may till see some sporadic off/on behavior with that field in the coming week -- I've been told there are still a few remaining tasks before it can be in its always-on state.

25 weeks 4 days ago
stevewillbe
@stevewillbe Steve Butterworth

Yep already seeing it come and go. Well at least I know its going to be in there consistently very soon and making it work for both scenarios just makes my code more robust :)

25 weeks 3 days ago
stevewillbe
@stevewillbe Steve Butterworth

I saw retweeted_status for about 24 hours when you mentioned that it was fixed but I haven't seen retweeted_status in the REST search results since. Is this still in the works. Just that my little app depends on these quite heavily.

23 weeks 6 days ago
FedeASocial
@FedeASocial Fede ASocial

I've also opened an issue about that => #559

in both statuses/show and search/tweets, if a tweet is a retweet the "retweet_count" for the actual tweet has the same value of the "retweet_count" for the original tweet (embedded into the "retweeted_status" attribute.

this occurs in both version of the API 1.1 and 1
example => https://api.twitter.com/1.1/statuses/show.json?id=251204947239124992 | https://api.twitter.com/1/statuses/show.json?id=251204947239124992

25 weeks 4 days ago
episod
@episod Taylor Singletary

Since retweets themselves cannot be retweeted and really are just containers for the true tweet, this logic of sharing the retweet_count is not entirely unsound.

25 weeks 4 days ago
FedeASocial
@FedeASocial Fede ASocial

oks...thanks for clarifying that!
If this is the definitve behaviour, I'll fix my little app as soon as I can.

Thanks again!

25 weeks 4 days ago
episod
@episod Taylor Singletary

Yes, it's still in the works; we've had some false starts with getting the tapestry of deploys out to finish this work, but it should be fully resolved soon.

23 weeks 6 days ago
GueKereen
@GueKereen Gue Emang Keren

Why the search/tweets doesn't give the retweeted_status node anymore? A couple days ago it works just fine, but today doesn't. Is it only me? Thank you

18 weeks 5 days ago