# Tokyomotion Video Downloader | Download Tokyomotion Videos (`maximedupre/tokyomotion-video-downloader`) Actor

Download public TokyoMotion videos from page URLs and save playable MP4 files in Apify storage. Choose a quality and process several URLs in one run.

- **URL**: https://apify.com/maximedupre/tokyomotion-video-downloader.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Videos, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 video downloads

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

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

## What's an Apify Actor?

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

## How to integrate an Actor?

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

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

### 🎬 Download public TokyoMotion videos as MP4 files

TokyoMotion Video Downloader is for people who have public video page URLs and want playable MP4 files. Add one or more URLs, choose a quality, and get each saved file plus its title, duration, source page, and delivered quality when available.

- **[TokyoMotion Downloader](https://apify.com/maximedupre/tokyomotion-video-downloader/examples/tokyomotion-downloader)** — download a public video from its TokyoMotion page URL.
- **[TokyoMotion MP4 Download](https://apify.com/maximedupre/tokyomotion-video-downloader/examples/tokyomotion-mp4-download)** — save a playable MP4 file in Apify storage.
- **[Bulk TokyoMotion Video Download](https://apify.com/maximedupre/tokyomotion-video-downloader/examples/bulk-tokyomotion-video-download)** — process several video page URLs in one run.
- **[TokyoMotion Quality Download](https://apify.com/maximedupre/tokyomotion-video-downloader/examples/tokyomotion-quality-download)** — ask for the best available quality or a named quality.
- **[TokyoMotion Video Archive](https://apify.com/maximedupre/tokyomotion-video-downloader/examples/tokyomotion-video-archive)** — keep a file link and source details for videos you have the right to save.

#### 📦 Returned data

Each successful download creates one dataset row with:

- `videoId` — the TokyoMotion video ID.
- `sourceUrl` — the public video page URL.
- `title` — the source title, when available.
- `durationSeconds` — the video length, when available.
- `quality` — the delivered MP4 height, such as `720p`.
- `fileName` — the saved MP4 file name.
- `fileUrl` — the Apify storage URL for the MP4 file.

The MP4 file is also saved in the run's default key-value store. Repeated URLs for the same video are downloaded only once in a run.

#### 🚀 Running the Actor

1. Add one or more public TokyoMotion video page URLs.
2. Choose **Best available** or a named quality.
3. Start the Actor.
4. Open **Videos** for rows and file links, or **MP4 files** to browse saved files.

The Actor retries short source errors. In a mixed run, files already saved stay available if another URL cannot be downloaded. Private, removed, login-only, invalid, and unsupported pages do not create output rows.

#### 🧾 Input

| Field | What to enter |
| --- | --- |
| `videoUrls` | One or more public TokyoMotion video page URLs. |
| `quality` | `best`, `1080p`, `720p`, `480p`, `360p`, or `240p`. The default is `best`. |

```json
{
  "videoUrls": [
    {
      "url": "https://www.tokyomotion.net/video/1234567/example-video"
    }
  ],
  "quality": "720p"
}
````

A named quality must be offered for that video. The Actor skips the video if the requested quality is not available. It does not raise video quality or convert videos to audio.

#### 📤 Output

A successful row looks like this:

```json
{
  "videoId": "1234567",
  "sourceUrl": "https://www.tokyomotion.net/video/1234567/example-video",
  "title": "Example video",
  "durationSeconds": 615,
  "quality": "720p",
  "fileName": "Example video-720p.mp4",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/store-id/records/VIDEO-1234567-example.mp4?disableRedirect=true"
}
```

Only completed MP4 downloads are saved as rows. Source details can be `null` when TokyoMotion does not provide them.

#### 💳 Pricing

This Actor uses pay-per-event pricing. You pay for each video that is downloaded as a playable MP4 and saved to the dataset. Invalid, duplicate, private, removed, unsupported, failed, and unavailable videos are not saved as paid downloads.

#### 🔌 Integrations

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

- Run it in Apify Console for one-time downloads.
- Call it with the Apify API from your app or script.
- Use schedules for repeat runs.
- Use webhooks when a run ends.
- Export dataset rows as JSON, CSV, Excel, XML, RSS, or HTML.

#### ❓ FAQ

##### Can I download private or login-only videos?

No. The Actor only supports public TokyoMotion video pages that can be opened without an account, cookies, or source credentials.

##### What happens if the quality I pick is missing?

That video is skipped. Use `best` when you want the highest quality TokyoMotion offers for each video.

##### Can one bad URL stop the other downloads?

Valid URLs are handled on their own, and completed downloads are kept. If TokyoMotion cannot be reached after all retries, the run can fail after keeping files and rows already saved.

##### Does it search TokyoMotion for videos?

No. You must provide direct video page URLs. The Actor does not search pages, profiles, categories, or feeds.

##### Does it return audio-only files or other formats?

No. It saves playable MP4 video files. It does not extract audio or make other formats.

##### Where are the files stored?

MP4 files are saved in the run's default key-value store. Each successful dataset row has a `fileUrl` for its file.

##### May I download any public video?

Use the Actor only for content you have the right to access and save. Public access does not change the rights for a video.

### 📝 Changelog

- 0.1: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~tokyomotion-video-downloader/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [XNXX Video Downloader](https://apify.com/maximedupre/xnxx-video-downloader) — get public XNXX media links and video details from known URLs or IDs.
- [XVideos Downloader](https://apify.com/maximedupre/xvideos-downloader) — get public XVideos media links and metadata from watch-page URLs.
- [Pornhub Downloader](https://apify.com/maximedupre/pornhub-downloader) — collect public Pornhub video data from URLs, listings, or search terms.
- [ManyVids Video Downloader](https://apify.com/maximedupre/manyvids-video-downloader) — get source media links and details from known ManyVids video pages.
- [TNAFlix Downloader](https://apify.com/maximedupre/tnaflix-downloader) — get public TNAFlix MP4 links and metadata from URLs or video IDs.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `videoUrls` (type: `array`):

Add one or more public TokyoMotion video page URLs. The Actor downloads each supported video once and keeps successful files if another URL fails.

## `quality` (type: `string`):

Pick the MP4 quality to download. Best available uses the highest quality TokyoMotion offers for each video. A named quality uses that quality when it is offered.

## Actor input object example

```json
{
  "videoUrls": [
    {
      "url": "https://www.tokyomotion.net/video/6718731"
    }
  ],
  "quality": "best"
}
```

# Actor output Schema

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

Open successful video downloads with source details and MP4 file links.

## `files` (type: `string`):

Browse the downloaded MP4 files in the default key-value store.

# 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 = {
    "videoUrls": [
        {
            "url": "https://www.tokyomotion.net/video/6718731"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/tokyomotion-video-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 = { "videoUrls": [{ "url": "https://www.tokyomotion.net/video/6718731" }] }

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/tokyomotion-video-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 '{
  "videoUrls": [
    {
      "url": "https://www.tokyomotion.net/video/6718731"
    }
  ]
}' |
apify call maximedupre/tokyomotion-video-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tokyomotion Video Downloader | Download Tokyomotion Videos",
        "description": "Download public TokyoMotion videos from page URLs and save playable MP4 files in Apify storage. Choose a quality and process several URLs in one run.",
        "version": "0.1",
        "x-build-id": "tx3jKhucxHwFLnRyW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~tokyomotion-video-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-tokyomotion-video-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/maximedupre~tokyomotion-video-downloader/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-tokyomotion-video-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/maximedupre~tokyomotion-video-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-tokyomotion-video-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": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "Video page URLs",
                        "type": "array",
                        "description": "Add one or more public TokyoMotion video page URLs. The Actor downloads each supported video once and keeps successful files if another URL fails.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "Video page URL",
                                    "description": "A public TokyoMotion video page URL.",
                                    "pattern": "^https?://(?:www\\.)?tokyomotion\\.net/[^\\s]+$"
                                },
                                "method": {
                                    "type": "string",
                                    "title": "Method",
                                    "description": "Optional URL editor field. The Actor only uses the URL."
                                },
                                "payload": {
                                    "type": "string",
                                    "title": "Payload",
                                    "description": "Optional URL editor field. The Actor only uses the URL."
                                },
                                "userData": {
                                    "type": "object",
                                    "title": "User data",
                                    "description": "Optional URL editor field. The Actor only uses the URL.",
                                    "properties": {}
                                },
                                "headers": {
                                    "type": "object",
                                    "title": "Headers",
                                    "description": "Optional URL editor field. The Actor only uses the URL.",
                                    "properties": {}
                                }
                            },
                            "required": [
                                "url"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "quality": {
                        "title": "Video quality",
                        "enum": [
                            "best",
                            "1080p",
                            "720p",
                            "480p",
                            "360p",
                            "240p"
                        ],
                        "type": "string",
                        "description": "Pick the MP4 quality to download. Best available uses the highest quality TokyoMotion offers for each video. A named quality uses that quality when it is offered.",
                        "default": "best"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
