Get specific tweet data from twitter API

45 Views Asked by At

I am trying to find the number of likes, comments, reposts, and bookmarks of a specific tweet based on the tweet URL. Is there any way to find all these numbers using the Twitter API? Currently, I am using the following code, but it's giving me an error:

auth = tweepy.OAuth1UserHandler(api_key, secret_key, access_token,access_token_secret)
api = tweepy.API(auth)
tweet = api.get_status("1765403157746639282")
print(tweet)

Error:

453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product

1

There are 1 best solutions below

0
Humza Sami On BEST ANSWER

I am leaving solution here. I used twitter v2 api

https://developer.twitter.com/en/docs/twitter-api/metrics