# OnlyFans Downloader (`maximedupre/onlyfans-downloader`) Actor

Download media URLs from OnlyFans profiles, media sections, and posts you can access. Export media links, thumbnails, creator context, post text, source URLs, and timestamps for API workflows or dataset exports.

- **URL**: https://apify.com/maximedupre/onlyfans-downloader.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Marketing
- **Stats:** 8 total users, 3 monthly users, 94.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.50 / 1,000 media items

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

### 📥 OnlyFans downloader for media URLs

OnlyFans Downloader downloads media URLs and media metadata from [OnlyFans](https://onlyfans.com/) profiles, media sections, and posts you can access. Add a username, `@handle`, profile URL, media-section URL, or post URL, then export media links, thumbnails, creator context, post text, source URLs, and scrape timestamps to an Apify dataset.

Use this OnlyFans downloader when you need a repeatable way to collect media links for creator management, content review, research, reporting, archiving, or an API workflow. The Actor is focused on media rows, so each saved dataset item represents one downloadable media item rather than a broad mixed profile or post scrape.

For a small first run, keep the prefilled `https://onlyfans.com/oftv/videos` target and start the Actor. Once the output shape looks right, paste your own OnlyFans targets, raise **Max media per target**, schedule the Actor, or call it through the Apify API.

### ✅ What this Actor does

- Accepts OnlyFans usernames, `@handles`, profile URLs, media-section URLs, and post URLs.
- Supports downloader-focused sections such as `/media`, `/videos`, `/photos`, `/audio`, `/stream`, and `/posts`.
- Saves one dataset row per downloadable media item.
- Adds media URLs, thumbnails, media type, dimensions, duration, file extension hints, and available variants when visible.
- Adds creator context such as username, display name, profile URL, avatar URL, and access level when visible.
- Adds parent post context such as post URL, post text, publish time, likes, comments, and source links when visible.
- Lets you filter by media section, date range, media order, and per-target media limit.
- Supports optional OnlyFans session details for media visible to your own account.
- Skips invalid, inaccessible, unavailable, or temporarily undownloadable media without saving failure rows.

This Actor does not bypass subscriptions, private profiles, paywalls, DRM, expired URLs, account limits, or source access rules. Authenticated runs can only access media that your own valid OnlyFans session can view.

### 📦 Data you can export

Each output row represents one downloadable OnlyFans media item. Core fields include:

- `rowType` with `media` for saved media rows
- `target`, `targetIndex`, and `normalizedTarget`
- `sourceUrl`, `profileUrl`, and `postUrl`
- `profileUsername`, `profileId`, `profileDisplayName`, and `profileAvatarUrl`
- `accessLevel` with `public` or `authenticated`
- `postId`, `postText`, `publishedAt`, `likesCount`, and `commentsCount`
- `mediaId`, `mediaType`, `mediaUrl`, and `thumbnailUrl`
- `durationSeconds`, `width`, `height`, and `fileExtension`
- `mediaVariants` when the source exposes more than one usable media URL
- `sourceRowNumber` and `scrapedAt`

You can open the dataset in Apify, export it as JSON, CSV, Excel, XML, RSS, or HTML, call it through the Apify API, schedule runs, or connect it to webhooks and integrations.

### 🚀 How to run

1. Add one or more OnlyFans targets in **OnlyFans targets**.
2. Choose **Media to collect**: all media, videos, photos, audio, streams, or media from posts.
3. Set **Start date** and **End date** when you want a date window.
4. Keep **Max media per target** low for a test run, then raise it when the output looks right.
5. Add optional session details only for media visible to your own account.
6. Start the Actor and open the dataset.

The default input is designed for a small public test run. If a target is private, subscription-only, removed, or does not expose downloadable media to the run, the Actor logs the outcome and continues with other targets.

### 🎯 Input

| Field | What to enter |
| --- | --- |
| `targets` | OnlyFans usernames, `@handles`, profile URLs, media-section URLs, or post URLs. |
| `downloadMode` | Which media section to collect: all media, videos, photos, audio, streams, or media from posts. |
| `sortOrder` | Which media should be collected first when the source offers ordering. |
| `dateFrom` | Optional start date in `YYYY-MM-DD` format. |
| `dateTo` | Optional end date in `YYYY-MM-DD` format. |
| `sessionCookie` | Optional OnlyFans `sess` cookie for media your account can access. |
| `xBc` | Optional `x-bc` value from the same browser session as your cookie. |
| `userAgent` | Optional browser User-Agent from the same session as your cookie. |
| `maxMediaPerTarget` | Maximum media rows to save for each target. Default is `50`. |

### 🧾 Example output

```json
{
  "rowType": "media",
  "target": "https://onlyfans.com/oftv/videos",
  "targetIndex": 0,
  "normalizedTarget": "https://onlyfans.com/oftv/videos",
  "sourceUrl": "https://onlyfans.com/oftv/1362157219",
  "profileUsername": "oftv",
  "profileDisplayName": "OFTV",
  "profileUrl": "https://onlyfans.com/oftv",
  "accessLevel": "public",
  "postUrl": "https://onlyfans.com/oftv/1362157219",
  "postText": "Alcohol Tie Dye | Create with Kira...",
  "publishedAt": "2024-11-09T00:00:30+00:00",
  "mediaId": "3551716651",
  "mediaType": "video",
  "mediaUrl": "https://media.of.tv/videos/yaEbj/stream.m3u8?1730264438",
  "thumbnailUrl": "https://media.of.tv/videos/yaEbj/thumbnail-1080.webp",
  "durationSeconds": 439,
  "width": 1280,
  "height": 720,
  "fileExtension": "m3u8",
  "scrapedAt": "2026-06-11T15:20:00.000Z"
}
````

### 💳 Pricing

This Actor uses pay-per-event pricing. You are charged `$0.0045` for each downloadable media item saved to the dataset. Targets that do not produce a saved media row are not charged as media items.

Start with a small **Max media per target** value to inspect the output and estimate spend before larger runs.

### ⚠️ Limits and access

OnlyFans can contain restricted or paid content. This Actor is for lawful research, creator management, archival, and analytics use with content you are allowed to access.

Public runs can collect media that OnlyFans exposes publicly. For subscribed, private, or account-visible media, add your own valid `sess`, `x-bc`, and matching User-Agent values. The Actor does not provide accounts, subscriptions, cookies, credentials, or access bypasses.

Direct source media URLs may expire or stop working according to the source. Keep `sourceUrl`, `profileUrl`, `postUrl`, and `scrapedAt` in your exports so you can trace where each media item came from.

### ❓ FAQ

#### Can this download private or paid OnlyFans media?

Only when your own valid OnlyFans session can access that media. The Actor does not bypass paywalls, subscriptions, private profiles, or account restrictions.

#### Does this save media files to Apify storage?

No. This Actor exports media URLs and metadata. It does not promise permanent file hosting because source media URLs can expire.

#### Why did a target return no media rows?

The target may be private, subscription-only, removed, empty, temporarily unavailable, or not exposing downloadable media to the run. The Actor skips those cases without adding failure rows to the dataset.

#### Can I run this through the Apify API?

Yes. The input schema works from Apify Console, API runs, scheduled runs, webhooks, and integrations.

### 📝 Changelog

- 0.1: Initial release.

### 🆘 Support

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

### 🔗 Other actors

- [Instagram Downloader API ↗](https://apify.com/maximedupre/instagram-downloader-api) - Download public Instagram media URLs from posts, reels, and TV links.
- [Facebook Media Downloader ↗](https://apify.com/maximedupre/facebook-media-downloader) - Download public Facebook video and reel media links with post metadata.
- [TikTok Video Downloader ↗](https://apify.com/maximedupre/tiktok-video-downloader) - Save public TikTok video or audio files with source metadata.
- [Twitter Media Scraper ↗](https://apify.com/maximedupre/twitter-media-scraper) - Extract image, video, and GIF URLs from public X posts and media targets.
- [Pinterest Video Downloader ↗](https://apify.com/maximedupre/pinterest-video-downloader) - Extract video and image URLs from public Pinterest pins.

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

# Actor input Schema

## `targets` (type: `array`):

OnlyFans usernames, @handles, profile URLs, media-section URLs, or post URLs.

## `downloadMode` (type: `string`):

Choose the media section to collect from each target.

## `sortOrder` (type: `string`):

Choose which media should be collected first when the source offers ordering.

## `dateFrom` (type: `string`):

Collect media published on or after this date.

## `dateTo` (type: `string`):

Collect media published on or before this date.

## `sessionCookie` (type: `string`):

Paste your `sess` cookie when you want media from content your account can access.

## `xBc` (type: `string`):

Paste the `x-bc` value from the same browser session as your cookie.

## `userAgent` (type: `string`):

Paste the User-Agent from the browser session that owns the cookie.

## `maxMediaPerTarget` (type: `integer`):

Maximum number of media rows to save for each target.

## Actor input object example

```json
{
  "targets": [
    "https://onlyfans.com/oftv/videos",
    "@onlyfans"
  ],
  "downloadMode": "media",
  "sortOrder": "latest",
  "maxMediaPerTarget": 50
}
```

# Actor output Schema

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

Open the dataset with media URLs, thumbnails, creator context, post text, source URLs, and scrape timestamps.

# 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 = {
    "targets": [
        "https://onlyfans.com/oftv/videos",
        "@onlyfans"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/onlyfans-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 = { "targets": [
        "https://onlyfans.com/oftv/videos",
        "@onlyfans",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/onlyfans-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 '{
  "targets": [
    "https://onlyfans.com/oftv/videos",
    "@onlyfans"
  ]
}' |
apify call maximedupre/onlyfans-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OnlyFans Downloader",
        "description": "Download media URLs from OnlyFans profiles, media sections, and posts you can access. Export media links, thumbnails, creator context, post text, source URLs, and timestamps for API workflows or dataset exports.",
        "version": "0.1",
        "x-build-id": "1zcG77uchxd0hsQYH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~onlyfans-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-onlyfans-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~onlyfans-downloader/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-onlyfans-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~onlyfans-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-onlyfans-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": [
                    "targets"
                ],
                "properties": {
                    "targets": {
                        "title": "OnlyFans targets",
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "description": "OnlyFans usernames, @handles, profile URLs, media-section URLs, or post URLs.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "downloadMode": {
                        "title": "Media to collect",
                        "enum": [
                            "media",
                            "videos",
                            "photos",
                            "audio",
                            "streams",
                            "post_media"
                        ],
                        "type": "string",
                        "description": "Choose the media section to collect from each target.",
                        "default": "media"
                    },
                    "sortOrder": {
                        "title": "Media order",
                        "enum": [
                            "latest",
                            "oldest",
                            "mostLiked",
                            "highestTips"
                        ],
                        "type": "string",
                        "description": "Choose which media should be collected first when the source offers ordering.",
                        "default": "latest"
                    },
                    "dateFrom": {
                        "title": "Start date",
                        "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                        "type": "string",
                        "description": "Collect media published on or after this date."
                    },
                    "dateTo": {
                        "title": "End date",
                        "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                        "type": "string",
                        "description": "Collect media published on or before this date."
                    },
                    "sessionCookie": {
                        "title": "OnlyFans session cookie",
                        "type": "string",
                        "description": "Paste your `sess` cookie when you want media from content your account can access."
                    },
                    "xBc": {
                        "title": "x-bc header",
                        "type": "string",
                        "description": "Paste the `x-bc` value from the same browser session as your cookie."
                    },
                    "userAgent": {
                        "title": "User-Agent header",
                        "type": "string",
                        "description": "Paste the User-Agent from the browser session that owns the cookie."
                    },
                    "maxMediaPerTarget": {
                        "title": "Max media per target",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of media rows to save for each target.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
