# ModelScope Scraper (魔搭社区) — AI Models & Datasets (`perceptive_city_af7/modelscope-scraper`) Actor

Collect public AI model and dataset metadata from ModelScope (魔搭社区) with downloads, likes, licenses, tasks, frameworks, and optional architecture, preview, and arXiv metadata. No login required.

- **URL**: https://apify.com/perceptive_city_af7/modelscope-scraper.md
- **Developed by:** [fall Rainy](https://apify.com/perceptive_city_af7) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 model / dataset records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ModelScope Scraper (魔搭社区) — China Open-Source AI Models & Datasets

Discover public AI models (模型) and datasets (数据集) on ModelScope (魔搭社区), including repositories for Qwen, DeepSeek, GLM, and InternLM. The Actor uses anonymous ModelScope API requests.

### Input

The default run returns up to 10 distinct public models sorted by downloads.

| Field | Default | Usage |
| --- | --- | --- |
| `mode` | `"models"` | Choose public models (模型) with `"models"` or public datasets (数据集) with `"datasets"`. |
| `query` | `""` | Optional keyword for either mode, such as `"Qwen"`, `"通义千问"`, or `"图像分类"`. |
| `sortBy` | `"downloads"` | Choose `"downloads"`, `"likes"`, `"updated"`, or `"default"` for ModelScope's own ranking. |
| `tasks` | `[]` | Model task filters, such as `["text-generation"]`. |
| `frameworks` | `[]` | Model framework filters, such as `["pytorch"]`. |
| `includeDetails` | `false` | Fetch model architectures, dataset preview availability, and arXiv IDs where available. |
| `maxItems` | `10` | Maximum distinct public records to save, from 1 to 2,000. |

Model search (模型检索) example:

```json
{"mode": "models", "query": "Qwen", "tasks": ["text-generation"], "maxItems": 5}
```

Dataset search (数据集检索) example:

```json
{"mode": "datasets", "query": "图像分类", "sortBy": "downloads", "maxItems": 5}
```

### Output

The default dataset includes one row per public repository. Read `kind` to distinguish `model` rows (`model_id`, `org`, `tasks`, `frameworks`) from `dataset` rows (`dataset_id`, `namespace`). Both include `url`, `license`, `tags`, `downloads`, `likes`, `storage_size` in bytes, and `updated_at`. For available details, model rows can include `architectures`, dataset rows can include `has_preview`, and both can include `arxiv_ids`. Those detail fields may be `null`. The legacy `readme` field returns `null`.

#### Sample output

The excerpts show a model row and a dataset row with details enabled.

```json
[
  {
    "kind": "model",
    "model_id": "Qwen/Qwen2.5-0.5B-Instruct",
    "name": "Qwen2.5-0.5B-Instruct",
    "downloads": 14038287,
    "license": "apache-2.0",
    "updated_at": "2025-02-26T18:24:53+00:00",
    "url": "https://modelscope.cn/models/Qwen/Qwen2.5-0.5B-Instruct"
  },
  {
    "kind": "dataset",
    "dataset_id": "qusong0627/LightGBM_Alpha300",
    "name": "LightGBM_Alpha300",
    "downloads": 129003544,
    "license": "Apache License 2.0",
    "updated_at": "2026-11-24T12:35:45+00:00",
    "url": "https://modelscope.cn/datasets/qusong0627/LightGBM_Alpha300",
    "has_preview": true
  }
]
```

### Pay-per-event pricing

| Event | Price |
| --- | --- |
| Actor start | $0.00005, including the first five seconds of compute |
| Saved model or dataset | $0.002 per record ($2.00 per 1,000 records) |

The listed per-record rate applies to the Free plan. Starter, Scale and Business save 5%, 15% and 25% on saved records. The start fee is the same on all plans. [Apify pricing](https://apify.com/perceptive_city_af7/modelscope-scraper/pricing)

### 中文说明

从魔搭社区（ModelScope）采集公开模型（`models`）和数据集（`datasets`）元数据。默认按下载量返回最多 10 个公开模型。可使用 `query` 按关键词搜索，并用 `includeDetails` 获取可用的模型架构、数据集预览标记和 arXiv 编号。

# Actor input Schema

## `mode` (type: `string`):

Choose public AI models (模型) or datasets (数据集).

## `query` (type: `string`):

Optional English or Chinese keyword, such as Qwen, 通义千问, or 图像分类.

## `sortBy` (type: `string`):

Order results by downloads, likes, last update, or ModelScope's default ranking.

## `tasks` (type: `array`):

Optional ModelScope task tags (e.g. \['text-generation']).

## `frameworks` (type: `array`):

Optional framework tags (e.g. \['pytorch']).

## `includeDetails` (type: `boolean`):

Request model architectures, dataset preview availability, and arXiv IDs when offered by ModelScope. Details can be null.

## `maxItems` (type: `integer`):

Maximum number of distinct public records to save during this run.

## Actor input object example

```json
{
  "mode": "models",
  "query": "",
  "sortBy": "downloads",
  "tasks": [],
  "frameworks": [],
  "includeDetails": false,
  "maxItems": 10
}
```

# Actor output Schema

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

Public model or dataset metadata for each matching repository.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("perceptive_city_af7/modelscope-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("perceptive_city_af7/modelscope-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 '{}' |
apify call perceptive_city_af7/modelscope-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,perceptive_city_af7/modelscope-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/vm7r2D9VXZsEnu1bT/builds/JRyh5E4cc6JPOapJF/openapi.json
