3

I am trying to retrieve the count of replies for a particular tweet(using tweet.retweet_count). But I am getting attribute not found error. Seems this attribute is missing from the tweet object.But when I check in the documentation of tweet object, its listed and should have been available. Am I mssing something?

documentation - https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object

I am using python and following is my code:

for tweet in alltweets:
    outtweets.append([tweet.id_str, tweet.created_at, tweet.text.encode("utf-8"),tweet.place,tweet.source,tweet.reply_count,tweet.retweet_count,tweet.favorite_count,tweet.retweeted,tweet.lang])

my outtweets list is empty :( tried with many tweets

  • using: api = tweepy.API(auth) alltweets = api.user_timeline(screen_name = screen_name,count=200) – chetan gupta Dec 17 '17 at 02:36
  • In Twitter v2 it is now possible to get the reply_count field without a premium account: https://blog.twitter.com/developer/en_us/topics/tips/2020/understanding-the-new-tweet-payload.html – shamisen Jan 06 '21 at 03:11

1 Answers1

4

Even though reply_count is documented to be available on the Tweet object, it is, unfortunately, a part of the premium API:

That field is only offered in the premium and enterprise API tiers and we need to do better at documenting this restriction.

(reference)

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • Complementary reference: https://twittercommunity.com/t/reply-count-quote-count-not-available-in-statuses-lookup-answer/95241/5 – manuelmhtr Jan 04 '18 at 01:13