# weibo media downloader (`mohamed.k.sirag/weibo-media-downloader`)

Scrape data from weibo, get video (no watermark) url, get list of images from story, get media info like (id, description, type),get user info like ( userId, nickname, avatar)

- **URL**: https://beta-securitybyobscurity.apify.com/mohamed.k.sirag/weibo-media-downloader.md
- **Developed by:** [Mohamed Sirag](https://beta-securitybyobscurity.apify.com/mohamed.k.sirag) (community)
- **Categories:** Social media, Videos
- **Stats:** 3 total users, 2 monthly users, 92.9% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$15.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

# README

### What does Weibo media downloader do?

Weibo media downloaderwill enable you to get data from Weibo website or app .

weibo media downloader can scrape:

- Video URL (No Watermark)
- List of images, gif video's and video's (Story data)
- User info (id, name, avatar)

### Why scrape weibo media?

To download videos without watermark.

### How to get video's (No Watermark)

Just follow these few steps and you'll get your data in few seconds.

- get the url of the video you want, example

```json
{
   "url" : "https://weibo.com/1705901331/5187170513979937"
}
```

or

```json
{
    "url" : "https://video.weibo.com/show?fid=1034:5184739900850244"
}
```

- Run the actor
- Output example
- First url

```json
{
  "id": "5187170513979937",
  "text": "<a  href=\"https://m.weibo.cn/search?containerid=231522type%3D1%26t%3D10%26q%3D%23%E7%9C%8B%E5%8F%A3%E5%9E%8B%E5%B0%B1%E7%9F%A5%E9%81%93Angelababy%E6%9C%89%E5%A4%9A%E5%BC%80%E5%BF%83%23&extparam=%23%E7%9C%8B%E5%8F%A3%E5%9E%8B%E5%B0%B1%E7%9F%A5%E9%81%93Angelababy%E6%9C%89%E5%A4%9A%E5%BC%80%E5%BF%83%23&luicode=20000061&lfid=5187170513979937\" data-hide=\"\"><span class=\"surl-text\">#看口型就知道Angelababy有多开心#</span></a> <br />怎么会有女明星因为一支冰激凌就高兴成这样啊！隔着屏幕都能感受到Angelababy的快乐，开心得就像一个小女孩一样，太可爱了吧！<br />咱说也是第一次光看口型就知道baby有多开心：“太好吃了！”“怎么这么好吃！”，百分百不会读错的程度，被baby的小幸福感染到了！ ",
  "shares": 3247,
  "comments": 1482,
  "likes": 27876,
  "video": {
    "type": "video",
    "play_count": "165万次播放",
    "duration": 9.195,
    "thumb": "https://wx2.sinaimg.cn/orj480/001RrMRBly1i39usrglp3j60k00qo0th02.jpg",
    "urls": {
      "720p": "https://f.video.weibocdn.com/o0/rXX7eea4lx08pIXrKxuE0104120048X20E010.mp4?label=mp4_720p&template=720x960.24.0&ori=0&ps=1BThihd3VLAY5R&Expires=1752258808&ssig=j4licbmneu&KID=unistore,video",
      "ld": "https://f.video.weibocdn.com/o0/eg27fhGIlx08pIXrdQ1i010412001osb0E010.mp4?label=mp4_ld&template=360x480.24.0&ori=0&ps=1BThihd3VLAY5R&Expires=1752258808&ssig=SXq2CAsajC&KID=unistore,video",
      "hd": "https://f.video.weibocdn.com/o0/WWApCU8Nlx08pIXrnkfu010412002uuj0E010.mp4?label=mp4_hd&template=540x720.24.0&ori=0&ps=1BThihd3VLAY5R&Expires=1752258808&ssig=lR%2BtNO88J1&KID=unistore,video"
    }
  },
  "list": [
    {
      "type": "video",
      "image": "https://wx1.sinaimg.cn/large/001RrMRBly1i39usrd39zj60k00qo0th02.jpg",
      "size": "720×960",
      "video": "https://f.video.weibocdn.com/o0/rXX7eea4lx08pIXrKxuE0104120048X20E010.mp4?label=mp4_720p&template=720x960.24.0&ori=0&ps=1BThihd3VLAY5R&Expires=1752258808&ssig=j4licbmneu&KID=unistore,video",
      "duration": 9
    },
    {
      "type": "livephoto",
      "image": "https://wx3.sinaimg.cn/large/001RrMRBly1i39ush7hxxj60k00qo40y02.jpg",
      "size": "720×960",
      "video": "https://video.weibo.com/media/play?livephoto=https%3A%2F%2Flivephoto.us.sinaimg.cn%2F002CbUFkjx08pIXpQdLh0f0f010096ep0k01.mov",
      "duration": 0
    },
    {
      "type": "livephoto",
      "image": "https://wx4.sinaimg.cn/large/001RrMRBly1i39usi7d0bj60u014078x02.jpg",
      "size": "1080×1440",
      "video": "https://video.weibo.com/media/play?livephoto=https%3A%2F%2Flivephoto.us.sinaimg.cn%2F002ztd50jx08pIXq13uU0f0f0100iNMy0k01.mov",
      "duration": 0
    },
    {
      "type": "livephoto",
      "image": "https://wx2.sinaimg.cn/large/001RrMRBly1i39usjrdrwj60k00qogo802.jpg",
      "size": "720×960",
      "video": "https://video.weibo.com/media/play?livephoto=https%3A%2F%2Flivephoto.us.sinaimg.cn%2F004wPxV0jx08pIXq7CFi0f0f0100bq970k01.mov",
      "duration": 0
    },
    {
      "type": "image",
      "image": "https://wx1.sinaimg.cn/large/001RrMRBly1i39usl57oqj62o03b4npe02.jpg",
      "size": "2048×2541",
      "video": "",
      "duration": 0
    },
    {
      "type": "image",
      "image": "https://wx2.sinaimg.cn/large/001RrMRBly1i39usm2ue5j62o03b44qr02.jpg",
      "size": "2048×2541",
      "video": "",
      "duration": 0
    }
  ],
  "user": {
    "id": 1705901331,
    "name": "沈不疼",
    "profile_url": "https://m.weibo.cn/u/1705901331?luicode=20000061&lfid=5187170513979937",
    "followers_count": "476.5万",
    "avatar": "https://wx2.sinaimg.cn/orj480/001RrMRBly8i0n8ub0c76j60u00u00us02.jpg",
    "verified": true
  }
}
```

- Second url

```json
{
  "id": "1034:5184739900850244",
  "text": "早上八点半就32度，这合理吗？ <a target=\"_blank\"  href=\"//s.weibo.com/weibo?q=%23%E5%A4%8F%E6%97%A5%E9%9D%92%E6%98%A5%E6%B4%BE%E5%AF%B9%23&from=default\">#夏日青春派对#</a> <a target=\"_blank\"  href=\"//s.weibo.com/weibo?q=%23%E5%B0%8F%E9%83%91%E9%9D%92%E5%B9%B4%23&from=default\">#小郑青年#</a>   ",
  "shares": "4,294",
  "comments": "4,819",
  "likes": 14856,
  "video": {
    "type": "video",
    "play_count": "115万",
    "duration": "1:09",
    "thumb": "//wx2.sinaimg.cn/orj480/001oiWL4ly1i324a7dqjhj60u01hcgs302.jpg",
    "urls": {
      "1080p": "//f.video.weibocdn.com/o0/gfhPv9ellx08pyi7M1rW01041202JUqG0E010.mp4?label=mp4_1080p&template=1080x1920.24.0&media_id=5184739900850244&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=v&ps=3lckmu&uid=3ZoTIp&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36&Expires=1752259042&ssig=3U6AXuzAa3&KID=unistore,video",
      "720p": "//f.video.weibocdn.com/o0/1K5Cqiyflx08pyhOsFqU01041201rbIv0E010.mp4?label=mp4_720p&template=720x1280.24.0&media_id=5184739900850244&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=v&ps=3lckmu&uid=3ZoTIp&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36&Expires=1752259042&ssig=dAtOGkmYb1&KID=unistore,video",
      "480p": "//f.video.weibocdn.com/o0/rQVGjsKVlx08pyhOA0Ja01041200UoMc0E010.mp4?label=mp4_hd&template=540x960.24.0&media_id=5184739900850244&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=v&ps=3lckmu&uid=3ZoTIp&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36&Expires=1752259042&ssig=B8NfQPQ%2BEo&KID=unistore,video",
      "360p": "//f.video.weibocdn.com/o0/D29KvQDXlx08pyhNhm6Y01041200tVpJ0E010.mp4?label=mp4_ld&template=360x640.24.0&media_id=5184739900850244&tp=8x8A3El:YTkl0eM8&us=0&ori=1&bf=4&ot=v&ps=3lckmu&uid=3ZoTIp&ab=,15568-g4,8012-g2,8013-g0,3601-g41,3601-g36&Expires=1752259042&ssig=a2GCdtIKIU&KID=unistore,video"
    }
  },
  "list": [],
  "user": {
    "id": 1275280670,
    "name": "郑恺",
    "profile_url": "",
    "followers_count": "4543.1万",
    "avatar": "//tvax1.sinaimg.cn/small/001oiWL4ly8i2t6uubx1nj60e80e8dgm02.jpg?KID=imgbed,tva&Expires=1752266242&ssig=vxPjStFrXR",
    "verified": true
  }
}
```

# Actor input Schema

## `url` (type: `string`):

The URL of website you want to get the data from.

## Actor input object example

```json
{
  "url": "https://www.apify.com/"
}
```

# 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 = {
    "url": "https://www.apify.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mohamed.k.sirag/weibo-media-downloader").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 = { "url": "https://www.apify.com/" }

# Run the Actor and wait for it to finish
run = client.actor("mohamed.k.sirag/weibo-media-downloader").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 '{
  "url": "https://www.apify.com/"
}' |
apify call mohamed.k.sirag/weibo-media-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mohamed.k.sirag/weibo-media-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "weibo media downloader",
        "description": "Scrape data from weibo, get video (no watermark) url, get list of images from story, get media info like (id, description, type),get user info like ( userId, nickname, avatar)",
        "version": "0.0",
        "x-build-id": "24fKwhrOrRBGVfdVY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mohamed.k.sirag~weibo-media-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mohamed.k.sirag-weibo-media-downloader",
                "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/mohamed.k.sirag~weibo-media-downloader/runs": {
            "post": {
                "operationId": "runs-sync-mohamed.k.sirag-weibo-media-downloader",
                "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/mohamed.k.sirag~weibo-media-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-mohamed.k.sirag-weibo-media-downloader",
                "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": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "URL of the page",
                        "type": "string",
                        "description": "The URL of website you want to get the data from."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
