Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.onlyfanskit.dev/llms.txt

Use this file to discover all available pages before exploring further.

onlyfanskit is a typed TypeScript client for the OnlyFans API. It covers the full surface as typed resources, handles authentication for you, and includes realtime and webhook support.
npm install onlyfanskit
import { OnlyFans } from "onlyfanskit";

const of = new OnlyFans({
  cookie: "<your-cookie>",
  xBc: "<your-x-bc>",
  userId: "123456789",
  userAgent: "<your-user-agent>",
});

const me = await of.users.me();

How you call it

The client is resource-based — of.<resource>.<method>(...). Each method maps to one API call and returns a strongly-typed result.
const posts = await of.posts.feed({ limit: 10 });
const chats = await of.chats.list({ limit: 20 });
await of.messages.send(userId, { text: "Hi!" });

Zero runtime dependencies

The SDK ships with no runtime dependencies — it runs on Node 18+ and any runtime with a global fetch. Bring your own transport by passing a fetch override; see Connecting the client.

What’s covered

Account & identity

users, subscriptions, security, helpers, sessions, referrals, streaks

Content

posts, comments, media, stories, highlights, streams, bookmarks, labels

Messaging

messages, chats, notifications

Money

earnings, payments, payouts, chargebacks, dataExports

Growth & promo

campaigns, trialLinks, promotions, lists, schedules, following, social

Support & metadata

tickets, reports, releaseForms, discovery, iso, pages

Anything not wrapped

For any path without a dedicated method, call it directly with the same typed, authenticated client:
const data = await of.client.get<MyType>("/some/path", { limit: 5 });
const created = await of.client.post<MyType>("/some/path", { foo: 1 });