# ViewStats.com YouTube Scraper for analytics and metrics data (`deltaspider/viewstats-scraper`) Actor

A high-performance web scraper for extracting comprehensive YouTube creator analytics from ViewStats.com

- **URL**: https://apify.com/deltaspider/viewstats-scraper.md
- **Developed by:** [delta spider](https://apify.com/deltaspider) (community)
- **Categories:** Automation, Social media, Videos
- **Stats:** 50 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 🔍 ViewStats.com YouTube Scraper for all analytics and metrics data

A high-performance web scraper for extracting comprehensive YouTube creator analytics from [ViewStats.com](https://viewstats.com)

Whether you're a marketer, researcher, creator, or developer, this tool helps you gather detailed performance data and insights about content creators — perfect for trend analysis, competitive research, and data-driven decision making.

### ✨ Key Features

#### ✅ Super simple to get started

- All you need is one YouTube handle (e.g., @mrbeast), and then choose what metrics you want

#### ✅ Comprehensive Creator Analytics

- Scrape creators using their youtube handles (e.g., @mrbeast)
- Retrieves detailed performance metrics: subscribers, views, video counts, etc...
- Access historical data and growth trends

#### ✅ Deep Performance Insights

- Extracts **7-day** (daily), **28-day** (daily), **90-day** (weekly), **365-day** (weekly), and **all-time** (weekly) statistics
- Detailed video performance for both long-form and short-form content
- Revenue estimates and monetization insights

#### ✅ Advanced Analytics

- Channel averages and performance benchmarks
- Future projection data and milestone tracking
- Similar channel recommendations
- Long vs short content performance comparison

#### ✅ Bulk Processing & High Performance

- Process multiple creators in a single run
- Optimized for speed with concurrent request handling
- Built-in retry mechanisms for reliability

#### ✅ Structured Data Output

- Clean, structured JSON output
- Ready for analysis, dashboards, or data pipelines
- Comprehensive data points for each creator

---

### 🗂 Use Cases

- **Marketers & Agencies**  
  Track creators’ influence across platforms, compare performance, and identify potential collaborators.

- **Influencer Managers**  
  Vet creators with up-to-date stats, audience growth, and engagement history.

- **Analysts & Developers**  
  Access structured datasets for machine learning, trend analysis, or automation.

- **Content Creators**  
  Benchmark your own growth against competitors and analyze trends over time.

- **Academics & Researchers**  
  Use longitudinal creator data to study platform dynamics and digital influence.

---

### 🔖 Output Example

**Note:** The examples below show the contents of individual key-value store files, not the merged dataset output.

#### Basic stats (always included)
```json
{
  "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "displayName": "MrBeast",
  "handle": "mrbeast",
  "subscriberCount": 416000000,
  "viewCount": 91305786557,
  "videoCount": 887,
  "verified": true,
  "totalFollowing": 0,
  "country": "US",
  "bannerUrl": "https://yt3.googleusercontent.com/5KWiriZZ_KEoEdSMFTJKj2M6vR_XSiRZeQ-ix0cvG3TGZuGoi8sfAjrSiZAP0GzXBkmF8ZGytw",
  "avatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
  "globalViewsRanking": 12,
  "globalSubscribersRanking": 1,
  "countrySubscriberRanking": 1,
  "categorySubscriberRanking": 1,
  "vpv90": 110584326,
  "recentTests": 0,
  "totalTests": 0
}
````

#### 1 week stats (optional)

```json
{
  "stats7": [
    {
    "id": "e3265b521d9a4b98a27a20261b2d8212",
    "insertedAt": "2025-07-20T06:01:50Z",
    "subscriberCount": 414000000,
    "subscriberCountDelta": 0,
    "viewCount": 90555283959,
    "viewCountDelta": 87928649,
    "videoCount": 885,
    "videoCountDelta": 1,
    "date": "2025-07-19",
    "estimatedLowRevenueUsd": 96443,
    "estimatedHighRevenueUsd": 268127,
    "estimatedRevenueUsd": 182285,
    "events": [
      {
        "id": "pzBi1nwDn8U",
        "date": "2025-07-19",
        "duration": "long_upload",
        "type": "long_upload",
        "viewCount": 108894629,
        "title": "Survive 100 Days Trapped In A Private Jet, Keep It"
      }
    ],
    "totalUploads": 1,
    "dayOfWeek": "SATURDAY",
    "isToday": false
  },
  {
    "id": "eba3b98e0f704ddf87939552d7b19884",
    "insertedAt": "2025-07-21T06:02:09Z",
    "subscriberCount": 415000000,
    "subscriberCountDelta": 1000000,
    "viewCount": 90742945408,
    "viewCountDelta": 187661449,
    "videoCount": 886,
    "videoCountDelta": 1,
    "date": "2025-07-20",
    "estimatedLowRevenueUsd": 115101,
    "estimatedHighRevenueUsd": 321019,
    "estimatedRevenueUsd": 218060,
    "events": [
      {
        "id": "EiFcNbXBqeo",
        "date": "2025-07-20",
        "duration": "short_upload",
        "type": "short_upload",
        "viewCount": 90179325,
        "title": "Jet Engine vs Human for $10k"
      }
    ],
    "totalUploads": 1,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
    "..."
  ]
}
```

#### 1 Month stats (optional)

```json
{
  "stats28": [
  {
    "id": "7fd0cb0c2bf448aba518b77e2ee49b30",
    "insertedAt": "2025-06-29T01:06:45Z",
    "subscriberCount": 409000000,
    "subscriberCountDelta": 0,
    "viewCount": 87974365398,
    "viewCountDelta": 91224879,
    "videoCount": 880,
    "videoCountDelta": 0,
    "date": "2025-06-28",
    "estimatedLowRevenueUsd": 32232,
    "estimatedHighRevenueUsd": 90371,
    "estimatedRevenueUsd": 61301,
    "dayOfWeek": "SATURDAY",
    "isToday": false
  },
  {
    "id": "5dde9eb4299c40169a837de8af8a2425",
    "insertedAt": "2025-06-30T06:57:58Z",
    "subscriberCount": 410000000,
    "subscriberCountDelta": 1000000,
    "viewCount": 88187244376,
    "viewCountDelta": 212878978,
    "videoCount": 880,
    "videoCountDelta": 0,
    "date": "2025-06-29",
    "estimatedLowRevenueUsd": 70232,
    "estimatedHighRevenueUsd": 197091,
    "estimatedRevenueUsd": 133661,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
    "..."
  ]
}
```

#### 3 Month stats (optional)

```json
{
  "stats90": [
  {
    "id": "5870a9479cd94a74b0cb2910a1f1592b",
    "insertedAt": "2025-05-05T06:01:56Z",
    "subscriberCount": 391000000,
    "subscriberCountDelta": 0,
    "viewCount": 81744583480,
    "viewCountDelta": 0,
    "videoCount": 867,
    "videoCountDelta": 0,
    "date": "2025-04-28",
    "estimatedLowRevenueUsd": 0,
    "estimatedHighRevenueUsd": 0,
    "estimatedRevenueUsd": 0,
    "events": [
      {
        "id": "3dxksf0CzS8",
        "date": "2025-05-02",
        "duration": "short_upload",
        "type": "short_upload",
        "viewCount": 216878179,
        "title": "World's Fastest Robbers"
      }
    ],
    "totalUploads": 2,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
  {
    "id": "b8c9e03e113241f495f45e105f7e2ac2",
    "insertedAt": "2025-05-12T06:02:14Z",
    "subscriberCount": 393000000,
    "subscriberCountDelta": 2000000,
    "viewCount": 82348643560,
    "viewCountDelta": 604060080,
    "videoCount": 870,
    "videoCountDelta": 3,
    "date": "2025-05-05",
    "estimatedLowRevenueUsd": 215568,
    "estimatedHighRevenueUsd": 604332,
    "estimatedRevenueUsd": 409950,
    "events": [
      {
        "id": "-4GmbBoYQjE",
        "date": "2025-05-10",
        "duration": "long_upload",
        "type": "long_upload",
        "viewCount": 103733875,
        "title": "I Survived 100 Hours In An Ancient Temple"
      }
    ],
    "totalUploads": 3,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
    "..."
  ]
}
```

#### 1 Year stats (optional)

```json
{
  "stats365": [
  {
    "id": "794131b733114a25b4b434ef12fd61e3",
    "insertedAt": "2024-08-05T06:05:42Z",
    "subscriberCount": 308000000,
    "subscriberCountDelta": 0,
    "viewCount": 56111548058,
    "viewCountDelta": 0,
    "videoCount": 809,
    "videoCountDelta": 0,
    "date": "2024-07-29",
    "estimatedLowRevenueUsd": 0,
    "estimatedHighRevenueUsd": 0,
    "estimatedRevenueUsd": 0,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
  {
    "id": "2d0e8888a36e4bdcb70d7b25819591c9",
    "insertedAt": "2024-08-12T06:05:17Z",
    "subscriberCount": 309000000,
    "subscriberCountDelta": 1000000,
    "viewCount": 56523602970,
    "viewCountDelta": 412054912,
    "videoCount": 809,
    "videoCountDelta": 0,
    "date": "2024-08-05",
    "estimatedLowRevenueUsd": 534837,
    "estimatedHighRevenueUsd": 1486006,
    "estimatedRevenueUsd": 1010421,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
    "..."
  ]
}
```

#### All-time stats (optional)

```json
{
  "statsAllTime": [
  {
    "id": "1279197419764e1582e8837916c75ce2",
    "insertedAt": "2022-08-01T00:00:00Z",
    "subscriberCount": 100000000,
    "subscriberCountDelta": 0,
    "viewCount": 16659274203,
    "viewCountDelta": 0,
    "videoCount": 725,
    "videoCountDelta": 0,
    "date": "2022-07-25",
    "estimatedLowRevenueUsd": 0,
    "estimatedHighRevenueUsd": 0,
    "estimatedRevenueUsd": 0,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
  {
    "id": "29d0638dd0ef48539efa2030f203d555",
    "insertedAt": "2022-08-08T00:00:00Z",
    "subscriberCount": 101000000,
    "subscriberCountDelta": 1000000,
    "viewCount": 16812529246,
    "viewCountDelta": 153255043,
    "videoCount": 726,
    "videoCountDelta": 1,
    "date": "2022-08-01",
    "estimatedLowRevenueUsd": 0,
    "estimatedHighRevenueUsd": 0,
    "estimatedRevenueUsd": 0,
    "dayOfWeek": "SUNDAY",
    "isToday": false
  },
    "..."
  ]
}
```

#### Long-form Videos (optional)

```json
[
  {
    "id": "pzBi1nwDn8U",
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "channelName": "MrBeast",
    "channelAvatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
    "title": "Survive 100 Days Trapped In A Private Jet, Keep It",
    "description": "Spending that much time in a jet is crazy\n10 people will win $10,000...",
    "viewCount": 108894629,
    "likeCount": 3014390,
    "commentCount": 39797,
    "uploadDate": "2025-07-19T16:00:01Z",
    "duration": 1983,
    "shorts": false,
    "latestThumbnail": {
      "id": "76dad300eab8499885d4b88cd3fd334c",
      "insertedAt": "2025-07-19T19:04:33Z",
      "imageUrl": "https://storage.googleapis.com/vs-img/..."
    },
    "outlierScore": 1.649729293711722,
    "averageViews": 64879542
  },
  {
    "id": "FWAdfuPpLOc",
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "channelName": "MrBeast",
    "channelAvatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
    "title": "World's Fastest Car Vs Cheetah!",
    "description": "I still can't believe we got all these animals for this...",
    "viewCount": 125818640,
    "likeCount": 2991983,
    "commentCount": 42667,
    "uploadDate": "2025-07-05T16:00:01Z",
    "duration": 1237,
    "shorts": false,
    "latestThumbnail": {
      "id": "7cdc0ca5c7924b7b911dd916e874eb19",
      "insertedAt": "2025-07-17T17:08:17Z",
      "imageUrl": "https://storage.googleapis.com/vs-img/..."
    },
    "outlierScore": 1.431067427632046,
    "averageViews": 87493337
  },
  "..."
]
```

#### Short-form Videos (optional)

```json
[
  {
    "id": "lQz5aqjZ3lQ",
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "channelName": "MrBeast",
    "channelAvatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
    "title": "Find This Briefcase, Win $10,000",
    "description": "",
    "viewCount": 32833749,
    "likeCount": 1452132,
    "commentCount": 6453,
    "uploadDate": "2025-07-25T16:00:02Z",
    "duration": 67,
    "shorts": true,
    "latestThumbnail": {
      "id": "202b062f76b84949afb63d0e5dfbc107",
      "insertedAt": "2025-07-25T17:47:49Z",
      "imageUrl": "https://storage.googleapis.com/vs-img/..."
    },
    "outlierScore": 0.579888663903534,
    "averageViews": 4501775
  },
  {
    "id": "EiFcNbXBqeo",
    "channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
    "channelName": "MrBeast",
    "channelAvatarUrl": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
    "title": "Jet Engine vs Human for $10k",
    "description": "",
    "viewCount": 90179325,
    "likeCount": 1508595,
    "commentCount": 5184,
    "uploadDate": "2025-07-20T16:00:01Z",
    "duration": 24,
    "shorts": true,
    "latestThumbnail": {
      "id": "ec74d8d570564952ae92d558b90d0986",
      "insertedAt": "2025-07-20T17:17:35Z",
      "imageUrl": "https://storage.googleapis.com/vs-img/..."
    },
    "outlierScore": 1.2092510291740755,
    "averageViews": 72340168
  },
  "..."
]
```

#### Averages over several periods (optional)

```json
{
  "averages": {
  "daily": {
    "viewsAverage": 116776088,
    "estimatedRevenueLowUsd": 70187,
    "estimatedRevenueHighUsd": 195784,
    "subsAverage": 233333
  },
  "weekly": {
    "viewsAverage": 817432616,
    "estimatedRevenueLowUsd": 491315,
    "estimatedRevenueHighUsd": 1370486,
    "subsAverage": 1633331
  },
  "monthly": {
    "viewsAverage": 3503282654,
    "estimatedRevenueLowUsd": 2105637,
    "estimatedRevenueHighUsd": 5873510,
    "subsAverage": 7000000
  },
  "yearly": {
    "viewsAverage": 38737745688,
    "estimatedRevenueLowUsd": 23283201,
    "estimatedRevenueHighUsd": 64946659,
    "subsAverage": 130000000
  },
    "uploadFrequency": 8
  }
}
```

#### Future projections (optional)

```json
{
  "viewProjectionList": [
    {
      "date": "2025-09-26",
      "viewCount": 98914033333
    },
    {
      "date": "2025-11-26",
      "viewCount": 101213606393
    },
    "..."
  ],
  "subProjectionList": [
    {
      "date": "2025-09-26",
      "subscribers": 439506782
    },
    {
      "date": "2025-11-26",
      "subscribers": 446558816
    },
    "..."
  ],
  "milestonesList": {
    "viewMilestoneList": [
      {
        "views": 92000000000,
        "days": 8
      },
      {
        "views": 93000000000,
        "days": 18
      },
      "..."
    ],
    "subMilestoneList": [
      {
        "subs": 417000000,
        "days": 4
      },
      {
        "subs": 418000000,
        "days": 7
      },
      "..."
    ]
  }
}
```

#### Long-form vs short-form videos

```json
{
  "longsVsShorts": {
  "weekly": {
    "videos": 3,
    "shorts": 2,
    "longs": 1,
    "views": 922905744,
    "longViews": 338775668,
    "shortViews": 584130075
  },
  "monthly": {
    "videos": 7,
    "shorts": 5,
    "longs": 2,
    "views": 3545322953,
    "longViews": 1029756959,
    "shortViews": 2515565993
  },
  "ninetyDays": {
    "videos": 24,
    "shorts": 17,
    "longs": 7,
    "views": 10788634937,
    "longViews": 2782458019,
    "shortViews": 8006176917
  },
  "yearly": {
    "videos": 79,
    "shorts": 58,
    "longs": 21,
    "views": 36013522562,
    "longViews": 9680134555,
    "shortViews": 26333388006
  },
  "allTime": {
    "videos": 898,
    "shorts": 113,
    "longs": 785,
    "views": 91305786557,
    "longViews": 47133773121,
    "shortViews": 44172013435
    }
  }
}
```

#### Stats and trends over several periods (optional)

```json
{
  "infoCards": {
  "weekly": {
    "views": 838431247,
    "viewsDelta": 195441831,
    "subscribers": 2000000,
    "subscribersDelta": 1000000,
    "estimatedRevenueLowUsd": 819539,
    "estimatedRevenueHighUsd": 2279577,
    "estimatedRevenueDelta": 650285
  },
  "monthly": {
    "views": 3422646038,
    "viewsDelta": 215161197,
    "subscribers": 7000000,
    "subscribersDelta": -3000000,
    "estimatedRevenueLowUsd": 2657257,
    "estimatedRevenueHighUsd": 7399919,
    "estimatedRevenueDelta": 992095
  },
  "quarterly": {
    "views": 9561203077,
    "viewsDelta": 241397815,
    "subscribers": 25000000,
    "subscribersDelta": -8000000,
    "estimatedRevenueLowUsd": 6560609,
    "estimatedRevenueHighUsd": 18283633,
    "estimatedRevenueDelta": 1165168
  },
  "yearly": {
    "views": 35194238499,
    "viewsDelta": 8904462054,
    "subscribers": 108000000,
    "subscribersDelta": -27000000,
    "estimatedRevenueLowUsd": 25281077,
    "estimatedRevenueHighUsd": 70435035,
    "estimatedRevenueDelta": -11175050
  },
  "allTime": {
    "views": 91305786557,
    "viewsDelta": 0,
    "subscribers": 416000000,
    "subscribersDelta": 0,
    "estimatedRevenueLowUsd": 117553829,
    "estimatedRevenueHighUsd": 326623459,
    "estimatedRevenueDelta": 0
    }
  }
}
```

#### Similar channels

```json
{
  "similar": [
  {
    "channel": {
      "id": "UCIPPMRA040LQr5QPyJEbmXA",
      "displayName": "MrBeast Gaming",
      "handle": "mrbeastgaming",
      "subscriberCount": 48400000,
      "viewCount": 9129151251,
      "verified": false,
      "totalFollowing": 0,
      "country": "https://flagcdn.com/h240/us.png",
      "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_lMiSL6eHqg2dVxvll6mVMeXo1qVak4TZ4_7mEWdobRRCk=s800-c-k-c0x00ffffff-no-rj",
      "recentTests": 0,
      "totalTests": 0
    },
    "subscriberCount": 48400000,
    "subscriberCountDelta": 0,
    "viewCount": 9129151251,
    "viewCountDelta": 0,
    "videoCount": 148,
    "videoCountDelta": 0,
    "similarity": 90.14199877568466
  },
  {
    "channel": {
      "id": "UCwIWAbIeu0xI0ReKWOcw3eg",
      "displayName": "Unspeakable",
      "handle": "unspeakable",
      "subscriberCount": 19000000,
      "viewCount": 11548237998,
      "verified": false,
      "totalFollowing": 0,
      "country": "https://flagcdn.com/h240/us.png",
      "avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_l9fWjJ_HbQgKpYTpi5Y21Cwow2-m0OBsxwzXyf6CE28ro=s800-c-k-c0x00ffffff-no-rj",
      "recentTests": 0,
      "totalTests": 0
    },
    "subscriberCount": 19000000,
    "subscriberCountDelta": 0,
    "viewCount": 11548237998,
    "viewCountDelta": 0,
    "videoCount": 1057,
    "videoCountDelta": 0,
    "similarity": 87.85321811555053
  },
    "..."
  ]
}
```

### 🚀 Getting Started

#### Input Configuration

```json
{
  "youtube_handles": ["@mrbeast", "@pewdiepie"],
  "scrape_longs": true,
  "scrape_shorts": true,
  "scrape_about": false,
  "scrape_averages": true,
  "scrape_7_days": false,
  "scrape_28_days": true,
  "scrape_90_days": false,
  "scrape_365_days": true,
  "scrape_all_time": false,
  "scrape_similar": true,
  "scrape_info_cards": false,
  "scrape_longs_vs_shorts": true,
  "scrape_projections": true,
  "max_longs": 40,
  "max_shorts": 40
}
```

#### Configuration Options

- **youtube\_handles**: \[Required] Array of creator handles (e.g., "@mrbeast")
- **scrape\_longs**: Scrape long videos stats (default: false)
- **scrape\_shorts**: Scrape short videos stats (default: false)
- **scrape\_about**: Scrape about stats (default: false)
- **scrape\_averages**: Scrape channel averages stats (default: false)
- **scrape\_7\_days**: Scrape 7 days stats with daily granularity (default: false)
- **scrape\_28\_days**: Scrape 28 days stats with daily granularity (default: false)
- **scrape\_90\_days**: Scrape 3 months stats with weekly granularity (default: false)
- **scrape\_365\_days**: Scrape 1 year stats with weekly granularity (default: false)
- **scrape\_all\_time**: Scrape all-time stats with weekly granularity (default: false)
- **scrape\_similar**: Scrape similar channels (default: false)
- **scrape\_info\_cards**: Scrape info cards (default: false)
- **scrape\_longs\_vs\_shorts**: Scrape longs vs shorts stats (default: false)
- **scrape\_projections**: Scrape future projections stats (default: false)
- **max\_longs**: Maximum number of long videos to scrape when scrape\_longs is enabled (default: 40, minimum: 1)
- **max\_shorts**: Maximum number of short videos to scrape when scrape\_shorts is enabled (default: 40, minimum: 1)

# Actor input Schema

## `youtube_handles` (type: `array`):

Creators to scrape

## `scrape_7_days` (type: `boolean`):

Scrape 7 days stats

## `scrape_28_days` (type: `boolean`):

Scrape 28 days stats

## `scrape_90_days` (type: `boolean`):

Scrape 3 months stats

## `scrape_365_days` (type: `boolean`):

Scrape 365 days stats

## `scrape_all_time` (type: `boolean`):

Scrape all-time stats

## `scrape_longs` (type: `boolean`):

Scrape long videos stats

## `scrape_shorts` (type: `boolean`):

Scrape short videos stats

## `scrape_about` (type: `boolean`):

Scrape about me stats

## `scrape_averages` (type: `boolean`):

Scrape averages stats

## `scrape_info_cards` (type: `boolean`):

Scrape info cards

## `scrape_longs_vs_shorts` (type: `boolean`):

Scrape longs vs shorts stats

## `scrape_projections` (type: `boolean`):

Scrape future projections stats

## `scrape_similar` (type: `boolean`):

Scrape similar channels

## `max_longs` (type: `integer`):

Maximum number of videos longs to scrape

## `max_shorts` (type: `integer`):

Maximum number of videos shorts to scrape

## Actor input object example

```json
{
  "youtube_handles": [
    "@mrbeast"
  ],
  "scrape_7_days": false,
  "scrape_28_days": false,
  "scrape_90_days": false,
  "scrape_365_days": false,
  "scrape_all_time": false,
  "scrape_longs": false,
  "scrape_shorts": false,
  "scrape_about": false,
  "scrape_averages": false,
  "scrape_info_cards": false,
  "scrape_longs_vs_shorts": false,
  "scrape_projections": false,
  "scrape_similar": false,
  "max_longs": 40,
  "max_shorts": 40
}
```

# 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 = {
    "youtube_handles": [
        "@mrbeast"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("deltaspider/viewstats-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 = { "youtube_handles": ["@mrbeast"] }

# Run the Actor and wait for it to finish
run = client.actor("deltaspider/viewstats-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "youtube_handles": [
    "@mrbeast"
  ]
}' |
apify call deltaspider/viewstats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=deltaspider/viewstats-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ViewStats.com YouTube Scraper for analytics and metrics data",
        "description": "A high-performance web scraper for extracting comprehensive YouTube creator analytics from ViewStats.com",
        "version": "0.0",
        "x-build-id": "OsAQGV2AHAPH8jCNS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/deltaspider~viewstats-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-deltaspider-viewstats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/deltaspider~viewstats-scraper/runs": {
            "post": {
                "operationId": "runs-sync-deltaspider-viewstats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/deltaspider~viewstats-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-deltaspider-viewstats-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "youtube_handles"
                ],
                "properties": {
                    "youtube_handles": {
                        "title": "Creator YouTube handles",
                        "type": "array",
                        "description": "Creators to scrape",
                        "items": {
                            "type": "string"
                        }
                    },
                    "scrape_7_days": {
                        "title": "Scrape 7 days stats (daily)",
                        "type": "boolean",
                        "description": "Scrape 7 days stats",
                        "default": false
                    },
                    "scrape_28_days": {
                        "title": "Scrape 28 days stats (daily)",
                        "type": "boolean",
                        "description": "Scrape 28 days stats",
                        "default": false
                    },
                    "scrape_90_days": {
                        "title": "Scrape 3 months stats (weekly)",
                        "type": "boolean",
                        "description": "Scrape 3 months stats",
                        "default": false
                    },
                    "scrape_365_days": {
                        "title": "Scrape 1 year stats (weekly)",
                        "type": "boolean",
                        "description": "Scrape 365 days stats",
                        "default": false
                    },
                    "scrape_all_time": {
                        "title": "Scrape all-time stats (weekly)",
                        "type": "boolean",
                        "description": "Scrape all-time stats",
                        "default": false
                    },
                    "scrape_longs": {
                        "title": "Scrape long videos stats",
                        "type": "boolean",
                        "description": "Scrape long videos stats",
                        "default": false
                    },
                    "scrape_shorts": {
                        "title": "Scrape short videos stats",
                        "type": "boolean",
                        "description": "Scrape short videos stats",
                        "default": false
                    },
                    "scrape_about": {
                        "title": "Scrape about stats",
                        "type": "boolean",
                        "description": "Scrape about me stats",
                        "default": false
                    },
                    "scrape_averages": {
                        "title": "Scrape averages stats",
                        "type": "boolean",
                        "description": "Scrape averages stats",
                        "default": false
                    },
                    "scrape_info_cards": {
                        "title": "Scrape info cards",
                        "type": "boolean",
                        "description": "Scrape info cards",
                        "default": false
                    },
                    "scrape_longs_vs_shorts": {
                        "title": "Scrape longs vs shorts stats",
                        "type": "boolean",
                        "description": "Scrape longs vs shorts stats",
                        "default": false
                    },
                    "scrape_projections": {
                        "title": "Scrape future projections stats",
                        "type": "boolean",
                        "description": "Scrape future projections stats",
                        "default": false
                    },
                    "scrape_similar": {
                        "title": "Scrape similar channels",
                        "type": "boolean",
                        "description": "Scrape similar channels",
                        "default": false
                    },
                    "max_longs": {
                        "title": "Maximum number of long videos to scrape (if checked above)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of videos longs to scrape",
                        "default": 40
                    },
                    "max_shorts": {
                        "title": "Maximum number of short videos to scrape (if checked above)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of videos shorts to scrape",
                        "default": 40
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
