323 questions
Tooling
0
votes
0
replies
70
views
How can I collect tweets from multiple accounts (2020–2025) for research purposes?
I’m conducting a registered study on the accuracy of political pundits’ predictions, using their posts on X (Twitter) as data. The project is registered on OSF: https://osf.io/s9c3x.
I need to collect ...
0
votes
0
answers
47
views
Get Tweet Thread Context with twitterapi
I'd like to get the entire tweet thread story.
Like this one, for example:
https://x.com/sterlingco_3/status/1808511113124048946
There are 10 tweets.
I'm using https://api.twitterapi.io/twitter/tweet/...
0
votes
0
answers
28
views
Python twitter bot not working, how do I make it use the free access? [duplicate]
Im building a twitter bot and the API isnt working. It seems I have the free version of it and i am getting errors such as
453 - You currently have access to a subset of Twitter API v2 endpoints and ...
0
votes
0
answers
61
views
Tweepy : Twitter error response: status code = 403 : Troubleshooting Tweet Ingestion in Azure Solution Notebook (Spark)
I'm encountering a 403 error when ingesting tweets using Tweepy v3.10.0 and Twitter API. The Search API works fine in Postman, indicating an authentication issue within the notebook ...
0
votes
1
answer
164
views
Integrating a Scrapfly Scraper into an Azure Synapse Analytics Project
I am currently working on a project called “Azure-Social-Media-Analytics-Solution-Accelerator”. This project utilizes data from two main sources: news sites and Twitter. The data is collected and ...
-3
votes
1
answer
797
views
get list of followers for my X account using tweepy
I am using X API v2 (basic access) with Tweepy and want to get the list of my account followers.
Any idea how to achieve this please?
I know that client.get_users_followers(id) is no more available ...
0
votes
1
answer
282
views
Twitter API media upload fails with FileNotFoundError
What I want to do
I'm currently coding a Twitter bot which just creates a tweet with a couple of media with the Python wrapper "Twikit".
This is the Python code "betsuaka_test.py" ...
-4
votes
2
answers
1k
views
Twitter API v2 and v1.1
so i want to use tweepy in order to post some tweets ( photos, and videos basically) and i am just using the free versin of the twitter developer account.
I know there are some limitaion, and by ...
1
vote
1
answer
364
views
tweepy (tweepy.errors.Unauthorized: 401 Unauthorized)
I want to retrieve tweets using Twitter API of basic developer account. I do not have too much knowledge of using API for scraping. I already set my Authentication Token's permission to Read and Write ...
0
votes
1
answer
592
views
Twitter API Basic or Free Plan for Scraping Tweets from Twitter?
I'm a college student I am currently doing research in NLP, which I need to scrape tweets from Twitter. Does anybody who are experienced with Twitter API, may I know that must I subscribe Basic plan ...
0
votes
0
answers
825
views
Do the users lookup in twitter API v2 free version using endpoints GET /2/users/me
I write the following code to try the free version of Twitter API v2
import requests
import os
# Retrieves the bearer token from the environment variables
bearer_token = os.environ.get("...
0
votes
1
answer
122
views
TweepyException: Failed to parse JSON payload: Expecting value: line 1 column 1 (char 0)
I am using twitter v1 api for searching the tweet , last day python script working fine but today it gives the error
TweetException Failed to parse the Payload
Any suggestion?
consumer_key = "*&...
0
votes
0
answers
72
views
How to retrive 100 tweets from a time period on twitter v2 using python utilising next_token
I am trying to retrieve a total of 5000 tweets using the basic access API. I have been getting less than the 100 tweets asked for using the duplicate check in my code. I want to use the next_token ...
1
vote
1
answer
6k
views
Twitter APIs Error Python: You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only
So, I wrote a code for a Twitter Bot that tweets "YES" on every thursday. However, when i run the code i get the following error:
403 Forbidden
453 - You currently have access to a subset ...
1
vote
0
answers
58
views
Unable to Auth Twitter V2 to access Followers data. I have basic Subscription
Unable to Authenticate using Tweepy for Twitter V2
Unable to get follower data. IF any one used Twitter V2 Basic Version for getting followers details.
Tried with from pytwitter import Api also even ...
0
votes
1
answer
973
views
How to retrieve more than a 100 tweets on twitter API V2 using python
I upgraded my access to Basic, and I am allowed to retrieve 10,000 tweets per month. I am trying to scrape 3000 tweets for a particular key word, my code is attached, but i get an error that the max i ...
0
votes
1
answer
868
views
Extract Tweets for Academic Research
I am planning to create an academic paper and I need to scrape data from Twitter. However, I am unsure of the authenticity of the data gathered through snscrape and can't afford to pay Twitter API. Is ...
0
votes
0
answers
149
views
tweepy.errors.Forbidden: 403 Forbidden despite having a developer account (Free plan)
CODE:
client = tweepy.Client(bearer_token, api_key, api_secret, access_token, access_token_secret )
auth = tweepy.OAuth1UserHandler(api_key, api_secret, access_token, access_token_secret)
api = ...
3
votes
1
answer
1k
views
Problem using tweepy the error 403 Forbidden apeared without making any changes
Hello there thanks for reading my post.
I was using this same code yesterday and it was okay but today stoped working and i got this error:
raise Forbidden(response) tweepy.errors.Forbidden: 403 ...
2
votes
1
answer
165
views
Getting Forbidding error while trying to tweak a sentiment analyses bot
So i was finding older versions of sentiment bots i could tweak and reuse and found this one from 9m ago but its giving me forbiddion error when i try to connect to twiiter api(error is below)
...
0
votes
1
answer
498
views
What is consumer_key and consumer_secret being use in tweepy?
I can't even find any clue about it in Twitter Developer dashboard, I look at the API key and the only word use there 'api_key', 'api_key_secret', 'access_token', 'access_token_secret', 'bearer_token',...
0
votes
1
answer
948
views
How can I fix the '403 Forbidden' error when using tweepy to access the Twitter API?
Something wrong with my tweepy API?
Been trying to access the twitter API using tweepy, but getting the 403 Forbidden error.
Tried the TwitterAPI and tweepy which both did not work.
Researched and ...
2
votes
1
answer
1k
views
Cannot use tweepy on the free version of Twitter API?
I was able to successfully authenticate my access keys and everything - however, I can't do pretty much any action without getting an error saying this is not in my access plan. Twitter says I am ...
3
votes
3
answers
5k
views
Twitter API v2 - Free Version - Getting Follower Numbers - 2023
Does anyone know if it is still possible to collect the number of followers for a given Twitter account using the free version of the Twitter v2 API (after Feb 9th, 2023)?
I tried getting access to ...
1
vote
1
answer
2k
views
Use twitter api on behalf of another twitter account
How can i use twitter api to post tweet on behalf of another account (in my possession) ? I have a developer account on my main twitter account, i created an app and i wanted to use this app to post ...
0
votes
0
answers
326
views
Twitter API authorization issue
I've got the the bearer token, but keep getting a json error:
(401, '{\n "title": "Unauthorized",\n "type": "about:blank",\n "status": 401,\n &...
0
votes
1
answer
65
views
Creating twitter app under the new 2.0 projects
Unexpectedly, I got an email today saying that my (simple and long-lived) twitter app violated terms and conditions. This is must be due to the 2.0 initiative. We can skip the discussion about the ...
-3
votes
1
answer
223
views
How to Increase twitter web rest api endpoints limit for followers
I am using the Twitter web API to scrape some followers. Previously, I was able to obtain around 50,000 followers in a 15-minute window, but now I am only getting 5,000 in that same time frame, and I'...
0
votes
0
answers
91
views
Twitter API - Keyword search with nested list comprehension
I would like to search the text of tweets.
With one keyword it works well. Several are a bit annoying: the code gets long when I use or:
userTweets = [tweet for tweet in userTweets if 'OECD' in tweet['...
0
votes
1
answer
563
views
Twitter API / Tweepy: Retrieve tweets by author id and date/timestamp
I scraped millions of tweets with the Twitter API V2 and in order to publish the data I wanted to replace all data with the tweet id, so that future users can reproduce my dataset.
However I just ...
0
votes
1
answer
131
views
How can I call several user_names in the Twitter API?
I could successfully get the data of a user in Python by get_all_tweets(user_name). Now I would like to retrieve data from several users in the same code.
I tried to copy the same code and append it ...
3
votes
2
answers
2k
views
How do I use Twitter API v2 to retrieve Tweets longer than 280 characters?
Twitter recently allowed verified users to Tweet more than 280 characters, up to 4000. When I use the API to retrieve one of these longer Tweets I don't receive the full text - it's cut off around 280 ...
0
votes
0
answers
231
views
How to search a specific country's tweets with Tweepy client.search_recent_tweets()
y'all. I'm trying to figure out how to sort for a specific country's tweets using search_recent_tweets. I take a country name as input, use pycountry to get the 2-character country code, and then I ...
0
votes
1
answer
1k
views
429 Too many requests error while running a bot that likes tweets using tweepy
I made a twitter bot recently which gives me this error. Sometimes it runs correctly and it shows tweets with specified keywords in the console but other times it also shows the tweet itself but ...
0
votes
1
answer
121
views
Authentication error with twitter like bot in python
Hi Im trying to create a twitter like bot, that likes post with specific hashtags.
But I am getting unauthenticated error even though I am using the right keys.
raise Unauthorized(response) ...
0
votes
1
answer
99
views
How to add username and name columns to pandas dataframe with search_all_tweets lookup in python
I am trying to collect tweets from 2022 using Twitter API. I can record the tweet_fields for the tweets, but I can't figure out how to add columns for the username and name (the user_fields) for each ...
0
votes
1
answer
562
views
Twitter API Redirects After Authorization But Won't Give Me a PIN
I am trying to block a user account with the Twitter API through Python. Here's what my method looks like:
def block_user():
payload = {"target_user_id": "amazon"}
# Get request ...
1
vote
2
answers
313
views
How Does the api.get_retweeter_ids() Actually Work (Tweepy Python)?
I am really new to twitter api, and I've been trying to get a list of IDs of everyone that retweeted a specific tweet.
After several attempts i can't get the 'api.get_retweeter_ids' to get every id. ...
0
votes
0
answers
275
views
Can't add "list:xxxxxxxxxxx" StreamRule to StreamingClient of Twitter API v2
I can't add "list:XXXXXXXXXX" to my rules (I can add other rules though and they work).
What I'm missing?
import tweepy
class TweetPrinter(tweepy.StreamingClient):
def on_tweet(self, ...
1
vote
1
answer
69
views
Getting error why scraping data from Twitter using the API
I was trying to use the function below functions for Twitter data scraping.
tweets_copy = []
for tweet in tqdm(tweets):
tweets_copy.append(tweet)
I am getting the error below:
TweepError: Failed ...
1
vote
1
answer
272
views
How to find how many tweets are extended tweets in Twitter Python with Twitter search API?
I don't know how to count or even find tweets that are extended tweets. I have used Twitter Search API to search for random tweets, but my main problem is that I couldn't find extended tweets from ...
0
votes
0
answers
57
views
How to get images with URL link into a local directory as another column in the dataframe?
I've used tweepy to collect twitter users' info including their public image and that shows up as an url (the img_path column), just wondering how can I get an local path for the image and shows up as ...
0
votes
1
answer
77
views
i want to mass follow twitter accounts but i got error that said i've requested to follow
So i want to mass follow people on Twitter with my account
but im kinda confused because i don't know how to fix the error, like i've requested to follow the "user", so what i want to do is ...
1
vote
1
answer
462
views
Tweepy: filter tweets stream by keywords only
I am interested in retrieving tweet streams about the forth-coming Nigeria's general election. I want all tweets from Nigeria, which contains information about 4 major presidential candidates only (&...
1
vote
0
answers
115
views
Advice on speeding up Twarc / Twitter API follower query
I have an academic research API for Twitter and have been using the Twarc Python library to scrape tweets.
For actual tweet scraping it works really well. However, when scraping the followers of ...
0
votes
1
answer
344
views
Get all retweets with tweet id list
I am trying to get all retweets from tweet_ids list. I have a tweetlist.csv file. I got tweet.id column from this file. I added all tweet id into tweet_ids list. Then I want to get all retweet which ...
0
votes
2
answers
287
views
How to get suspended users or deleted users difference via TwitterApi?
I want to get the records that which user is suspended and which one is deleted, is there any way to get?
from TwitterAPI import TwitterAPI
api = TwitterAPI(consumer_key, consumer_secret, auth_type='...
2
votes
1
answer
1k
views
Get tweets from topics section with Twitter API
I want to get tweets from a specific topic from the topics section. But I couldn't find this on the twitter api page or the tweepy website. how can I get this tweet with tweepy or twitter api? Below ...
2
votes
0
answers
33
views
Twitter bot: Tweets are lost during the rate limit period
The below code is Twitter bot stream API triggered on several rules. Everything is working fine except when the rate limit is hit. The tweets tagged during the rate limit waiting period are lost. How ...
1
vote
2
answers
79
views
How do I delete most keys in a json file using python?
I have a json file with all the data I searched using Twitter API. I only want to keep certain keys in that file and delete the rest of them, but don't know how to do it correctly. I wrote some code ...