Twitter API v2 Python tweepy

#Twitter API v2 authentication using Tweepy for Essential access endpoints in Python
import tweepy
client = tweepy.Client(bearer_token = 'brearer_token_here', 
                           consumer_key = 'consumer_key_here',
                           consumer_secret = 'consumer_secret_here',
                           access_token = 'access_token_here',
                           access_token_secret = 'access_token_secret_here')
#Search 10 tweets that contain the word "grepper"
tweets = client.search_recent_tweets(query="grepper", max_results = 10)
#Use which ever method you want to extract the searched tweet data.
searched_tweet_data = tweets.data
Adventurous Anaconda