Skip to main content

Introduction

Twikit is a Python library that allows you to interact with Twitter’s API through scraping, eliminating the need for official API keys. This makes it accessible to developers who want to build Twitter bots, automation tools, or data collection scripts without dealing with Twitter’s API application process or costs.

What is Twikit?

Twikit is an unofficial Twitter API wrapper that provides a simple, intuitive interface for interacting with Twitter programmatically. By using web scraping techniques, Twikit enables you to access Twitter’s functionality without requiring official API credentials.
Twikit uses scraping techniques to interact with Twitter. While this library is free to use, you should follow Twitter’s terms of service and implement appropriate rate limiting to protect your account.

Key features

Twikit offers comprehensive Twitter functionality through an easy-to-use Python interface:

No API key required

Access Twitter’s features without applying for API access or paying for API tiers

Fully async

Built with async/await support for efficient, non-blocking operations

Comprehensive features

Create tweets, search content, manage DMs, handle media, and more

Free to use

Open source and completely free with no usage limits

What you can do with Twikit

Twikit provides access to a wide range of Twitter functionality:
  • Tweets: Create, delete, search, like, retweet, and reply to tweets
  • Users: Follow/unfollow users, get user information, retrieve followers and following lists
  • Direct Messages: Send and receive DMs, manage group conversations
  • Media: Upload images, videos, and GIFs to tweets and DMs
  • Lists: Create and manage Twitter lists, add/remove members
  • Trends: Retrieve trending topics by location
  • Notifications: Access your notification feed
  • Polls: Create and vote on polls
  • Bookmarks: Manage your saved tweets

Why use Twikit?

No API barriers

Twitter’s official API requires approval and can be expensive for high-volume usage. Twikit removes these barriers by using your regular Twitter account credentials.

Simple authentication

You authenticate with Twikit using your regular Twitter username, email, and password—no OAuth flows or developer portals required.

Active development

Twikit is actively maintained with regular updates to adapt to Twitter’s changes. Join the community on Discord for support and updates.
Because Twikit uses unofficial methods, your account could be suspended if you abuse the library. Always implement rate limiting, avoid suspicious behavior, and follow the guidelines in the Authentication section.

Resources

Requirements

  • Python 3.8 or higher
  • A valid Twitter account
  • Basic understanding of Python async/await syntax

Next steps

Installation

Install Twikit and set up your environment

Quickstart

Get up and running with your first Twikit script

Authentication

Learn how to authenticate safely and protect your account

API Reference

Explore the full API documentation

Build docs developers (and LLMs) love