granary icon indicating copy to clipboard operation
granary copied to clipboard

twitter v2 API

Open snarfed opened this issue 7 years ago • 8 comments

we currently use twitter's existing (legacy? :P) search API that "searches against a sampling of recent Tweets published in the past 7 days." this confused @aaronpk when he searched for streampdx, and got no results since they're all over 7d old.

twitter just launched their new premium search API, which includes full history! both paid and free tiers.

  • https://twittercommunity.com/t/ushering-in-a-new-era-for-the-twitter-developer-platform-with-the-twitter-api-v2/162087#how-about-those-of-you-that-are-already-on-the-platform-4
  • https://blog.twitter.com/developer/en_us/topics/tools/2018/access-the-full-history-of-tweets.html
  • https://developer.twitter.com/en/docs/tweets/search/overview/premium

...except you have to ask permission, tell them what you're building, and get approved. :( i can't tell if that's just because it's in beta right now, or permanent.

Good news is, I went through that approval process recently with a test account, and it went fine. Plus, the intro tier ("Essential") doesn't require approval at all any more, and they've dropped many of the approval requirements, including the limits on replicating Twitter's UX. Huge!


Missing features

These are blocking migrating Bridgy at least, if not granary:

  • [ ] Fetching retweets. Currently you can look up the users who have retweeted a given tweet, but not the retweet objects themselves, notably their ids, which we need in Bridgy at least.
  • [ ] conversation_id is awesome, but it's always based on a top-level tweet, and we need to be able to fetch replies to any tweet, including replies themselves, which the v2 API can't do yet, and I'm not holding my breath. 😐
    • https://twittercommunity.com/t/best-way-to-get-replies-to-a-reply-in-a-conversation/159695
    • https://twittercommunity.com/t/embedded-conversation-conversation-id-tweet-id/150802

snarfed avatar Feb 17 '18 19:02 snarfed

in the meantime, i should add a louder warning to the granary docs and UI that twitter search is just the last week, and not comprehensive.

snarfed avatar Feb 17 '18 19:02 snarfed

for granary.io at least, this is pretty unlikely. the premium API costs $0.25-$1/request/month, depending on volume and endpoint (30d vs full history), and the free tier is limited to 50-250 requests/month. so, not really an option.

snarfed avatar Aug 15 '18 20:08 snarfed

New announcement and launch of the v2 API today. Promising:

  • https://developer.twitter.com/en/docs/twitter-api/migrate/whats-new
  • https://twittercommunity.com/t/ushering-in-a-new-era-for-the-twitter-developer-platform-with-the-twitter-api-v2/162087#how-about-those-of-you-that-are-already-on-the-platform-4=

Notably, the intro tier ("Essential") doesn't require approval at all any more, and they've dropped many of the approval requirements, including the limits on replicating Twitter's UX. Huge!

The rate limits are still too small for Bridgy, though. The Essential tier is 1.7qpm, Elevated is 3.3qpm, Bridgy averages 30-60qpm.

snarfed avatar May 05 '22 05:05 snarfed

The exciting parts, though: v2 finally supports fetching likes, replies, and polls!

snarfed avatar May 05 '22 05:05 snarfed

Started on this!

snarfed avatar May 20 '22 18:05 snarfed

Deprioritized due to all the Twitter acquisition chaos.

snarfed avatar Jan 12 '23 05:01 snarfed

^ this is now entirely dependent on https://github.com/snarfed/bridgy/issues/1410. Not looking good.

snarfed avatar Feb 12 '23 03:02 snarfed

Twitter is now developer-hostile, so I don't plan to work on this myself. I'll happily review and merge PR(s) though!

snarfed avatar Apr 06 '23 21:04 snarfed

Closing; granary's Twitter support may be on the road to deprecation.

snarfed avatar Jul 26 '24 03:07 snarfed