twitter / communitynotes

Documentation and source code powering Twitter's Community Notes
https://twitter.github.io/communitynotes
Apache License 2.0
1.47k stars 213 forks source link

Retrieving the User Who Posted a Tweet Using Only the Tweet ID #262

Closed Liumucan closed 2 months ago

Liumucan commented 2 months ago

Recently, I've been interested in analyzing the Community Notes data. When I tried to analyze the Notes table, I found that it only contains the tweetId without the ID of the user who posted the note. While I can search for the ID to retrieve the user ID or use the format 'https://x.com/user/status/tweetId' to find out which user posted the note (by replacing 'user' with the actual username), this approach becomes impractical when I need to retrieve the users for a large volume of tweets.

Is there a more efficient solution to this issue? I'm looking for a way to retrieve the user information for each tweet without having to manually process the URL or search for the user ID. Thanks.

jbaxter commented 2 months ago

You could use the paid X API to retrieve this info. It's not part of the Community Notes dataset available for free.

Liumucan commented 2 months ago

Thank you for your response. I've noticed that many tweet IDs have been deleted by users. Is it possible to retrieve the user IDs for those deleted tweets using the Twitter API? Thanks.