How to use Twitter API v2 | Tweet lookup, User lookup, Likes, Timelines, Search, Tweet count

Поділитися
Вставка
  • Опубліковано 24 жов 2024

КОМЕНТАРІ • 101

  • @WebDesignerAmy
    @WebDesignerAmy 7 місяців тому +3

    So far this is the most in-depth video covering how to setup and access the API at the most basic level. The documentation site is so confusing and some vids that exist are much older and the UI has changed since then. So far, still good information. ty!

  • @3DASMR_24
    @3DASMR_24 Рік тому +3

    gettting thi error: 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

  • @venkatkomarashetty7675
    @venkatkomarashetty7675 2 роки тому +16

    It would have been more helpful if u have covered POST requests as well.

  • @mhnpp4874
    @mhnpp4874 2 роки тому +5

    Thank you so much for this explanation. I am a student trying to learn postman for academic research. It would be a great assistance if you could clarify two of my simple doubts. (1) Do tweets include original tweets as well as replies to other tweets? (2) How can we collect retweets with quotes (comments) while excluding simple retweets?

    • @Learn21
      @Learn21  2 роки тому

      Hi for
      1. try this stackoverflow.com/a/68115718/1746774
      2. Can use the endpoint: GET Retweeted by but this will give ids of all the accounts who have retweeted

  • @Worldofdave
    @Worldofdave 3 роки тому +4

    within 20 Minutes, I was able to understand the basics of postman and twitter API v2. Thank you very much sir!

  • @jordi5921
    @jordi5921 2 місяці тому

    Can you make an updated video because im getting a Client Forbidden error when I use the Bearer Token as the Auth Type
    I have the free plan. Can I not use v2/user lookup?

  • @LimitlessMotivation-g6g
    @LimitlessMotivation-g6g Рік тому +1

    Thank you for your explanations, but do you have any idea about tweeting using this V2 twitter api?

  • @mgedier
    @mgedier Рік тому +3

    This did not work for me, it still says "When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens..."

    • @kenirwin5538
      @kenirwin5538 Рік тому +1

      Same. I wonder if the rules have changed since a year ago when the video was made.

    • @Learn21
      @Learn21  Рік тому

      Oh is it . Let me check it . Maybe Twitter has changed their API.

    • @RichardFAllen6
      @RichardFAllen6 Рік тому +1

      @@kenirwin5538 I am stuck at the same spot.

    • @hilaloruc607
      @hilaloruc607 Рік тому

      same problem applies for me as well.

    • @mgedier
      @mgedier Рік тому

      @@hilaloruc607 It seems that we need to pay for the service otherwise it won't work.
      The service is not free anymore

  • @BeWorded
    @BeWorded Рік тому

    A year after and your video is still helpful! Thnaks fir this great video!

  • @ayaali4392
    @ayaali4392 Рік тому +2

    hello please i neet your help, in the single tweet request i get this error {
    "title": "Unauthorized",
    "type": "about:blank",
    "status": 401,
    "detail": "Unauthorized"
    }

    • @Learn21
      @Learn21  Рік тому

      Hi Aya, seems like API key error . Please check your API-key.

    • @iBullseye
      @iBullseye Рік тому +1

      @@Learn21 Nope, apparently there is an issue. I have added all variables to the environment correctly and still getting this error. I've seen many people with the same issue as well

    • @aabhasparakh9660
      @aabhasparakh9660 6 місяців тому

      @@iBullseye did you get the solution?

    • @iBullseye
      @iBullseye 6 місяців тому

      @@aabhasparakh9660 Not really, because there is no solution apparently. Access to the Twitter API has been restricted and can only be accessed with a montly subscription (around 100$ a month or so)

  • @gbemilekemicah3041
    @gbemilekemicah3041 Рік тому +1

    Please if i want to do a tweet count but within a country

  • @teja424
    @teja424 Рік тому +1

    Please make a video on how to connect Twitter Ads API to postman and start using it

    • @Learn21
      @Learn21  Рік тому

      Try reading the documentation of Twitter ads api . It should be easy to integrate.

  • @yoh9899
    @yoh9899 3 роки тому +4

    is there a way to use the wait_on_rate_limit function in postman with API v2? I want to download ca 1 million tweets in the full-archive search so the application needs to make several requests automatically without stopping after one single request.

    • @artabra1019
      @artabra1019 2 роки тому

      use twint-fork library it's no limit by downloading tweets

  • @pragyakhare1762
    @pragyakhare1762 3 роки тому +2

    Thanks for the informative video. Can you please share how we can use 'filtered stream' option ?

  • @dineshnandan5101
    @dineshnandan5101 Місяць тому

    Bhai when i hit enter with tweet id and bearer token getting this error: When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.

  • @ekhnio
    @ekhnio 2 роки тому +1

    Please make a video on “How to use Twitter developer account for beginners”

    • @ekhnio
      @ekhnio 2 роки тому

      Please make video fast.
      Thanks

  • @digitalkarir
    @digitalkarir 3 роки тому +1

    Very good explaination bro, i can uderstan basic use of Twitter API.
    Cheers

  • @carmenguerrero547
    @carmenguerrero547 2 роки тому

    Thank you so much for share this information, i'm a dummy for Post man and Twitter API v2 and you help me a lot!

  • @Anoopkumar-x2q
    @Anoopkumar-x2q Рік тому

    Hii, i have an issue , my collection have a lock sign and is not ruinng in postman .Always shows some authorization issue

  • @vivekkoul4428
    @vivekkoul4428 5 місяців тому

    Can we use the tweet lookup in the free version of API? To me it seemed one can only do manage tweet and user look up. Pls correct me

    • @Learn21
      @Learn21  5 місяців тому +1

      Yes Twitter has changed its pricing. Now only post tweet , delete tweet, user lookup are part of Free plan. Tweet lookup is part of basic plan -- starting at $100/month. Read more here : developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api

  • @rashtrapankaj5141
    @rashtrapankaj5141 2 роки тому

    Thank you!
    How to tweet a local image from my website to my twitter wall?
    Do we really need developer account for that?

  • @murtaza74
    @murtaza74 Рік тому

    can you advise, how we can write the API reply from twitter to a DB

    • @Learn21
      @Learn21  Рік тому

      Hi Murtaza, you can call the API from your server and store the response in your DB.

  • @advancedtechs9141
    @advancedtechs9141 2 роки тому

    Good to learn this ...But how can i get latest tweet from any user or say watch new tweets from userand send data to webhook? Is there any documentation or video for this please help...

    • @Learn21
      @Learn21  2 роки тому

      This seems like an enterprise feature : developer.twitter.com/en/docs/twitter-api/enterprise/account-activity-api/guides/getting-started-with-webhooks

    • @tanmay91patil
      @tanmay91patil 2 роки тому

      @@Learn21 Is it available for essential users ?

  • @rakesh4581
    @rakesh4581 2 роки тому

    Sir if anyone twit and I want her twit in 1-2 second , so it is possible with api or not? For example Elon Musk make twit and I want newly twit in 1 second through api. Please tell me

  • @NirajKumar-hq2rj
    @NirajKumar-hq2rj 3 роки тому

    Thanks for easy explanation..cud u also make video for text analytics of bunch of tweets

  • @ditirorampate502
    @ditirorampate502 3 роки тому

    is there a way to look for users based on a certain country?

  • @artabra1019
    @artabra1019 2 роки тому

    Thank you so much for this i'm finally complete my twitter project really helpfull if using search tweet recent can i specify a specific date and specific location or this parameters is available only in search tweet all ?

    • @Learn21
      @Learn21  2 роки тому +1

      Open Twitter API collection in postman, read the description section you will get all the details. Start date, end date, location are all query params in the search tweet API endpoint.

  • @geoffreywadsworth7400
    @geoffreywadsworth7400 2 роки тому

    Very helpful. Though I was hoping you would go into the steams.

  • @aabhasparakh9660
    @aabhasparakh9660 6 місяців тому

    Getting this error in postman - When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. I have created developer account and created project in it also and stored bearer token. But still getting this error.

  • @gauravonguitars
    @gauravonguitars Рік тому

    Authorization doesn't work. I used the bearer token as you said but I was returned a 403 with reason client-not-enrolled

  • @adelelhoteiby5576
    @adelelhoteiby5576 2 роки тому

    Hi, what is the function you would use to get image url from tweets using user tweets timeline by ID

    • @Learn21
      @Learn21  2 роки тому

      You can use the `media.fields` and `expansions` query params to get the url. . something like this .. api.twitter.com/2/users//tweets?expansions=attachments.media_keys&media.fields=url

  • @sergiovelascocarballido6658
    @sergiovelascocarballido6658 7 місяців тому +1

    People, you have to pay for the minimum accesses, the minimum cost is 100 dollars per month, the pro subscription is 5000 per month, NOTHING.

    • @aabhasparakh9660
      @aabhasparakh9660 6 місяців тому

      so with free access you cannot get any of these?

    • @sergiovelascocarballido6658
      @sergiovelascocarballido6658 6 місяців тому

      @@aabhasparakh9660 Yes, the free membership is practically "crap", it has hardly any functions...
      If you want to use all their features, they force you to pay.

  • @AmerLIVE
    @AmerLIVE 3 роки тому +1

    Nice one! subscribed!

  • @jnovoa100
    @jnovoa100 2 роки тому

    Hi, what is the function you would use to get 100 more tweets and 100 more...? I tried using the pagination token but then I only get 10 more only.
    Thank you!

    • @Learn21
      @Learn21  2 роки тому +1

      You can use the query param `max_results` to specify how many latest tweets you want, also use query param `pagination_token` to get different pages.

    • @jnovoa100
      @jnovoa100 2 роки тому

      @@Learn21 Thank you for the help!

  • @onebilen4137
    @onebilen4137 Рік тому

    ? do you have it with PHP

  • @Juan-Hdez
    @Juan-Hdez Рік тому

    Very useful. Thank you!

  • @vinshuthakur1892
    @vinshuthakur1892 2 роки тому

    can we extract twwets acoording to time

  • @prajwalswaroopsrivastava2589

    I have free access... But this v2 isnt working. its throwing a 403 error
    Can somebody help?

    • @Learn21
      @Learn21  Рік тому

      Hi.. 403 error means access is not available. Please check if your account/api key has been approved by Twitter and try again.

  • @AkshaySharma81
    @AkshaySharma81 Рік тому +1

    how to check if my api is v1 or v2?

    • @Learn21
      @Learn21  Рік тому

      Hi Akshay, version is generally part of the URL (endpoint) of API.

  • @elderofzion
    @elderofzion 2 роки тому

    nice. thanks, bruv

  • @tronkerala7698
    @tronkerala7698 2 роки тому

    Hello sir,
    I am trying to create a telegram bot, that is used to verify one Twitter account's followers
    The bot simply ask the person to follow one Twitter account and my bot will need to check whether that person really followed the Twitter account which the bot instructed to do
    but we are not getting any result with Twitter API
    Can you please guide us on how to know whether the one person followed a particular Twitter account or not with Twitter API

    • @Learn21
      @Learn21  2 роки тому

      You can check the user ids the user is following using the following API, api.twitter.com/2/users//following

  • @droptimistic7419
    @droptimistic7419 4 місяці тому

    How to collect tweets ?

  • @darshanbankapure7191
    @darshanbankapure7191 Рік тому

    i am using free access of the twitter api. Is it possible to get the tweets from the api or is it mandatory to get basic subscription for getting the tweets beacuse i cant use the user lookup as it keeps giving 403 forbidden error

    • @easydrafting
      @easydrafting Рік тому +2

      I am also getting same. Not sure if you get the solution?

    • @3DASMR_24
      @3DASMR_24 Рік тому

      Is there a way to get all my tweets?@@easydrafting

  • @zainajmal2779
    @zainajmal2779 Рік тому

    how i get email of user from api

  • @devil-code
    @devil-code 7 місяців тому

    sir need small help ?

  • @uzmashaikwale3370
    @uzmashaikwale3370 Рік тому

    Nice

  • @heck0272
    @heck0272 2 роки тому

    How do you find a user by name?

    • @Learn21
      @Learn21  2 роки тому

      You can use, User by username API: api.twitter.com/2/users/by/username/

    • @heck0272
      @heck0272 2 роки тому

      @@Learn21 that’s by username. I’m trying to query users by name. Username = twitter handle … name = profile name

  • @singwithtapatikarmakar9869
    @singwithtapatikarmakar9869 Рік тому

    Nice 👍👍👍👍

  • @nhdarzwn
    @nhdarzwn Рік тому

    9

  • @archikakansal7342
    @archikakansal7342 2 роки тому

    Thanks for this explaination. I have one doubt I am using tweet/count/recent and tweet/search/recent with same parameters but it’s giving me different count, what can be the reason.
    Quick help will really be appreciated
    query parameters for count:
    query_params_counts = {"query": "keyword -is:retweet lang:en",
    "granularity":"day",
    "start_time":"2022-05-09T00:00:00.000Z",
    "end_time":"2022-05-010T00:00:00.000Z"
    }
    for this count is coming: 1766
    query_params_tweets = {"query":"keyword -is:retweet lang:en",
    "start_time":"",
    "end_time": "",
    "max_results": 100,
    "expansions": "author_id,attachments.media_keys,entities.mentions.username",
    "tweet.fields": "id,text,created_at,attachments,public_metrics",
    "user.fields": "id,name,username,created_at,description,profile_image_url,location,public_metrics,url",
    "place.fields": "full_name,id,country,country_code,geo,name,place_type",
    "media.fields": "media_key,type,url",
    "next_token": {}
    }
    for this count is: 1751

    • @Learn21
      @Learn21  2 роки тому

      I checked for another query = "growth school"; counts are matching for both API calls(6). Maybe some issue with some tweets for your query. Pls, check with other queries.

  • @uzmashaikwale3370
    @uzmashaikwale3370 2 роки тому

    Nice