Python Tweepy - Getting the screen name of a user Last Updated : 03 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we will see how we can get the screen name of a user. Screen name is the username of the twitter account. It is the name that users choose to identify themselves on the network. Many users choose to either use their real name as the basis for their screen name, often in a shortened version. All the screen names must be unique. Identifying the screen name in the GUI : In the above mentioned profile, geeksforgeeks is the screen name of the profile. In order to get the screen name we have to do the following : Identify the user ID of the profile. Get the User object of the profile using the get_user() method and the user ID. From this object, fetch the screen_name attribute present in it. Example 1: Consider the following profile : The user ID of the above mentioned profile is 57741058. Python3 1== # import the module import tweepy # assign the values accordingly consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" # authorization of consumer key and consumer secret auth = tweepy.OAuthHandler(consumer_key, consumer_secret) # set access to user's access key and access secret auth.set_access_token(access_token, access_token_secret) # calling the api api = tweepy.API(auth) # the ID of the user id = 57741058 # fetching the user user = api.get_user(id) # fetching the screen name screen_name = user.screen_name print("The screen name of the user is : " + screen_name) Output : The screen name of the user is : geeksforgeeks Example 2: Consider the following profile : The user ID of the above mentioned profile is 4802800777. Python3 1== # the ID of the user id = 4802800777 # fetching the user user = api.get_user(id) # fetching the screen name screen_name = user.screen_name print("The screen name of the user is : " + screen_name) Output : The screen name of the user is : PracticeGfG Comment More infoAdvertise with us Next Article Python Tweepy - Getting the screen name of a user Y Yash_R Follow Improve Article Tags : Python Python-Tweepy Practice Tags : python Similar Reads Python Tweepy - Getting the name of a user In this article we will see how we can get the name of a user. Name is the display name of the twitter account. It is the name that users choose to identify themselves on the network. Many users choose to either use their real name as the basis for their display name. Unlike screen names, the names 2 min read Python Tweepy - Getting the ID of a user In this article we will see how we can get the ID of a user. ID is the unique identification marker of the twitter account. ID is given to the user by Twitter, the user can not select or change their own ID. In order to get the ID we have to do the following : Identify the user screen name of the pr 2 min read Python Tweepy â Getting the URL of a user In this article we will see how we can get the URL of a user. The url attribute is a URL provided by the user in association with their profile. The URL attribute is optional and is Nullable. Identifying the URL in the GUI : In the above mentioned profile the url is : geeksforgeeks.org In order to g 2 min read Python Tweepy - Getting the location of a user In this article we will see how we can get the location of a user. The location of the user account need not be the exact physical location of the user. As the user is free to change their location, the location of the account can even by a hypothetical place. The location attribute is optional and 2 min read Python Tweepy â Getting the source of a tweet In this article we will see how we can get the source of a status/tweet. The source of the tweet tells us how the tweet was posted. Some examples of sources are : Twitter for Android Twitter for iPhone Twitter Web App The source attribute of the Status object provides us with the source of the statu 2 min read Like