
Apify
FreeEfficiently scrape social media and e-commerce data.
Free Β· Opens the source repo
What Apify does
Apify is a powerful tool designed for developers and data analysts who need to extract information from various social media platforms and e-commerce sites. By utilizing Apify actors, users can scrape data from popular platforms such as Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps, and Amazon. The skill allows for a code-first approach, enabling users to filter and transform data before it reaches the model, significantly reducing the amount of unnecessary data processed.
The core functionality of Apify revolves around its ability to execute scraping tasks in parallel, which is particularly useful for social listening dashboards and lead generation. For instance, users can chain data from Google Maps into LinkedIn to enrich leads, providing a seamless experience for business intelligence tasks. The TypeScript wrappers included in the skill make it easy to implement custom filtering logic, ensuring that only the most relevant data is retained.
One of the standout features of Apify is its efficiency in token usage. Traditional scraping methods can lead to excessive token consumption, especially when retrieving large datasets. Apify's design allows for filtering at the code level, which can reduce the token footprint from potentially thousands down to just a few hundred, thereby optimizing costs and performance. This is particularly beneficial for tasks that require high precision, such as extracting qualified leads or monitoring social media engagement.
Ideal for developers looking to integrate web scraping into their applications, Apify provides a comprehensive set of actors that cover a wide range of use cases. Whether you are interested in tracking social media trends, gathering competitive intelligence, or generating business leads, Apify offers the tools necessary to achieve these goals efficiently and effectively.
When to use it
Use Apify when you need to efficiently scrape data from social platforms, business directories, or e-commerce sites while minimizing token costs.
When not to use it
This skill is not suitable for operations involving posting or interacting with X/Twitter accounts, or for tasks requiring real-time browser interaction.
What you can build with it
Social Media Monitoring
Track engagement on platforms like Instagram and filter posts based on performance metrics.
Lead Generation
Extract contact information and reviews from Google Maps to identify high-quality business leads.
E-commerce Insights
Scrape product reviews and pricing data from Amazon to analyze market trends.
How to install Apify
View source1. Install with the skills CLI
npx skills add danielmiessler/lifeos/Apify --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by danielmiesslerCustomization
Before executing, check for user customizations at:
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Apify/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
π¨ MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)
You MUST send this notification BEFORE doing anything else when this skill is invoked.
-
Send voice notification:
curl -s -X POST http://localhost:31337/notify \ -H "Content-Type: application/json" \ -d '{"message": "Running the WORKFLOWNAME workflow in the Apify skill to ACTION"}' \ > /dev/null 2>&1 & -
Output text notification:
Running the **WorkflowName** workflow in the **Apify** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Apify - Social Media & Web Scraping
What It Does
Scrapes social platforms, business data, and e-commerce through Apify actors: Instagram, LinkedIn, TikTok, YouTube, Facebook, Google Maps business search, Amazon, and general-purpose web crawling. TypeScript wrappers filter and transform the data in code before any of it reaches the model, so a 100-post scrape costs roughly what 10 posts would. Runs platforms in parallel for social-listening dashboards and chains Google Maps into LinkedIn for lead enrichment.
The Problem
Scraping through a raw MCP dumps every unfiltered result straight into model context β a single Instagram profile with 100 posts burns ~52,000 tokens, most of it noise you'll throw away. You usually want the top 10 posts, the negative reviews from the last week, the qualified leads with an email. Doing that filtering after the data hits the model is too late; the tokens are already spent. Filtering in code first cuts that 52,000 down to ~500.
How It Works
This skill is a file-based MCP β a code-first API wrapper that replaces token-heavy MCP protocol calls. You call an actor wrapper, filter and sort the result in TypeScript, and only the filtered slice reaches model context. That code-before-context step is where the 95-99% token savings come from.
Workflow Routing
| Workflow | Trigger | File |
|---|---|---|
| Update | update Apify skill, refresh actors, actor calls failing unexpectedly, monthly capability check | Workflows/Update.md |
| (inline) | all scrape/lead/crawl requests β scrape Instagram/LinkedIn/TikTok/YouTube/Facebook, Google Maps leads, Amazon reviews, web crawl | Actor wrappers under actors/ (see Actor Reference below) |
π Available Actors
Social Media (5 platforms)
- Instagram (145k users, 4.60β ) - Profiles, posts, hashtags, comments
- LinkedIn (26k users, 4.10β ) - Profiles, jobs, posts
- TikTok (90k users, 4.61β ) - Profiles, videos, hashtags, comments
- YouTube (40k users, 4.40β ) - Channels, videos, comments, search
- Facebook (35k users, 4.56β ) - Posts, groups, comments
Business & Lead Generation
- Google Maps (198k users, 4.76β
) - HIGHEST VALUE!
- Search businesses, extract contacts, reviews, images
- Perfect for lead generation
E-commerce
- Amazon (8k users, 4.97β ) - Products, reviews, pricing
Web Scraping
- Web Scraper (94k users, 4.39β ) - General-purpose, works with ANY website
π Quick Start
Basic Usage Pattern
import { scrapeInstagramProfile, searchGoogleMaps } from 'actors'
// 1. Call the actor wrapper
const profile = await scrapeInstagramProfile({
username: 'target_username',
maxPosts: 50
})
// 2. Filter in code - BEFORE data reaches model!
const viral = profile.latestPosts?.filter(p => p.likesCount > 10000)
// 3. Only filtered results reach model context
console.log(viral) // ~10 posts instead of 50
π Examples by Use Case
Social Media Monitoring
Instagram - Track engagement:
import { scrapeInstagramProfile, scrapeInstagramPosts } from 'actors'
// Get profile with recent posts
const profile = await scrapeInstagramProfile({
username: 'competitor',
maxPosts: 100
})
// Filter in code - only high-performing posts from last 30 days
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
const topRecent = profile.latestPosts
?.filter(p =>
new Date(p.timestamp).getTime() > thirtyDaysAgo &&
p.likesCount > 5000
)
.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// Only 10 posts reach model instead of 100!
LinkedIn - Job search:
import { searchLinkedInJobs } from 'actors'
const jobs = await searchLinkedInJobs({
keywords: 'AI engineer',
location: 'San Francisco',
remote: true,
maxResults: 200
})
// Filter in code - only senior roles at well-funded startups
const topJobs = jobs.filter(j =>
j.seniority?.includes('Senior') &&
parseInt(j.applicants || '0') > 50
)
TikTok - Trend analysis:
import { scrapeTikTokHashtag } from 'actors'
const videos = await scrapeTikTokHashtag({
hashtag: 'ai',
maxResults: 500
})
// Filter in code - only viral content
const viral = videos
.filter(v => v.playCount > 1000000)
.sort((a, b) => b.playCount - a.playCount)
.slice(0, 20)
Lead Generation (Business Intelligence)
Google Maps - Local business leads:
import { searchGoogleMaps } from 'actors'
// Search with contact info extraction
const places = await searchGoogleMaps({
query: 'restaurants in Austin',
maxResults: 500,
includeReviews: true,
maxReviewsPerPlace: 20,
scrapeContactInfo: true // Extracts emails from websites!
})
// Filter in code - only highly-rated with email/phone
const qualifiedLeads = places
.filter(p =>
p.rating >= 4.5 &&
p.reviewsCount >= 100 &&
(p.email || p.phone)
)
.map(p => ({
name: p.name,
rating: p.rating,
reviews: p.reviewsCount,
email: p.email,
phone: p.phone,
website: p.website,
address: p.address
}))
// Export leads - only qualified results!
console.log(`Found ${qualifiedLeads.length} qualified leads`)
Google Maps - Review sentiment analysis:
import { scrapeGoogleMapsReviews } from 'actors'
const reviews = await scrapeGoogleMapsReviews({
placeUrl: 'https://maps.google.com/maps?cid=12345',
maxResults: 1000
})
// Filter in code - analyze sentiment by rating
const recentNegative = reviews
.filter(r => {
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.publishedAtDate).getTime() > thirtyDaysAgo &&
r.text.length > 50
)
})
// Identify common complaints
const complaints = recentNegative.map(r => r.text)
E-commerce & Competitive Intelligence
Amazon - Price monitoring:
import { scrapeAmazonProduct } from 'actors'
const product = await scrapeAmazonProduct({
productUrl: 'https://www.amazon.com/dp/B08L5VT894',
includeReviews: true,
maxReviews: 200
})
// Filter in code - only recent negative reviews
const recentNegative = product.reviews
?.filter(r => {
const weekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.date).getTime() > weekAgo
)
})
console.log(`Price: $${product.price}`)
console.log(`Rating: ${product.rating}/5`)
console.log(`Recent issues: ${recentNegative?.length} complaints`)
Custom Web Scraping
Any Website - Custom extraction:
import { scrapeWebsite } from 'actors'
const products = await scrapeWebsite({
startUrls: ['https://example.com/products'],
linkSelector: 'a.product-link',
maxPagesPerCrawl: 100,
pageFunction: `
async function pageFunction(context) {
const { request, $, log } = context
return {
url: request.url,
title: $('h1.product-title').text(),
price: $('span.price').text(),
inStock: $('.in-stock').length > 0,
description: $('.description').text()
}
}
`
})
// Filter in code - only available products under $100
const affordable = products.filter(p =>
p.inStock &&
parseFloat(p.price.replace('$', '')) < 100
)
π¨ Advanced Patterns
Pattern 1: Multi-Platform Social Listening
import {
scrapeInstagramHashtag,
scrapeTikTokHashtag,
searchYouTube
} from 'actors'
// Run all platforms in parallel
const [instagramPosts, tiktokVideos, youtubeVideos] = await Promise.all([
scrapeInstagramHashtag({ hashtag: 'ai', maxResults: 100 }),
scrapeTikTokHashtag({ hashtag: 'ai', maxResults: 100 }),
searchYouTube({ query: '#ai', maxResults: 100 })
])
// Combine and filter - only viral content across all platforms
const allViral = [
...instagramPosts.filter(p => p.likesCount > 10000),
...tiktokVideos.filter(v => v.playCount > 100000),
...youtubeVideos.filter(v => v.viewsCount > 50000)
]
console.log(`Found ${allViral.length} viral posts across 3 platforms`)
Pattern 2: Lead Enrichment Pipeline
import { searchGoogleMaps, scrapeLinkedInProfile } from 'actors'
// 1. Find businesses on Google Maps
const restaurants = await searchGoogleMaps({
query: 'restaurants in SF',
maxResults: 100,
scrapeContactInfo: true
})
// 2. Filter for qualified leads
const qualified = restaurants.filter(r =>
r.rating >= 4.5 &&
r.email &&
r.reviewsCount >= 50
)
// 3. Enrich with LinkedIn data (if available)
const enriched = await Promise.all(
qualified.map(async (restaurant) => {
// Try to find LinkedIn company page
// ... additional enrichment logic
return restaurant
})
)
Pattern 3: Competitive Analysis Dashboard
import {
scrapeInstagramProfile,
scrapeYouTubeChannel,
scrapeTikTokProfile
} from 'actors'
async function analyzeCompetitor(username: string) {
// Gather data from all platforms
const [instagram, youtube, tiktok] = await Promise.all([
scrapeInstagramProfile({ username, maxPosts: 30 }),
scrapeYouTubeChannel({ channelUrl: `https://youtube.com/@${username}`, maxVideos: 30 }),
scrapeTikTokProfile({ username, maxVideos: 30 })
])
// Calculate engagement metrics in code
return {
username,
instagram: {
followers: instagram.followersCount,
avgLikes: average(instagram.latestPosts?.map(p => p.likesCount) || []),
engagementRate: calculateEngagement(instagram)
},
youtube: {
subscribers: youtube.subscribersCount,
avgViews: average(youtube.videos?.map(v => v.viewsCount) || [])
},
tiktok: {
followers: tiktok.followersCount,
avgPlays: average(tiktok.videos?.map(v => v.playCount) || [])
}
}
}
π° Token Savings Calculator
Example: Instagram profile with 100 posts
MCP Approach:
1. search-actors β 1,000 tokens
2. call-actor β 1,000 tokens
3. get-actor-output β 50,000 tokens (100 unfiltered posts)
TOTAL: ~52,000 tokens
File-Based Approach:
const profile = await scrapeInstagramProfile({
username: 'user',
maxPosts: 100
})
// Filter in code - only top 10 posts
const top = profile.latestPosts
?.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// TOTAL: ~500 tokens (only 10 filtered posts reach model)
Savings: 99% reduction (52,000 β 500 tokens)
π§ Actor Reference
Social Media
scrapeInstagramProfile(input)- Profile + postsscrapeInstagramPosts(input)- Posts from userscrapeInstagramHashtag(input)- Posts by hashtagscrapeInstagramComments(input)- Comments on post
scrapeLinkedInProfile(input)- Profile + experience + emailsearchLinkedInJobs(input)- Job listingsscrapeLinkedInPosts(input)- Posts from profile/company
TikTok
scrapeTikTokProfile(input)- Profile + videosscrapeTikTokHashtag(input)- Videos by hashtagscrapeTikTokComments(input)- Comments on video
YouTube
scrapeYouTubeChannel(input)- Channel + videossearchYouTube(input)- Search videosscrapeYouTubeComments(input)- Comments on video
scrapeFacebookPosts(input)- Posts from pagesscrapeFacebookGroups(input)- Group postsscrapeFacebookComments(input)- Post comments
Business & Lead Generation
Google Maps
searchGoogleMaps(input)- Search places (with contact extraction!)scrapeGoogleMapsPlace(input)- Single place detailsscrapeGoogleMapsReviews(input)- Place reviews
E-commerce
Amazon
scrapeAmazonProduct(input)- Product details + reviewsscrapeAmazonReviews(input)- Product reviews only
Web Scraping
General Web
scrapeWebsite(input)- Custom multi-page crawlingscrapePage(url, pageFunction)- Single page extraction
βοΈ Configuration
Environment Variables:
# Required - Get from https://console.apify.com/account/integrations
APIFY_TOKEN=apify_api_xxxxx...
Actor Run Options:
{
memory: 2048, // MB: 128, 256, 512, 1024, 2048, 4096, 8192
timeout: 300, // seconds
build: 'latest' // or specific build number
}
π― When to Use This vs MCP
Use File-Based (this skill):
- β Need to filter large datasets (>100 results)
- β Want to transform/aggregate data in code
- β Multiple sequential operations
- β Control flow (loops, conditionals)
- β Maximum token efficiency
Use MCP:
- β Simple single operations with small results (<10 items)
- β One-off exploratory queries
- β Don't want to write code
π Links
- Apify Platform: https://apify.com
- Actor Store: https://apify.com/store
- API Docs: https://docs.apify.com/api/v2
Remember: Filter data in code BEFORE returning to model context. This is where the 99% token savings happen!
Gotchas
- Actor selection matters. Each social platform has specific actors β don't use a generic scraper for Instagram when a dedicated Instagram actor exists.
- Rate limits vary by platform and plan. Check actor documentation for limits before running large scrapes.
- Scraped data format varies by actor. Read the actor's output schema before processing results.
Examples
Example 1: Scrape Instagram profile
User: "get the recent posts from this Instagram account"
β Selects Instagram Profile actor
β Runs with target profile URL
β Returns structured post data (text, engagement, dates)
Example 2: LinkedIn company scrape
User: "scrape this company's LinkedIn page"
β Selects LinkedIn Company actor
β Returns company info, employee count, recent posts
Execution Log
After completing any workflow, append a single JSONL entry:
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"Apify","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl
Replace WORKFLOW_USED with the workflow executed, 8_WORD_SUMMARY with a brief input description, and SECONDS with approximate wall-clock time. Log status: "error" if the workflow failed.
Frequently asked questions about Apify
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
