# Social Media Metrics Scraper - Instagram, Facebook, YouTube & X (`zaver.api/universal-social-media-metrics-scraper`) Actor

Scrape social media metrics from Instagram, Facebook, YouTube and X in one Actor. Extract post views, likes, comments, shares, follower counts, profile data, Instagram hashtags and more. Export results to JSON, CSV, Excel or XML, automate with the API, or schedule recurring runs.

- **URL**: https://apify.com/zaver.api/universal-social-media-metrics-scraper.md
- **Developed by:** [Zaver](https://apify.com/zaver.api) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Social Media Metrics Scraper — Instagram, Facebook, YouTube, X

**Instagram hashtag scraper, Instagram profile scraper, Facebook post metrics,
YouTube video stats and X (Twitter) post scraper — in one Actor.** Feed it
usernames, hashtags or post URLs and get clean, structured data back: followers,
views, likes, comments, shares and full engagement metrics. Export to JSON, CSV,
Excel or XML, run it via API, or schedule it.

### What can Social Media Metrics Scraper do?

Built by Zaver. One Actor covers the four platforms most campaigns actually run on. Give it a
target, pick an operation, and you can:

| 📦 What you can extract | ⚙️ Features & integrations |
|---|---|
| 👤 **Profiles** on all four platforms: followers, engagement rate, bio | 🌐 Four platforms in one Actor — no juggling tools |
| 📷 **Posts & reels** from a profile or hashtag, with engagement | 📊 Normalised output — same field names across platforms |
| 💬 **Comments** with author, text, likes and timestamps | ⬇️ Export to JSON, CSV, Excel or XML |
| 👥 **Follower lists** for any public profile | 🦾 API access, webhooks, Node.js & Python SDKs |
| #️⃣ **Hashtag volume** — total post count and trending status | 📅 Schedule runs and monitor them from the console |
| 🎬 **Video metrics** — views, plays, likes, comments, shares | 🤖 LLM-ready output for MCP, Claude, Gemini, ChatGPT |
| 📈 **Cross-platform post metrics** for Instagram, Facebook, YouTube and X | 🔁 Run one operation across many targets in a single run |

Useful for influencer discovery and vetting, campaign performance tracking,
competitor monitoring, trend and hashtag research, brand monitoring, and
audience analysis.

### What data can I scrape?

**Profiles on all four platforms** — follower or subscriber counts, following
and post counts, full name, biography, verified status and profile ID. For
Instagram you also get the engagement rate and average likes, comments and
views across recent posts; for YouTube, lifetime views and average views per
video.

**Instagram posts by hashtag** — captions, media type (image, reel, carousel),
likes, comments, view counts, author, post URL and timestamp, pulled from both
the recent and top feeds so you get fresh content as well as best-performing
content.

**Instagram comments** — comment text, author username, like count and
timestamp, with the parent post reference for joining back to your dataset.

**Instagram followers** — username, full name, user ID, verified and private
status for each follower of a public profile.

**Instagram post and reel metrics** — give it any post, reel or IGTV URL and
get plays and views, likes, comments, caption, media type, duration, paid-
partnership flag, author and publish date for that single post.

**Instagram hashtag volume** — total number of public posts carrying a hashtag,
plus whether Instagram currently flags it as trending. Useful for sizing a tag
before committing budget to it, or for finding less-saturated alternatives.

**Facebook, YouTube and X post metrics** — views and plays, likes and
reactions, comment counts, shares, retweets and quotes, author or channel,
title or caption, publish date and duration. Reaction breakdowns are included
for Facebook; author follower counts are included for X.

**YouTube hashtag posts** — videos and Shorts carrying a hashtag, with title,
channel, view count and URL.

Everything returned is public data. No login, no OAuth, no Business or Creator
account required.

### How much will it cost?

Pay-per-result: **one result equals one scraped item** — a profile, post,
comment, follower or hashtag record.

| Operation | What it returns | Price per 1,000 results |
|---|---|---|
| **Profile metrics** | Followers, engagement rate, average views, bio | **$3.99** |
| **Post metrics** | Views, likes, comments, shares, reactions | **$3.99** |
| **Hashtag scraping** | Posts under a hashtag | **$0.99** |
| **Comments scraping** | Comments with author and like counts | **$0.99** |
| **Followers scraping** | Follower list for a profile | **$0.99** |

You are billed only for results actually delivered. Set a **Results limit** per
target to cap any run.

### How do I use it?

1. **Create** a free Apify account.
2. **Open** Social Media Metrics Scraper in Apify Console.
3. **Choose an operation** — profile details, hashtag posts, comments,
   followers, hashtag volume, or post metrics.
4. **Add your targets** — usernames, hashtags or post URLs, one per line. Use
   **Bulk edit** to paste many at once.
5. **Set a results limit** per target for the list operations.
6. Click **Save & Start**.
7. **Download** the dataset as JSON, CSV, Excel or XML, or pull it through the
   Apify API.

### ⬇️ Input

Pick one operation per run, then supply targets that match it.

| Operation | Platforms | What to put in Targets |
|---|---|---|
| `profile_metrics` | Instagram, Facebook, YouTube, X | `nasa`, or a profile/channel URL |
| `post_metrics` | Instagram, Facebook, YouTube, X | A post, reel or video URL |
| `hashtag_posts` | Instagram, YouTube | `travel` (no `#`) |
| `comments` | Instagram | A post URL |
| `followers` | Instagram | `nasa`, or a profile URL |

Set **Platform** to tell the Actor which network a bare username or hashtag
belongs to. Leave it on **Auto-detect** and it reads the platform from the URL,
falling back to Instagram. Choose **All supported platforms** on a hashtag run
to collect from Instagram and YouTube in one go.

```json
{
  "operation": "hashtag_posts",
  "targets": ["travel", "streetfood"],
  "platform": "all",
  "limit": 100
}
```

| Field | Description |
|---|---|
| `operation` | Which metric set to fetch (see the table above) |
| `targets` | Usernames, hashtags or post URLs to suit the operation |
| `platform` | Which network the targets belong to; `auto` detects it from the URL |
| `limit` | Maximum results per target, for the list operations |

No API keys, proxies or accounts to configure — data sourcing and proxy
infrastructure are handled for you.

Hashtags go in as plain text — `travel`, not `#travel`. Profile targets accept
either a bare username or a full profile URL.

### ⬆️ Output

Results land in a dataset in the **Storage** tab. View as a table, download in
JSON, CSV, Excel or XML, or pull via API. Each operation has its own schema.

#### 👤 Instagram profile

```json
{
  "platform": "instagram",
  "username": "humansofny",
  "user_id": "242598499",
  "full_name": "Humans of New York",
  "followers": 12613771,
  "following": 738,
  "posts": 5863,
  "verified": true,
  "private": false,
  "category": "Digital creator",
  "biography": "New York City, one story at a time.",
  "external_url": "https://bit.ly/4tX4uZt",
  "profile_url": "https://www.instagram.com/humansofny/",
  "posts_sampled": 11,
  "avg_likes": 404563,
  "avg_comments": 2292,
  "engagement_rate": 0.3896
}
```

The same operation returns a matching record for a YouTube channel, Facebook
page or X profile — `followers`, `posts`, `biography` and `verified` are shared
across all four, with `total_views` and `avg_views` added for YouTube and
`following` for X. YouTube publishes subscriber counts rounded (`15.1M`); the
rounded figure is kept in `followers_text` alongside the parsed number.

#### 📷 Posts by hashtag

```json
{
  "platform": "instagram",
  "hashtag": "#streetfood",
  "feed": "recent",
  "post_id": "3970606591439069567",
  "code": "DcabahhjOF_",
  "url": "https://www.instagram.com/p/DcabahhjOF_/",
  "username": "flavorsoflucknow",
  "media_type": "reel",
  "caption": "The best kebabs in the old city …",
  "views": 184203,
  "likes": 12045,
  "comments": 318,
  "taken_at": 1756291200
}
```

#### 💬 Instagram comments

```json
{
  "platform": "instagram",
  "post_code": "DcabahhjOF_",
  "comment_id": "18119325979762265",
  "text": "Adding this to my list!",
  "username": "mr_ventura.j",
  "likes": 3,
  "created_at": 1756294800
}
```

#### 👥 Instagram followers

```json
{
  "platform": "instagram",
  "of_username": "natgeo",
  "username": "aastha.spark",
  "user_id": "57772395873",
  "full_name": "Aastha",
  "verified": false,
  "private": false
}
```

#### 📊 Instagram post / reel metrics

```json
{
  "platform": "instagram",
  "input_url": "https://www.instagram.com/reel/DcjgRwz5P4Z/",
  "status": "ok",
  "post_id": "3973163969841790489",
  "code": "DcjgRwz5P4Z",
  "url": "https://www.instagram.com/p/DcjgRwz5P4Z/",
  "username": "shots.by_kartik",
  "channel": "Kartikey | Editor",
  "media_type": "reel",
  "product_type": "clips",
  "views": 18684,
  "likes": 412,
  "comments": 7,
  "length_seconds": 18,
  "publish_date": "2026-08-27T19:17:32Z",
  "is_paid_partnership": false
}
```

Photos carry no view count, so `views` is omitted on them rather than
reported as zero.

#### #️⃣ Instagram hashtag volume

```json
{
  "platform": "instagram",
  "hashtag": "#cjp",
  "media_count": 2775391,
  "is_trending": true,
  "id": "17841596053075005"
}
```

#### 📈 Post metrics — Facebook, YouTube, X

```json
{
  "platform": "twitter",
  "input_url": "https://x.com/user/status/2084218280777318871",
  "status": "ok",
  "post_id": "2084218280777318871",
  "title": "Dear @Minister, they're filming the act …",
  "channel": "SUDHIR",
  "channel_id": "seriousfunnyguy",
  "view_count": 251620,
  "likes": 7663,
  "comments": 589,
  "shares": 3994,
  "quotes": 159,
  "author_followers": 176817,
  "publish_date": "2026-08-03T10:02:15.000Z",
  "length_seconds": 54
}
```

Facebook records add `play_count` and a `reactions_breakdown`; YouTube records
add `category` and `publish_date`.

#### 🎬 YouTube posts by hashtag

```json
{
  "platform": "YouTube",
  "hashtag": "#travel",
  "feed": "shorts",
  "video_id": "0Qz7fEagHhI",
  "url": "https://www.youtube.com/shorts/0Qz7fEagHhI",
  "channel": "Kichu Bolbo",
  "title": "Sunrise over the old city",
  "views": 526000
}
```

### What can you do with this data?

**🎯 Influencer discovery and vetting** — pull follower counts, engagement and
recent posts for a shortlist of creators, then rank them on real numbers rather
than a media kit. Cross-check the same creator on Instagram and YouTube in one
run.

**📈 Campaign performance tracking** — track every post carrying your campaign
hashtag across Instagram and YouTube, day by day, and measure reach and
engagement as the campaign runs rather than after it.

**🔥 Trend and hashtag research** — check hashtag volume before you commit to
one, find the adjacent tags that are large enough to matter but not saturated,
and watch which are trending.

**🔔 Brand and competitor monitoring** — follow a competitor's hashtag or
profile output, and watch how their engagement moves against yours.

**💬 Audience and sentiment analysis** — pull comments in bulk and run them
through your own classification or LLM pipeline.

### ❓ Frequently Asked Questions

**How do you calculate engagement rate?**
Engagement rate = (average likes + average comments) ÷ followers × 100, measured
across the profile's most recent posts. It is the definition most
influencer-marketing platforms use, so the number is comparable with what you
see elsewhere. The Actor returns `engagement_rate` as a percentage, along with
`avg_likes`, `avg_comments` and `posts_sampled` so you can verify the maths or
recompute it your own way. As a rough guide, 1–3% is typical for mid-sized
accounts and rates fall as follower counts rise.

**How do you calculate average views?**
On Instagram, `avg_views` is the mean play count across recent video posts and
reels — photos are excluded, since Instagram does not count views on them. On
YouTube, `avg_views` is lifetime channel views ÷ total videos, which gives the
average performance of a video on that channel. Use `total_views` if you want
the lifetime figure itself.

**How do I find the engagement rate of an Instagram account?**
Run **Profile metrics** with the username. One result comes back per profile
with follower count, engagement rate and the averages behind it. Pass a list of
usernames to compare a whole shortlist of creators in one run.

**How do I get the view count of a YouTube video or Instagram reel?**
Run **Post metrics** with the video or reel URL. `views` holds the play count,
alongside `likes`, `comments` and duration. It works for Facebook videos and X
posts too, and you can mix URLs from different platforms in one run.

**How many followers does a profile have — can I check in bulk?**
Yes. **Profile metrics** takes a list of usernames or profile URLs and returns
one row each, so you can pull follower counts for hundreds of accounts in a
single run and export them straight to CSV or Google Sheets.

**How do I find the most popular posts for a hashtag?**
Run **Hashtag scraping** with the tag. Instagram results come from both the
recent and top feeds, so you get fresh posts as well as the best-performing
ones, each with likes, comments and view counts you can sort on.

**How do I download Instagram comments to a spreadsheet?**
Run **Comments scraping** with the post URL and a results limit, then use the
CSV or Excel export in the Storage tab. Each row carries the comment text,
author username, like count and timestamp.

**What is a good engagement rate on Instagram?**
It depends on account size. Accounts under 10k followers often see 3–6%,
mid-tier accounts 1–3%, and very large accounts frequently under 1%. Because
this Actor returns the raw averages alongside the rate, you can benchmark a
creator against others of a similar size rather than against a single
industry-wide number.

**Can I track follower growth over time?**
Yes — schedule a **Profile metrics** run daily or weekly and each run appends a
new dataset. Comparing follower counts across runs gives you a growth curve,
and the same approach works for view counts on a set of posts.

**Can I scrape social media data without an API key?**
Yes. Data sourcing and proxies are handled inside the Actor, so there is no
token to obtain, no app to register and no login. You supply targets, and the
Actor returns the data.

**Can I get the view and like count of one specific Instagram reel?**
Yes — use **Post metrics** with the reel or post URL. The same operation
accepts Facebook, YouTube and X links, so you can mix post URLs from all four
platforms in a single run.

**How is the engagement rate calculated?**
(Average likes + average comments) across the profile's recent posts, divided
by follower count, as a percentage — the standard definition, so it is
comparable with what influencer-marketing tools report. The number of posts
sampled is returned in `posts_sampled`.

**Can I use this as an Instagram hashtag scraper and a Facebook post scraper in one run?**
One operation per run, but you can pass many targets to it, and every operation
spans its supported platforms — so one `profile_metrics` run can mix Instagram,
Facebook, YouTube and X profile URLs. Chain runs, or use scheduling, to cover
several operations.

**Can I scrape private profiles?**
No. Only public data is returned. Private accounts yield profile-level fields
only, with `private: true`.

**How many results can I get?**
Set `options.limit` per target. Platform feeds have their own natural ceilings —
a YouTube hashtag feed returns roughly 850 items per tab, and Instagram hashtag
feeds stop when they run out of fresh posts.

**Why do metrics sometimes differ slightly from what I see on the platform?**
Counts move constantly and platforms cache aggressively, so a figure captured at
scrape time can differ from what the app shows a moment later. Large accounts
are also displayed rounded in the UI while the API returns exact values.

**Do I need an Instagram account or login?**
No. Only public data is collected, with no login or OAuth.

**Why did a Facebook or YouTube post return no data?**
The post may be removed, private, age-restricted, or region-locked. The record
comes back with a `status` field explaining which.

**Can I integrate this with other services?**
Yes. Apify supports Zapier, Make, n8n, Slack, Google Sheets, Google Drive,
Airbyte, GitHub and more, plus webhooks that fire when a run finishes.

**Can I use it with the Apify API?**
Yes. Run the Actor, fetch datasets and monitor runs programmatically through the
Apify API, with official Node.js and Python SDKs.

**Is it legal to scrape social media?**
This Actor collects only data that is publicly available, and does not access
private content. Some public data may still count as personal data under
regulations such as GDPR, so only scrape it where you have a legitimate reason.
See Apify's guidance on the legality of web scraping.

***

Built and maintained by **Zaver**. For support, feature requests or custom data
needs, open an issue on this Actor.

# Actor input Schema

## `operation` (type: `string`):

What to fetch. Premium operations are billed at $2.60 per 1,000 results; standard at $0.99.

## `targets` (type: `array`):

Profile URLs or usernames, post URLs, or hashtags — whichever the operation takes. One per line.

## `platform` (type: `string`):

Which platform the targets belong to. 'Auto-detect' reads it from the URL and falls back to Instagram for bare usernames and hashtags.

## `limit` (type: `integer`):

Maximum results per target for the list operations (hashtag, comments, followers). You are billed per result returned.

## `options` (type: `object`):

Optional: delay, workers, feeds, tab. Leave empty unless you need them.

## Actor input object example

```json
{
  "operation": "profile_metrics",
  "targets": [
    "nasa"
  ],
  "platform": "auto",
  "limit": 100,
  "options": {}
}
```

# Actor output Schema

## `results` (type: `string`):

Every record produced by this run — profiles, posts, comments, followers or hashtag stats, depending on the operation. One dataset item per result.

## `resultsCsv` (type: `string`):

The same records as a CSV download, ready for Excel or Sheets.

## `runSummary` (type: `string`):

Counts for the run: requests made, results returned, errors, and a per-operation breakdown.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "targets": [
        "nasa"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaver.api/universal-social-media-metrics-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "targets": ["nasa"] }

# Run the Actor and wait for it to finish
run = client.actor("zaver.api/universal-social-media-metrics-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targets": [
    "nasa"
  ]
}' |
apify call zaver.api/universal-social-media-metrics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zaver.api/universal-social-media-metrics-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uQLSApAcGg0zm6Wg9/builds/taVbRMzhKAf9rVcv9/openapi.json
