Fans API · APIs and developer tools
OnlyFans API by Fans API: Docs, Code, Pricing
TL;DR
- Fans API is an independent OnlyFans API that reads and acts on the accounts you connect, with more than 320 endpoints for chats, fans, posts, media and earnings.
- OnlyFans has no public developer API of its own, so this is a third-party service, not an official one.
- It has a free plan for testing; Basic costs $69 a month and Pro $299 a month. Skip it if you want a finished CRM rather than something to build on.
- Price
- Fans API plans: free, $69 or $299/mo
- Product
- Fans API
- Platforms
- OnlyFans; Fansly and Fanvue accounts on the same plan
- Free trial
- Free plan with 1 account and 100 welcome credits, no credit card
What this OnlyFans API is
Fans API is an independent OnlyFans API: a REST service that reads data from, and takes actions on, the OnlyFans accounts you connect. You send an HTTPS request with your API key, and it returns JSON for chats, fans, posts, media, earnings and more. Fans API counts more than 320 endpoints across OnlyFans, Fansly and Fanvue. It was previously called onlyfansapi.com.
OnlyFans itself offers no developer program, so searches for an OnlyFans developer API, or for “only fans api”, lead to third-party services like this one. Fans API isn’t affiliated with OnlyFans, and its own FAQ calls it an unofficial solution. Agencies use it to build internal dashboards, chat tools, revenue reports and creator search sites. It’s the base product in our APIs and developer tools category; the other tools there are built on top of it.
Key features of the OnlyFans API
The features below are what you get on a Fans API account. Fans API lists them on its features overview.
Chats and messages, the OnlyFans chat API
You can list chats, read the messages in each one, send a message with media or a PPV price, and send or schedule a mass message to fan lists. To schedule a message for a single fan, you send a mass message with one user ID and a scheduled date. This is the part most agencies build chat tools and reply assistants on.
Fans, posts, media and earnings
Endpoints cover active and expired fans, posts and post comments, the media vault, free trial and tracking links, payouts, transactions and chargebacks. Earnings statistics give you totals and breakdowns over time, which is enough to build your own revenue dashboard. Some fields come straight from OnlyFans and some are added or computed by Fans API, and the docs mark which is which.
Public creator profiles
Public profile search covers millions of creators, with filters for price, free trials and location. This suits traffic sites and creator directories. Search costs 1 credit per result, so a broad query can cost more than you expect.
Account connection and sessions
You connect an OnlyFans account in the dashboard, and the flow handles two-factor codes and captchas. If a session expires, Fans API tries to reconnect up to 3 times within an hour. If you’re building a SaaS where your own customers connect their accounts, the free OF Auth npm package embeds that flow in your app.
Webhooks, SDKs and AI access
Paid plans can receive webhook events, such as a new subscriber or a purchase, so you don’t have to poll. Our OnlyFans webhooks page covers events and delivery. The OnlyFans API SDKs give you typed clients for TypeScript, Python, PHP and Ruby. The MCP connector exposes the same endpoints to Claude, ChatGPT or Manus.
One plan for three platforms
The same key and plan also work with Fansly and Fanvue accounts, at the same price per account. If your agency runs creators on more than one platform, see the Fansly API page for what that side covers.
OnlyFans API documentation and a first request
The OnlyFans API documentation starts with a two-minute quickstart: create an API key, connect an account, then call an endpoint. Every request goes to the base URL https://app.fansapi.com/api with your key in a Bearer header. Account endpoints also need the connected account’s ID in the path.
Check your API key
This request comes from the Fans API docs guide “Develop with AI agents”. It lists the accounts connected to your team, which is the quickest way to confirm the key works and to find your account IDs.
export ONLYFANSAPI_API_KEY="your_api_key_here"
curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \
"https://app.fansapi.com/api/accounts" | jq .
List chats and send a message
With an account ID, you can call the chat endpoints. The first request uses the List Chats endpoint. The second request is the docs example for Send Message, including the optional idempotency key that stops a retried request from sending the message twice.
curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \
"https://app.fansapi.com/api/acct_example/chats" | jq .
curl --request POST \
'https://app.fansapi.com/api/acct_example/chats/123/messages' \
--header "Authorization: Bearer $ONLYFANSAPI_API_KEY" \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 70fb85b2-e610-40d0-8a70-0736e12af875' \
--data '{"text":"Hello!"}'
Every response has the same shape. A data field holds the OnlyFans data, _pagination appears on paginated endpoints, and _meta shows the credits used, your remaining balance and whether the response came from cache. The full API reference lets you send test requests from the browser and copy code in other languages. The most common mistake, according to the docs FAQ, is a 404 caused by leaving the account ID out of the path.
Is the Fans API safe to use?
Fans API says it has run for more than five years without a banned or flagged account, but that’s its own claim, not an independent audit. Its terms are more careful. They say OnlyFans’ terms of service may restrict or prohibit third-party access and automation, that you decide how the service is used on your accounts, and that any action OnlyFans takes is your responsibility. Use it only on accounts you own or are authorized to manage.
On the technical side, the docs say credentials and session cookies are encrypted with AES-256-CBC and signed with a message authentication code. Each connected account gets a dedicated IP address, and Fans API states that it doesn’t store data from authenticated accounts. There’s no sandbox, so the docs suggest creating a separate OnlyFans account for testing. Live uptime is published at status.fansapi.com.
Pricing
Fans API charges per connected account, and every plan reaches the same endpoint catalog. Plans differ in accounts, request limits, credits, webhooks and support. Check Fans API pricing for the current details, because limits change more often than prices.
| Plan | Price | Accounts | Credits each month | Webhooks |
|---|---|---|---|---|
| Free | $0 | 1 | 100 welcome credits | No |
| Basic | $69/month | 1 | 20,000 | Yes |
| Pro | $299/month | 5, then $29 per extra | 100,000 + 10,000 per extra | Yes |
| Enterprise | Quote | Custom, suggested from 100+ | Custom | Custom |
Credits pay for usage. Most uncached requests cost 1 credit, cached public responses are free, webhooks cost 1 credit per 100 events, and media costs 3 credits per MB. The price per extra account on Pro drops as you add more, and the same price applies to Fansly and Fanvue accounts. Paid plans carry a 60-day money-back guarantee.
Who it’s for, and who should skip it
Fans API is for developers, agencies with a technical person, and SaaS companies that need OnlyFans data or actions inside their own software. Typical projects are revenue dashboards, chat and mass-message tools, creator search sites and internal reports that combine several accounts. It also suits teams that prefer no-code tools, since Make, Zapier and n8n connect to the same account.
Skip it if you want a ready-made CRM with a chat screen for your chatters, because this is the layer such products are built on. Skip it as well if you aren’t comfortable with the platform-terms risk that comes with any unofficial tool.
Pros and cons
Pros
- Covers chats, mass messages, fans, posts, media, payouts and statistics through one REST interface
- The same API key and plan also reach Fansly and Fanvue accounts
- Every endpoint in the reference has code examples in cURL, JavaScript, Go, Python, Java and C#
- Webhooks, SDKs, an MCP server and no-code modules sit on the same account
- Free plan and a 60-day money-back guarantee on paid plans
Cons
- It's unofficial; OnlyFans' own terms restrict third-party tools, and any action OnlyFans takes on an account is your responsibility
- There's no sandbox, so you test against a real OnlyFans account
- The Free plan has no webhooks, and its 100 credits run out after about 100 uncached requests
- Credit billing takes some planning, because media downloads and uploads cost 3 credits per MB
- It's a developer tool; you still have to build or buy the dashboard your team uses
Frequently Asked Questions
Short answers to the questions agencies ask most.
Does OnlyFans have an API?
No. OnlyFans doesn't offer a public developer API, API keys or developer documentation. Every OnlyFans API you find online, Fans API included, is run by a third party that connects to accounts on your behalf. Fans API says so itself, and its terms state that it isn't affiliated with, endorsed by or partnered with OnlyFans. Treat any service that calls itself the official OnlyFans API with suspicion.
Is there OnlyFans API official documentation?
There's no official documentation from OnlyFans, because OnlyFans publishes no API. The documentation that exists belongs to third-party providers. Fans API publishes a full reference at docs.fansapi.com, with a quickstart, guides on authentication and credits, and a page for every endpoint that you can test from the browser. That reference describes the Fans API service, not OnlyFans itself.
How do I get OnlyFans API access?
Create a free Fans API account, open the API Keys section of the dashboard and create a key. Then connect an OnlyFans account under Accounts; the connection flow supports two-factor codes and captchas. Every request after that uses your key in an Authorization header and the account ID in the URL path. The Free plan is enough for a first test, with 1 account and 100 welcome credits.
Can I use the OnlyFans API with another CRM?
Yes. Fans API's documentation says connecting an account doesn't affect your ability to use OnlyMonster, Infloww, CreatorHero or any other OnlyFans CRM, and the reverse is also true. Agencies often keep their CRM for chatters and use the API for reporting, exports or custom automations that the CRM doesn't offer.
Which programming languages work with Fans API?
Any language that can send HTTPS requests. The API reference shows examples in cURL, JavaScript or TypeScript, Go, Python, Java and C# for every endpoint. If you prefer a typed client, Fans API also publishes free SDKs for TypeScript, Python, PHP and Ruby. No-code users can connect through Make, Zapier or the n8n node instead of writing code.
What does an API request cost?
Most uncached requests cost 1 credit, and cached responses from public endpoints cost nothing. Account-specific endpoints such as chats are never cached. Webhooks cost 1 credit per 100 events, and media uploads and downloads cost 3 credits per MB. Basic includes 20,000 credits a month and Pro includes 100,000, which Fans API says covers more than 90% of users.
Verdict
Fans API is the practical choice if your agency or SaaS needs programmatic access to OnlyFans chats, fans and earnings, because there is no official OnlyFans public API. It's built for people who write code or use no-code tools, and it saves you from maintaining your own connection to OnlyFans. If you want a finished CRM with a chat screen, look elsewhere, and accept that any unofficial tool carries platform-terms risk.
Best for: Developers and agencies building their own OnlyFans tools