Skip to content
forked from d60/twikit

Twitter API Scraper | Without an API key | Twitter Internal API | Free | Twitter scraper | Twitter Bot

License

Notifications You must be signed in to change notification settings

PleasureDAO/twikit

 
 

Repository files navigation

Number of GitHub stars GitHub commit activity Version Tweet Discord BuyMeACoffee

Twikit

simple API wrapper to interact with twitter's unofficial API. You can log in to Twitter using your account username, email address and password and use most features on Twitter, such as posting and retrieving tweets, liking and following users.

If you have any questions, please ask on Discord.

Features

No API Key Required

The library uses an unofficial API and therefore does not require an API key.

Completely Free

The service is entirely free to use.

Both Synchronous and Asynchronous Support

Whether you prefer synchronous or asynchronous programming, Twikit supports both, providing flexibility for different use cases.

Functionality

This library allows you to perform various Twitter-related actions, including:

  • Create tweets
  • Search tweets
  • Retrieve trending topics
  • etc...

Installing

pip install twikit

Quick Example

Define a client and log in to the account.

from twikit import Client

USERNAME = 'example_user'
EMAIL = 'email@example.com'
PASSWORD = 'password0000'

# Initialize client
client = Client('en-US')
# Login to the service with provided user credentials
client.login(
    auth_info_1=USERNAME ,
    auth_info_2=EMAIL,
    password=PASSWORD
)

Create a tweet with media attached.

# Upload media files and obtain media_ids
media_ids = [
    client.upload_media('media1.jpg'),
    client.upload_media('media2.jpg')
]
# Create a tweet with the provided text and attached media
client.create_tweet(
    text='Example Tweet',
    media_ids=media_ids
)

More Examples: examples

Contributing

I would like to hear your thoughts and suggestions. If you have any features you'd like to see added or encounter any issues, please let me know in the issues section.

Additionally, if you find this library useful, I would appreciate it if you would star this repository or share this library⭐! Thank you very much!

About

Twitter API Scraper | Without an API key | Twitter Internal API | Free | Twitter scraper | Twitter Bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%