# Social Insight Scraper

Social Media Insights Scraper is an Apify Actor that extracts insights from YouTube, Instagram, and TikTok, gathering likes, comments, and engagement data to help track performance and refine content strategies. 🚀

## Actor Statistics

- Total users: 82
- Monthly users: 23
- Runs succeeded: 100.00%
- Categories: Lead generation, Social media, Automation

## Pricing

Pay per event

## Input Schema

- **proxyConfiguration** (type: object): Configure your proxy settings
- **input** (type: array): An array of objects with url, inputId and publishedDate fields.

## API example

## Social Insight Scraper

- **OpenAPI Version:** `3.1.1`
- **API Version:** `0.0`

Social Media Insights Scraper is an Apify Actor that extracts insights from YouTube, Instagram, and TikTok, gathering likes, comments, and engagement data to help track performance and refine content strategies. 🚀

### Servers

- **URL:** `https://api.apify.com/v2`

### Operations

#### Executes an Actor, waits for its completion, and returns Actor's dataset items in response.

- **Method:** `POST`
- **Path:** `/acts/insiteco~social-insight-scraper/run-sync-get-dataset-items`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`input` (required)**

  `array` — An array of objects with url, inputId and publishedDate fields.

  **Items:**

  - **`url` (required)**

    `string`, format: `uri`

- **`proxyConfiguration`**

  `object`, default: `{"useApifyProxy":true}` — Configure your proxy settings

**Example:**

```
{
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "input": [
    {
      "url": ""
    }
  ]
}
```

##### Responses

###### Status: 200 OK

#### Executes an Actor and returns information about the initiated run in response.

- **Method:** `POST`
- **Path:** `/acts/insiteco~social-insight-scraper/runs`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`input` (required)**

  `array` — An array of objects with url, inputId and publishedDate fields.

  **Items:**

  - **`url` (required)**

    `string`, format: `uri`

- **`proxyConfiguration`**

  `object`, default: `{"useApifyProxy":true}` — Configure your proxy settings

**Example:**

```
{
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "input": [
    {
      "url": ""
    }
  ]
}
```

##### Responses

###### Status: 200 OK

\####### Content-Type: application/json

- **`data`**

  `object`

  - **`actId`**

    `string`

  - **`buildId`**

    `string`

  - **`buildNumber`**

    `string`

  - **`containerUrl`**

    `string`

  - **`defaultDatasetId`**

    `string`

  - **`defaultKeyValueStoreId`**

    `string`

  - **`defaultRequestQueueId`**

    `string`

  - **`finishedAt`**

    `string`, format: `date-time`

  - **`id`**

    `string`

  - **`meta`**

    `object`

    - **`origin`**

      `string`

    - **`userAgent`**

      `string`

  - **`options`**

    `object`

    - **`build`**

      `string`

    - **`diskMbytes`**

      `integer`

    - **`memoryMbytes`**

      `integer`

    - **`timeoutSecs`**

      `integer`

  - **`startedAt`**

    `string`, format: `date-time`

  - **`stats`**

    `object`

    - **`computeUnits`**

      `integer`

    - **`inputBodyLen`**

      `integer`

    - **`rebootCount`**

      `integer`

    - **`restartCount`**

      `integer`

    - **`resurrectCount`**

      `integer`

  - **`status`**

    `string`

  - **`usage`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `integer`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`usageTotalUsd`**

    `number`

  - **`usageUsd`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `number`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`userId`**

    `string`

**Example:**

```
{
  "data": {
    "id": "",
    "actId": "",
    "userId": "",
    "startedAt": "2025-01-08T00:00:00.000Z",
    "finishedAt": "2025-01-08T00:00:00.000Z",
    "status": "READY",
    "meta": {
      "origin": "API",
      "userAgent": ""
    },
    "stats": {
      "inputBodyLen": 2000,
      "rebootCount": 0,
      "restartCount": 0,
      "resurrectCount": 0,
      "computeUnits": 0
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 1024,
      "diskMbytes": 2048
    },
    "buildId": "",
    "defaultKeyValueStoreId": "",
    "defaultDatasetId": "",
    "defaultRequestQueueId": "",
    "buildNumber": "1.0.0",
    "containerUrl": "",
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 1,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    },
    "usageTotalUsd": 0.00005,
    "usageUsd": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 0.00005,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    }
  }
}
```

#### Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.

- **Method:** `POST`
- **Path:** `/acts/insiteco~social-insight-scraper/run-sync`
- **Tags:** Run Actor

##### Request Body

###### Content-Type: application/json

- **`input` (required)**

  `array` — An array of objects with url, inputId and publishedDate fields.

  **Items:**

  - **`url` (required)**

    `string`, format: `uri`

- **`proxyConfiguration`**

  `object`, default: `{"useApifyProxy":true}` — Configure your proxy settings

**Example:**

```
{
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "input": [
    {
      "url": ""
    }
  ]
}
```

##### Responses

###### Status: 200 OK

### Schemas

#### inputSchema

- **Type:**`object`

* **`input` (required)**

  `array` — An array of objects with url, inputId and publishedDate fields.

  **Items:**

  - **`url` (required)**

    `string`, format: `uri`

* **`proxyConfiguration`**

  `object`, default: `{"useApifyProxy":true}` — Configure your proxy settings

**Example:**

```
{
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "input": [
    {
      "url": ""
    }
  ]
}
```

#### runsResponseSchema

- **Type:**`object`

* **`data`**

  `object`

  - **`actId`**

    `string`

  - **`buildId`**

    `string`

  - **`buildNumber`**

    `string`

  - **`containerUrl`**

    `string`

  - **`defaultDatasetId`**

    `string`

  - **`defaultKeyValueStoreId`**

    `string`

  - **`defaultRequestQueueId`**

    `string`

  - **`finishedAt`**

    `string`, format: `date-time`

  - **`id`**

    `string`

  - **`meta`**

    `object`

    - **`origin`**

      `string`

    - **`userAgent`**

      `string`

  - **`options`**

    `object`

    - **`build`**

      `string`

    - **`diskMbytes`**

      `integer`

    - **`memoryMbytes`**

      `integer`

    - **`timeoutSecs`**

      `integer`

  - **`startedAt`**

    `string`, format: `date-time`

  - **`stats`**

    `object`

    - **`computeUnits`**

      `integer`

    - **`inputBodyLen`**

      `integer`

    - **`rebootCount`**

      `integer`

    - **`restartCount`**

      `integer`

    - **`resurrectCount`**

      `integer`

  - **`status`**

    `string`

  - **`usage`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `integer`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`usageTotalUsd`**

    `number`

  - **`usageUsd`**

    `object`

    - **`ACTOR_COMPUTE_UNITS`**

      `integer`

    - **`DATA_TRANSFER_EXTERNAL_GBYTES`**

      `integer`

    - **`DATA_TRANSFER_INTERNAL_GBYTES`**

      `integer`

    - **`DATASET_READS`**

      `integer`

    - **`DATASET_WRITES`**

      `integer`

    - **`KEY_VALUE_STORE_LISTS`**

      `integer`

    - **`KEY_VALUE_STORE_READS`**

      `integer`

    - **`KEY_VALUE_STORE_WRITES`**

      `number`

    - **`PROXY_RESIDENTIAL_TRANSFER_GBYTES`**

      `integer`

    - **`PROXY_SERPS`**

      `integer`

    - **`REQUEST_QUEUE_READS`**

      `integer`

    - **`REQUEST_QUEUE_WRITES`**

      `integer`

  - **`userId`**

    `string`

**Example:**

```
{
  "data": {
    "id": "",
    "actId": "",
    "userId": "",
    "startedAt": "2025-01-08T00:00:00.000Z",
    "finishedAt": "2025-01-08T00:00:00.000Z",
    "status": "READY",
    "meta": {
      "origin": "API",
      "userAgent": ""
    },
    "stats": {
      "inputBodyLen": 2000,
      "rebootCount": 0,
      "restartCount": 0,
      "resurrectCount": 0,
      "computeUnits": 0
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 1024,
      "diskMbytes": 2048
    },
    "buildId": "",
    "defaultKeyValueStoreId": "",
    "defaultDatasetId": "",
    "defaultRequestQueueId": "",
    "buildNumber": "1.0.0",
    "containerUrl": "",
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 1,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    },
    "usageTotalUsd": 0.00005,
    "usageUsd": {
      "ACTOR_COMPUTE_UNITS": 0,
      "DATASET_READS": 0,
      "DATASET_WRITES": 0,
      "KEY_VALUE_STORE_READS": 0,
      "KEY_VALUE_STORE_WRITES": 0.00005,
      "KEY_VALUE_STORE_LISTS": 0,
      "REQUEST_QUEUE_READS": 0,
      "REQUEST_QUEUE_WRITES": 0,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0,
      "PROXY_SERPS": 0
    }
  }
}
```

## 📊 Social Media Insights Scraper

### 🚀 Overview

The Social Media Insights Scraper is an Apify Actor that collects and processes data from the most popular social media platforms:
• 🎥 YouTube – Extracts metadata, likes, comments, and engagement from video posts.
• 📸 Instagram – Gathers insights from posts, reels, and stories, including user information and engagement data.
• 🎵 TikTok – Extract title, description and engagement data

This Actor helps marketers, researchers, and data analysts extract actionable insights to track social media performance and analyze trends at scale.

⸻

📥 Input Configuration

To configure the Actor, provide a JSON object in the INPUT field with the following structure:

{
"url": "<https://www.instagram.com/p/C4ixfyPOwvP/>",
"publishedDate": "2025-03-28T14:49:45.182Z"
}

🎛️ Input Parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| url | string | URL of the post or video to scrape (Instagram, YouTube, or TikTok). | ✅ Yes |
| publishedDate | string | (Optional) ISO date-time string to filter posts published after a certain date. | ❗ No |

⸻

📤 Output Format

The results are stored in the Apify Dataset in a structured format. Below is mock data to demonstrate the output:

```json
[
    {
        "url": "https://www.instagram.com/p/C4ixfyPOwvP/",
        "data": {
            "url": "https://www.instagram.com/p/C4ixfyPOwvP/",
            "type": "post",
            "referenceId": "C4ixfyPOwvP",
            "platform": "instagram",
            "result": {
                "type": "engagement",
                "likes": 2500,
                "comments": 180,
                "engagements": 2680,
                "screenName": "Samsung Middle East",
                "username": "@samsung_me",
                "title": "Samsung Galaxy S24 Launch",
                "description": "Experience the future of smartphones with the Samsung Galaxy S24, now available with special offers.",
                "publishedDate": "2025-03-28T14:49:45.182Z"
            }
        }
    },
    {
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "data": {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            "type": "video",
            "referenceId": "dQw4w9WgXcQ",
            "platform": "youtube",
            "result": {
                "type": "engagement",
                "likes": 3400000,
                "comments": 215000,
                "engagements": 3615000,
                "screenName": "Rick Astley",
                "username": "@rickastleyofficial",
                "title": "Never Gonna Give You Up",
                "description": "The official video for Never Gonna Give You Up by Rick Astley.",
                "publishedDate": "2009-10-25T18:30:00.000Z"
            }
        }
    },
    {
        "url": "https://www.tiktok.com/@charlidamelio/video/1234567890",
        "data": {
            "url": "https://www.tiktok.com/@charlidamelio/video/1234567890",
            "type": "video",
            "referenceId": "1234567890",
            "platform": "tiktok",
            "result": {
                "type": "engagement",
                "likes": 1200000,
                "comments": 89000,
                "engagements": 1289000,
                "screenName": "Charli D'Amelio",
                "username": "@charlidamelio",
                "title": "Dance Challenge",
                "description": "Charli D'Amelio takes part in the latest TikTok dance challenge.",
                "publishedDate": "2025-03-20T10:30:00.000Z"
            }
        }
    }
]
```

⸻

📊 Output Fields

| Field | Type | Description |
|-------|------|-------------|
| url | string | The URL of the post or video being scraped. |
| data.url | string | URL of the post or video. |
| data.type | string | Type of content (post, reel, video). |
| data.referenceId | string | Unique ID of the post or video. |
| data.platform | string | Platform name (instagram, youtube, tiktok). |
| data.result.type | string | Type of result (engagement). |
| data.result.likes | integer | Number of likes. |
| data.result.comments | integer | Number of comments. |
| data.result.engagements | integer | Total number of engagements. |
| data.result.screenName | string | Screen name of the account. |
| data.result.username | string | Username of the account. |
| data.result.title | string | Title of the post or video. |
| data.result.description | string | Full description or caption. |
| data.result.publishedDate | string | ISO date-time string when the post was published. |

⸻

📝 How to Run

1. Run in Apify Console
   • Go to Apify Console.
   • Create a new task for the Social Media Insights Scraper.
   • Provide the required input JSON.
   • Run the task and monitor progress.

⸻

📚 Use Cases

📊 Competitor Analysis

Track how your competitors are performing across multiple platforms by analyzing their engagement metrics.

📈 Trend Analysis

Identify trends by monitoring high-engagement content and popular hashtags.

🔎 Influencer Marketing

Evaluate the performance of influencer partnerships by assessing audience interaction and post reach.

📝 Content Strategy

Refine your content strategy by understanding what types of content generate the most engagement.

⸻

⚙️ Technical Details
• Written in Node.js using the Apify SDK.
• Supports CheerioCrawler and PuppeteerCrawler for scraping.
• Handles rate limiting and retries to avoid platform bans.
• Automatically switches between API scraping and HTML parsing based on availability.

⸻

🛠️ Limitations & Rate Limits
• Scraping Instagram and TikTok may be subject to IP bans or request limits.
• Ensure compliance with each platform’s Terms of Service.
• For high-scale scraping, consider using Proxies and rotating IPs.

⸻

📝 Changelog

v1.0.0 (Initial Release)
• Added support for scraping YouTube, Instagram, and TikTok.
• Included engagement metrics and metadata.

⸻

🧩 Support and Feedback

If you encounter any issues, or have feature requests, please:
• 🐛 Report an issue
