OnlyFans API Documentation

website·Indexed 32 days ago

https://docs.onlyfansapi.com

API and tools for integrating with OnlyFans and Fansly. Features include an API reference for managing chats, messages, and earnings; webhook support for real-time event tracking; data export capabilities for LLM and LoRA training; and FansBot for automated tasks, skills, and workflows. Includes a dedicated authentication package @onlyfansapi/auth for Next.js and Prisma integrations.

Tokens
335.5K
Snippets
1.6K
Records
2.4K
Agent score
55%

What's inside OnlyFans API

  1. Overview of OnlyFansAPI.com capabilities

    OnlyFansAPI.com provides a suite of 350+ REST API endpoints that abstract away the complexity of proxy management, WebSockets, and reverse engineering. Key capabilities include:

    • Account Connection: Connect OnlyFans accounts in under 2 minutes.
    • Messaging & Content: Read and send messages, posts, mass-DMs, and PPVs.
    • Financials: Pull earnings, transactions, fans, and chargebacks.
    • Content Management: Manage media vaults, queues, stories, and promotions.
    • Real-time Events: Receive webhooks for new messages, subscribers, and tips.
    • Creator Discovery: Search a database of over 3.5 million public OnlyFans creator profiles.
  2. Overview of the OnlyFans API MCP Server

    The OnlyFans API MCP server implements the Model Context Protocol (MCP) to expose over 350 API endpoints as tools for AI agents. This allows agents to perform tasks such as reading chats, managing fans, tracking earnings, and sending mass messages without custom code. It is compatible with Claude, ChatGPT, Manus, Cursor, VS Code Copilot, and other MCP-compliant agents. The server supports both OnlyFans and Fansly platforms simultaneously.
  3. Overview of OnlyFans API Webhooks

    Webhooks are HTTP endpoints that receive real-time notifications from the OnlyFans API for business-critical events. This allows developers to scale integrations without polling the API for frequent updates. Webhook events are available on all plans: Basic, Pro, and Enterprise.
  4. Overview of Snapchat Pixel integration with OnlyFans API Smart Links

    Since OnlyFans does not natively support Snapchat's pixel and does not allow custom JavaScript installation, OnlyFans API Smart Links act as a bridge. They capture user actions and send conversion events directly from OnlyFansAPI servers to Snapchat's Conversions API. This allows advertisers to track subscriptions, tips, and PPV purchases resulting from Snapchat ads.
  5. Overview of OnlyFans Smart Links for Revenue Tracking

    A Smart Link is a tracking URL that redirects visitors to an OnlyFans tracking or free-trial link. It records the visit, preserves campaign identifiers, and attributes subsequent subscriptions, payments, and reply conversions to the original click. It can also trigger server-side events to tracking pixels and custom postbacks.
    https://trk.of-traffic.com/go/{SMART_LINK_ID}
  6. Overview of FansBot AI Assistant

    FansBot is an AI assistant that integrates with team chat applications to allow users to manage OnlyFans accounts using plain language. It can check earnings, identify top fans, review subscriber growth, track link performance, execute OnlyFans actions, search the web, and automate recurring reports. FansBot is powered by an OnlyFansAPI account and works across all creators on a user's roster. Note that each message answered by the bot consumes credits.
  7. Overview of @onlyfansapi/auth authentication library

    @onlyfansapi/auth is the official authentication library for the OnlyFans API. It allows developers to integrate secure OnlyFans account authentication directly into their applications. The library is framework-agnostic (supporting React, Vue, Svelte, Angular, and vanilla JavaScript), lightweight (1.5kB), and includes full TypeScript definitions for type safety and IDE autocomplete.
  8. Overview of TikTok Pixel integration with Smart Links

    Since OnlyFans does not natively support TikTok pixels or allow custom JavaScript installation, OnlyFans API Smart Links act as a bridge. They send conversion events (like subscriptions and purchases) directly from OnlyFans API servers to TikTok's Events API, bypassing the need for browser-side tracking code.
  9. Configure parameters for the Statistics Overview API

    The Statistics Overview endpoint accepts the following parameters:

    Path Parameters:

    • account (required): The Account ID (e.g., acct_XXXXXXXXXXXXXXX).

    Query Parameters:

    • type (optional): The category of statistics to retrieve. Valid values are fans, visitors, posts, or messages.
    • start_date (optional): The start date for the statistics (format: YYYY-MM-DD HH:mm:ss). If left empty, it defaults to the model's start date.
    • end_date (optional): The end date for the statistics (format: YYYY-MM-DD HH:mm:ss). If left empty, it retrieves data up to the current time.
  10. Retrieve a specific webhook by ID

    Use the GET /api/webhooks/{webhook_id} endpoint to retrieve detailed information about a single webhook. The response includes rate limit data and cache settings. Authentication requires a Bearer token (API Key) obtained from the OnlyFansAPI Console.
    curl -X GET "https://api.onlyfansapi.com/api/webhooks/{webhook_id}" \
         -H "Authorization: Bearer YOUR_API_KEY"