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

pythonbotclientpython3scraperscrapingsearchtwitterwrappertwitter-apitwitter-scraperscrape
スター成長
スター
4.6k
フォーク
560
週間成長
+8
Issue
135
2k4k
2024年1月2024年11月2025年10月2026年8月
成果物PyPI
README

[!NOTE] https://github.com/d60/twitter_login (under development)

Number of GitHub stars GitHub commit activity Version Tweet Discord BuyMeACoffee

[日本語] [中文]

Twikit

A Simple Twitter API Scraper

You can use functions such as posting or searching for tweets without an API key using this library.

🔵 Discord

[!NOTE] Released twikit_grok an extension for using Grok AI with Twikit.
For more details, visit: https://github.com/d60/twikit_grok.

Features

No API Key Required

This library uses scraping and does not require an API key.

Free

This library is free to use.

Functionality

By using Twikit, you can access functionalities such as the following:

  • Create tweets

  • Search tweets

  • Retrieve trending topics

  • etc...

Installing


pip install twikit

Quick Example

Define a client and log in to the account.

import asyncio
from twikit import Client

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

# Initialize client
client = Client('en-US')

async def main():
    await client.login(
        auth_info_1=USERNAME,
        auth_info_2=EMAIL,
        password=PASSWORD,
        cookies_file='cookies.json'
    )

asyncio.run(main())

Create a tweet with media attached.

# Upload media files and obtain media_ids
media_ids = [
    await client.upload_media('media1.jpg'),
    await client.upload_media('media2.jpg')
]

# Create a tweet with the provided text and attached media
await client.create_tweet(
    text='Example Tweet',
    media_ids=media_ids
)

Search the latest tweets based on a keyword

tweets = await client.search_tweet('python', 'Latest')

for tweet in tweets:
    print(
        tweet.user.name,
        tweet.text,
        tweet.created_at
    )

Retrieve user tweets

tweets = await client.get_user_tweets('123456', 'Tweets')

for tweet in tweets:
    print(tweet.text)

Send a dm

await client.send_dm('123456789', 'Hello')

Get trends

await client.get_trends('trending')

More Examples: examples

Contributing

If you encounter any bugs or issues, please report them on issues.

If you find this library useful, consider starring this repository⭐️

関連リポジトリ
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

PythonPyPIinterviewOtherprogrammingdevelopment
368.8k58.3k
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

PythonPyPIawesomeOtherawesomepython
awesome-python.com
319.4k28.7k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPItutorialMIT Licensetutorialproject
282.7k36.2k
TheAlgorithms/Python

All Algorithms implemented in Python

PythonPyPIinterviewMIT Licensepythonalgorithm
thealgorithms.github.io/Python/
224.4k51k
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

C++Apache License 2.0tensorflowmachine-learning
tensorflow.org
199.3k76.3k
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

PythonPyPIcliThe Unlicenseyoutube-dlpython
discord.gg/H5MNcFW63r
189.9k16.5k
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
187.2k46k
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

interviewalgorithmleetcode
cyc2018.xyz
185.9k50.8k
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

PythonPyPIawesomegithubhellogithub
hellogithub.com
175.5k12.7k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
165k34.5k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmskillOtheraigpt
dify.ai
155.1k24.5k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIlibraryMIT Licenseaianthropic
docs.langchain.com/langchain/
146k24.4k