Skip to main content
Rilo’s SocialScrapingLibrary provides tools to scrape public data from major social media platforms. Perfect for social listening, content monitoring, and data collection.

Overview

SocialScrapingLibrary supports:
  • Reddit: Posts, comments, subreddits
  • Twitter/X: Tweets, profiles, searches
  • LinkedIn: Public profiles and posts
  • Instagram: Posts, profiles, reels, hashtags
  • TikTok: Videos, profiles, hashtags
  • YouTube: Videos, channels, comments
  • Facebook: Posts, profiles, groups
Social scraping tools can only access public data. Private accounts, DMs, and restricted content are not accessible. This is for privacy and terms-of-service compliance.

Supported Platforms

Reddit

Tool: RedditScraperTool from SocialScrapingLibrary Capabilities:
  • Get best/hot/new/rising/controversial posts from subreddits
  • Search posts by keyword with filters
  • Get post comments with sorting
  • Filter by upvotes, time, and more
  • Pagination support
Available Methods: Example: Get Best Posts
Example: Search with Filters
Sorting Options:
  • relevance - Most relevant (default for search)
  • hot - Currently trending
  • top - Highest voted
  • new - Most recent
  • comments - Most commented
Time Filters:
  • hour, day, week, month, year, all
Important Notes:
  • Subreddits: Use “r/subreddit” format (e.g., “r/python”)
  • Pagination: Check has_more, use after cursor for next page
  • Rate limits: Reddit API has rate limits, cache is used automatically

Twitter/X

Tool: TwitterScraperTool from SocialScrapingLibrary Capabilities:
  • Get tweets from profiles with filtering
  • Advanced search with operators
  • Get tweet details and replies
  • Get trending topics
  • Track hashtags
  • Profile information
Available Methods: Twitter Search Operators: Example: Get User Tweets
Example: Advanced Search
Example: Track Hashtag
Example: Get Trending Topics
Example: Paginated Replies
Important Notes:
  • Usernames: WITHOUT the @ symbol (use “OpenAI” not “@OpenAI”)
  • Hashtags in config: WITHOUT # symbol (use “AI” not “#AI”)
  • Hashtags in search query: WITH # symbol (use “#AI” in query string)
  • Pagination: Check has_next_page, use next_cursor for subsequent pages
Limitations:
  • Public tweets only
  • Rate limits apply (cached automatically)
  • Trending topics: Returns ~30 topics per country
  • Tweet replies: Pagination required for large threads

LinkedIn

Capabilities:
  • Get public profile information
  • Enrich company data
  • Search profiles
  • Get profile posts
Example:

Instagram

Capabilities:
  • Get profile posts and reels
  • Search reels by keyword
  • Get post comments
  • Search hashtags and locations
Example:

TikTok

Capabilities:
  • Get profile videos
  • Search videos by hashtag or keyword
  • Get video details and comments
  • Fetch profile information
Example:

YouTube

Capabilities:
  • Get video metadata and transcripts
  • Fetch channel info and videos
  • Search videos by keyword
  • Get video comments
Example:

Facebook

Capabilities:
  • Get posts from profiles/pages
  • Get group posts with sorting
  • Get post comments
  • Fetch profile/page information
Example:

Public Data Only

All social scraping tools can only access public data. This is a hard limitation for privacy and terms-of-service compliance.

What You Can Access

✅ Public posts and tweets ✅ Public profiles and pages ✅ Public comments and replies ✅ Public groups and communities ✅ Public hashtags and searches

What You Cannot Access

❌ Private accounts ❌ Direct messages (DMs) ❌ Restricted content ❌ Private groups ❌ Content requiring login

Caching

Social scraping tools use caching to reduce API calls and improve performance.

Cache TTL

Different methods have different cache durations:

Bypassing Cache

Force fresh data when needed:
Use bypass_cache=True when you need real-time data, such as checking for new posts immediately after they’re published.

Batch Operations

Use batch methods for multiple items - significantly faster than sequential calls.

Example: Batch Profile Info

Available Batch Methods

Most tools support batch operations:
  • get_profile_info_batch
  • get_profile_posts_batch
  • get_post_details_batch
  • get_post_comments_batch

Pagination

Many methods support pagination for large result sets.

Example: Paginated Posts

Use Cases

Social Listening

Monitor mentions, hashtags, and keywords across platforms.

Content Research

Research trending content and topics.

Competitor Analysis

Track competitor posts and engagement.

Lead Generation

Find potential leads from public profiles.

Best Practices

Don’t fetch 100 items just to use 5. Use reasonable limits based on actual needs.
Always use batch methods when processing multiple items. They’re much faster.
Don’t bypass cache unless you need real-time data. Caching improves performance.
Use pagination for large result sets instead of high limits.

Limitations

Platform-Specific Limits

Each platform has its own limitations:
  • Instagram: Comments endpoint returns max ~300 entries
  • Facebook: Maximum 100 items per request
  • Reddit: Rate limits apply to API calls
  • Twitter: API rate limits and restrictions

General Limitations

  • Public data only: Cannot access private content
  • No authentication: Cannot use logged-in features
  • Rate limits: Platform-specific rate limits apply
  • Terms of service: Must comply with each platform’s ToS
Always comply with each platform’s Terms of Service. Rilo provides tools, but you’re responsible for how you use them.

Troubleshooting

  • Verify the profile/account is public
  • Check that the URL/username is correct
  • Ensure you’re not hitting rate limits
  • Try bypassing cache
  • Reduce request frequency
  • Use caching to avoid repeated calls
  • Implement retry logic with backoff
  • Verify the content is public
  • Check account privacy settings
  • Use public alternatives if available

Social scraping is a powerful feature for data collection and monitoring. Always respect platform terms of service and user privacy.