social-scraping
npx skills add https://github.com/merit-systems/agentcash-skills --skill social-scraping
Agent 安装分布
Skill 文档
Social Media Scraping with StableSocial
Scrape profiles, posts, comments, followers, and search across TikTok, Instagram, X/Twitter, Facebook, Reddit, and LinkedIn. All endpoints cost $0.06 per call.
Setup
See rules/getting-started.md for installation and wallet setup.
How It Works: Async Two-Step Flow
Every request follows a trigger-then-poll pattern:
Step 1: Trigger (paid, $0.06)
npx agentcash fetch https://stablesocial.dev/api/x/profile -m POST -b '{"handle": "elonmusk"}'
Returns 202 Accepted with a JWT token:
{"token": "eyJhbGciOiJIUzI1NiIs..."}
Step 2: Poll (free)
npx agentcash fetch "https://stablesocial.dev/api/jobs?token=eyJhbGciOiJIUzI1NiIs..."
{"status": "pending"}â poll again in 3-5 seconds{"status": "finished", "data": {...}}â data is ready{"status": "failed", "error": "..."}â collection failed (not charged)
Tokens expire after 30 minutes. Jobs typically finish in 5-60 seconds.
Quick Reference â TikTok
| Task | Endpoint | Depends On |
|---|---|---|
| Get profile | https://stablesocial.dev/api/tiktok/profile |
â |
| Get posts | https://stablesocial.dev/api/tiktok/posts |
profile |
| Post comments | https://stablesocial.dev/api/tiktok/post-comments |
posts |
| Comment replies | https://stablesocial.dev/api/tiktok/comment-replies |
post-comments |
| Followers | https://stablesocial.dev/api/tiktok/followers |
profile |
| Following | https://stablesocial.dev/api/tiktok/following |
profile |
| Search posts | https://stablesocial.dev/api/tiktok/search |
â |
| Search hashtag | https://stablesocial.dev/api/tiktok/search-hashtag |
â |
| Search profiles | https://stablesocial.dev/api/tiktok/search-profiles |
â |
| Search by music | https://stablesocial.dev/api/tiktok/search-music |
â |
Input: {"handle": "username"} for profile/posts/followers. {"query": "keyword"} for search.
Quick Reference â Instagram
| Task | Endpoint | Depends On |
|---|---|---|
| Get profile | https://stablesocial.dev/api/instagram/profile |
â |
| Get posts | https://stablesocial.dev/api/instagram/posts |
profile |
| Post comments | https://stablesocial.dev/api/instagram/post-comments |
posts |
| Comment replies | https://stablesocial.dev/api/instagram/comment-replies |
post-comments |
| Followers | https://stablesocial.dev/api/instagram/followers |
profile |
| Following | https://stablesocial.dev/api/instagram/following |
profile |
| Stories | https://stablesocial.dev/api/instagram/stories |
profile |
| Highlights | https://stablesocial.dev/api/instagram/highlights |
profile |
| Search posts | https://stablesocial.dev/api/instagram/search |
â |
| Search tags | https://stablesocial.dev/api/instagram/search-tags |
â |
Input: {"handle": "username"} for profile/posts/followers. {"query": "keyword"} for search.
Quick Reference â X/Twitter
| Task | Endpoint | Depends On |
|---|---|---|
| Get profile | https://stablesocial.dev/api/x/profile |
â |
| Get posts | https://stablesocial.dev/api/x/posts |
profile |
| Post replies | https://stablesocial.dev/api/x/post-replies |
posts |
| Post retweets | https://stablesocial.dev/api/x/post-retweets |
posts |
| Quote tweets | https://stablesocial.dev/api/x/post-quotes |
posts |
| Followers | https://stablesocial.dev/api/x/followers |
profile |
| Following | https://stablesocial.dev/api/x/following |
profile |
| Search posts | https://stablesocial.dev/api/x/search |
â |
| Search profiles | https://stablesocial.dev/api/x/search-profiles |
â |
Input: {"handle": "username"} for profile/posts/followers. {"query": "keyword"} for search.
Quick Reference â Facebook
| Task | Endpoint | Depends On |
|---|---|---|
| Get profile | https://stablesocial.dev/api/facebook/profile |
â |
| Get posts | https://stablesocial.dev/api/facebook/posts |
profile |
| Post comments | https://stablesocial.dev/api/facebook/post-comments |
posts |
| Comment replies | https://stablesocial.dev/api/facebook/comment-replies |
post-comments |
| Followers | https://stablesocial.dev/api/facebook/followers |
profile |
| Following | https://stablesocial.dev/api/facebook/following |
profile |
| Search posts | https://stablesocial.dev/api/facebook/search |
â |
| Search people | https://stablesocial.dev/api/facebook/search-people |
â |
| Search pages | https://stablesocial.dev/api/facebook/search-pages |
â |
| Search groups | https://stablesocial.dev/api/facebook/search-groups |
â |
Input: {"handle": "username"} or {"profile_id": "id"} for profile. {"query": "keyword"} for search.
Quick Reference â Reddit
| Task | Endpoint | Depends On |
|---|---|---|
| Get post | https://stablesocial.dev/api/reddit/post |
â |
| Post comments | https://stablesocial.dev/api/reddit/post-comments |
post |
| Get comment | https://stablesocial.dev/api/reddit/comment |
â |
| Search posts | https://stablesocial.dev/api/reddit/search |
â |
| Search profiles | https://stablesocial.dev/api/reddit/search-profiles |
â |
| Subreddit posts | https://stablesocial.dev/api/reddit/subreddit |
â |
Input: {"post_id": "id"} for post details. {"query": "keyword"} for search. {"subreddit": "name"} for subreddit.
Quick Reference â LinkedIn
| Task | Endpoint | Depends On |
|---|---|---|
| Member profile | https://stablesocial.dev/api/linkedin/profile |
â |
| Member posts | https://stablesocial.dev/api/linkedin/posts |
profile |
| Company profile | https://stablesocial.dev/api/linkedin/company |
â |
| Company posts | https://stablesocial.dev/api/linkedin/company-posts |
company |
| Post comments | https://stablesocial.dev/api/linkedin/post-comments |
posts |
| Comment replies | https://stablesocial.dev/api/linkedin/comment-replies |
post-comments |
| Post reactors | https://stablesocial.dev/api/linkedin/post-reactors |
posts |
| Search posts | https://stablesocial.dev/api/linkedin/search-posts |
â |
| Search jobs | https://stablesocial.dev/api/linkedin/search-jobs |
â |
| Search members | https://stablesocial.dev/api/linkedin/search-members |
â |
| Search companies | https://stablesocial.dev/api/linkedin/search-companies |
â |
| Search ads | https://stablesocial.dev/api/linkedin/search-ads |
â |
Input: {"member_id": "username"} for profile. {"company_id": "company"} for company. {"query": "keyword"} for search.
Data Dependencies
Some endpoints require a prior collection. For example, to get followers you must first trigger the profile:
# 1. Trigger profile collection
npx agentcash fetch https://stablesocial.dev/api/instagram/profile -m POST -b '{"handle": "natgeo"}'
# Poll until finished...
# 2. Now fetch followers (depends on profile)
npx agentcash fetch https://stablesocial.dev/api/instagram/followers -m POST -b '{"handle": "natgeo"}'
# Poll until finished...
Pagination
When results are paginated, the response includes page_info.has_next_page and a cursor. Pass the cursor to fetch the next page (each page is a new paid POST):
npx agentcash fetch https://stablesocial.dev/api/tiktok/followers -m POST -b '{"handle": "username", "cursor": "abc123"}'
Key Parameters
handle/profile_id/member_id/company_idâ target accountmax_page_sizeâ results per page (default varies, max 100)max_followersâ how many followers to collect (default 500)max_posts/max_activities/max_resultsâ item limits (default 50)cursorâ pagination cursor from previous responseorder_byâ sort order:date_desc,date_asc,id_descactivity_typeâ LinkedIn:posts,articles,documents,media,commentsreaction_typeâ LinkedIn:LIKE,CELEBRATE,SUPPORT,LOVE,INSIGHTFUL,FUNNY
Workflows
Profile Deep Dive
- (Optional) Check balance:
npx agentcash wallet info - Trigger profile collection
- Poll until finished
- Trigger posts collection
- Poll until finished
- Optionally fetch comments, followers
Cross-Platform Search
- Search same keyword across multiple platforms
- Compare results and synthesize findings
npx agentcash fetch https://stablesocial.dev/api/x/search -m POST -b '{"query": "brand name"}'
npx agentcash fetch https://stablesocial.dev/api/instagram/search -m POST -b '{"query": "brand name"}'
npx agentcash fetch https://stablesocial.dev/api/tiktok/search -m POST -b '{"query": "brand name"}'
Influencer Analysis
- Get profile on target platform
- Fetch recent posts with engagement
- Get follower list for audience analysis
- Check comments for sentiment
Competitive Intelligence
- Search LinkedIn for competitor company
- Get company posts and reactions
- Search for competitor ads
- Monitor employee activity
npx agentcash fetch https://stablesocial.dev/api/linkedin/company -m POST -b '{"company_id": "competitor"}'
npx agentcash fetch https://stablesocial.dev/api/linkedin/search-ads -m POST -b '{"query": "competitor name"}'
Cost Estimation
All endpoints are $0.06 per trigger call. Polling is free.
| Task | Calls | Cost |
|---|---|---|
| Single profile | 1 | $0.06 |
| Profile + posts | 2 | $0.12 |
| Full profile deep dive | 4-6 | $0.24-0.36 |
| Cross-platform search (3 platforms) | 3 | $0.18 |
| Competitor analysis | 4-8 | $0.24-0.48 |
vs social-intelligence Skill
The social-intelligence skill uses X/Twitter (Grok) and Reddit on stableenrich.dev ($0.02/call, synchronous). Use it for quick X/Twitter keyword searches and Reddit post lookups.
Use social-scraping (this skill) when you need:
- TikTok, Instagram, Facebook, or LinkedIn data
- Profiles, followers, following â not just search
- Comments, replies, reactions on posts
- LinkedIn jobs, ads, company data
- Cross-platform research