B
BotWitter
ホームプランブログ変更履歴
BotWitter

Automate your Twitter (X) growth with intelligent tools. Schedule posts, manage multiple accounts, engage with your audience, and scale your social media presence effectively.

サポート: support@botwitter.com

製品

  • 機能
  • 料金
  • APIドキュメント
  • 変更履歴

リソース

  • ブログ
  • よくある質問
  • サポート
  • 利用規約

© 2026 BotWitter. 全著作権所有。

Twitter成長のために ❤️ で作成
Blogtutorials
tutorials

Twitter Scraping & Data Collection: Complete API Guide for BotWitter

Learn how to scrape Twitter data using BotWitter's powerful API. Collect user profiles, tweets, followers, search by hashtags, and build data-driven automation strategies.

Jan 13, 2026
10 min read
8 views
Share this article

Table of Contents

Data is the foundation of effective Twitter automation. Whether you're targeting specific audiences, analyzing competitors, or building engagement lists, BotWitter's Data Fetcher API gives you powerful scraping capabilities.

In this guide, you'll learn how to collect user profiles, scrape tweets, search hashtags, and retrieve follower/following lists using BotWitter's built-in API.

Data Collection Use Cases

Competitor Analysis

Scrape competitor tweets and engagement metrics to understand what content performs best.

Lead Generation

Find users interested in specific topics by searching hashtags and collecting follower lists.

Trend Monitoring

Track hashtags and keywords to spot emerging trends in your niche.

Engagement Targeting

Build lists of active users to target with follows, likes, and replies.

Fetching User Information

Get detailed profile information for any Twitter user by username:

# Get user profile by username

GET /api/v1/data-fetcher/user/{username}/info

Available User Data

Profile Info

  • id - Unique Twitter ID
  • username - Handle (@name)
  • name - Display name
  • bio/description - Profile bio
  • location - Location text
  • profile_image_url - Avatar
  • profile_banner_url - Banner

Metrics & Status

  • followers_count - Follower count
  • following_count - Following count
  • tweet_count - Total tweets
  • is_blue_verified - X Premium
  • verified - Legacy verified
  • protected_account - Private
  • can_dm - DM availability
Example: GET /api/v1/data-fetcher/user/elonmusk/info returns Elon Musk's complete profile with 231M+ followers, verification status, and more.

Scraping Tweets

Collect tweets from specific users or get details about individual tweets:

# User tweets by username

GET /api/v1/data-fetcher/user/{username}/tweets-by-username?limit=20

# User tweets by ID

GET /api/v1/data-fetcher/user/{userId}/tweets?limit=20

# Tweets AND replies

GET /api/v1/data-fetcher/user/{userId}/tweets-and-replies?limit=20

# Single tweet details

GET /api/v1/data-fetcher/tweet/{tweetId}

# Quote tweets of a tweet

GET /api/v1/data-fetcher/tweet/{tweetId}/quotes?limit=20

Tweet Data Structure

Content

  • id - Tweet ID
  • text - Tweet content
  • created_at - Timestamp
  • url - Tweet URL
  • lang - Language
  • source - Posted from

Engagement

  • like_count
  • retweet_count
  • reply_count
  • quote_count
  • view_count
  • favorited - You liked
  • retweeted - You RT'd

Metadata

  • is_retweet
  • is_quote
  • is_reply
  • hashtags - Array
  • mentions - Array
  • author - User object

Search Tweets

Search for tweets by hashtag or text query. Perfect for finding trending content and target users.

Hashtag Search

Search tweets containing a specific hashtag:

GET /data-fetcher/search/tag/{tag}

Example: /search/tag/crypto

Text Search

Search tweets containing specific keywords:

GET /data-fetcher/search/text?query=...

Example: ?query=AI tools

Search Parameters

limit Number of tweets to return (1-100, default 20)
product Latest (recent tweets) or Top (popular tweets)
Tip: Use product=Latest for fresh content and active users. Use product=Top for high-engagement tweets.

Follower & Following Lists

Retrieve follower and following lists for your accounts. Great for building target lists and analyzing audience.

# Get followers of your account

GET /api/v1/accounts/{id}/followers?limit=100

# Get accounts you're following

GET /api/v1/accounts/{id}/following?limit=100

User Data in Lists

Each user in the list includes:

id username name bio followers_count following_count tweet_count is_blue_verified following followed_by

Timeline Data

Access your account's home timeline and your own tweets:

# Home timeline (tweets from people you follow)

GET /api/v1/accounts/{id}/home-timeline?count=20

# Your own tweets and replies

GET /api/v1/accounts/{id}/tweets-and-replies?limit=20

Use Case: Home timeline is perfect for farming - find tweets to engage with from accounts you follow. Your own tweets help track what content you've posted.

Tweet Validation

Verify if a tweet exists and is accessible before taking action:

# Validate tweet ID

GET /api/v1/data-fetcher/tweet/{tweetId}/validate

Validation Results

Valid

Tweet exists

Invalid

Bad format

NotFound

Deleted

Protected

Private account

Suspended

Author banned

Cache System

BotWitter caches scraped data to reduce API calls and improve performance:

View Cache Stats

GET /data-fetcher/cache/stats

Returns cache size, duration, and cooldown settings.

Clear Cache

POST /data-fetcher/cache/clear

Force fresh data on next request.

Cache Duration: Default cache lasts 5 minutes (300 seconds). Cooldown prevents rapid repeated requests to the same endpoint.

API Examples

cURL Examples

# Get user info

curl http://localhost:8080/api/v1/data-fetcher/user/elonmusk/info

# Search #crypto tweets (latest 50)

curl "http://localhost:8080/api/v1/data-fetcher/search/tag/crypto?limit=50&product=Latest"

# Get account followers

curl http://localhost:8080/api/v1/accounts/1/followers?limit=100

Quick Recap

  • User Info: Full profile data including followers, bio, verification
  • Tweet Scraping: User tweets, single tweet, quotes, tweets+replies
  • Search: Hashtag and text search with Latest/Top sorting
  • Lists: Followers and following for your accounts
  • Timeline: Home feed and your own tweets
  • Validation: Check if tweets exist before actions
  • Cache: Automatic caching with manual clear option
#Tutorials#Api#Data Collection
ブログに戻る

More Articles

guides

What is BotWitter? The Complete Guide to Twitter/X Automation

Discover BotWitter - the enterprise-grade Twitter/X automation platform. Learn about its powerful features, use cases, and how it can transform your social media strategy.

Jan 23, 2026