I just pull 7thousand Twiiter user’s tweet, but I cost 70 thousand request!
how do we calculate the request?
could we borrow some request from Twitter Official ?

1 Like

What exact endpoint are you calling and with what code and parameters?

Hi IgorBrigadir, Thanks for your reply.
I used three endpoint like these:
kol_p_url = ‘I cannot post a link so here I replaced the url /2/users/by?usernames=%s&user.fields=created_at,public_metrics,username’%(pid)

flwing_url = “I cannot post a link so here I replaced the url 2/users/%s/following?max_results=1000&user.fields=id,created_at,name,username,public_metrics”%(puid) ##I only read 3 uid here

url = “I cannot post a link so here I replaced the url /users/%s/tweets?expansions=entities.mentions.username&tweet.fields=id,created_at,entities,public_metrics,conversation_id&user.fields=created_at,name,username,entities”%(puid) ##there are 7000+ userid id in a list consist of puids, can I save some requests by concat the uid into one string per each 100 userid? how can I do that as I know how to concat the string into one which I have done when I trying to concat the 20 usernames into just one string, but I tried the same method to concat the userid into one, I failed.
besides, does the parameters I filled here cost more requests? as I just need the mention,hashtag,cashtag and tweet that including one of mention,hashtag,cashtag, I one tweet has not any of the three content, then I needn’t pull it. and I one tweet has any of the three content( I mean : hashtag,cashtag and mention),then I need pull the data from public metrics.

is there any way to save requests for me?
Thanks IgorBrigadir!!!


It’s hard to tell exactly because you’re using multiple endpoints, but each endpoint is a separate rate limit. You should be able to get more calls if you use both user auth (access token) and app only auth (bearer token) together.

See here for more:

Concatenating multiple user IDs won’t work for all endpoints you have, looking up followers for example has to be one by one, but you can request up to 100 user objects at a time with the user lookup endpoint.

1 Like