NewFans API, previously OnlyFans API ยท A new name. A broader platform.
Fans API
FanslyPosts

List Posts

List the account's own wall posts, newest first, as shown on its profile. Each post has its id, its caption as content (can be empty), createdAt (Unix seconds), expiresAt (Unix milliseconds, or null), fypFlags, and its attachments. hashtags lists the #hashtags found in content โ€” Fansly has no separate hashtag field, so they are parsed from the caption.

Attachments reference other entries of the response by contentId: contentType 1 is an accountMedia entry (a media offer โ€” its id is the mediaOfferId used by Get Post Stats), and contentType 2 is an accountMediaBundles entry whose accountMediaIds are media offers. Other attachment types are returned as Fansly sends them.

Filter by wall with wall_id (from the List Walls endpoint) or by caption text with search. To fetch the next (older) page, pass the id of the last returned post as before; the _pagination.next_page URL has it set for you. Fansly decides the page size (15 posts at the time of writing); an empty posts page means you reached the end.

GET
/api/fansly/{fanslyAccount}/posts
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

Path Parameters

fanslyAccount*string

The Fansly Account ID

Query Parameters

before?string

Pagination cursor: the id of the last post from the previous page. Omit (or pass 0) for the first page.

after?string

Only list posts newer than this post id. Defaults to 0 (unbounded).

wall_id?string

Only list posts on this wall. Refer to the List Walls endpoint. Omit for all walls.

search?string

Only list posts whose caption contains this text.

Response Body

application/json

curl -X GET "https://app.fansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/posts?before=979152964855820288&after=0&wall_id=934503207806189568&search=beach"
{
  "data": {
    "posts": [
      {
        "id": "400000000000000002",
        "accountId": "800000000000000001",
        "content": "New set is up #beach #summer",
        "fypFlags": 0,
        "inReplyTo": null,
        "inReplyToRoot": null,
        "createdAt": 1794951666,
        "expiresAt": null,
        "attachments": [
          {
            "postId": "400000000000000002",
            "pos": 0,
            "contentType": 1,
            "contentId": "500000000000000001"
          }
        ],
        "likeCount": 12,
        "timelineReadPermissionFlags": [],
        "mediaLikeCount": 30,
        "totalTipAmount": 0,
        "attachmentTipAmount": 0,
        "accountMentions": [],
        "hashtags": [
          "beach",
          "summer"
        ]
      },
      {
        "id": "400000000000000001",
        "accountId": "800000000000000001",
        "content": "",
        "fypFlags": 4,
        "inReplyTo": null,
        "inReplyToRoot": null,
        "createdAt": 1794940000,
        "expiresAt": 1794969660000,
        "attachments": [
          {
            "postId": "400000000000000001",
            "pos": 0,
            "contentType": 2,
            "contentId": "600000000000000001"
          }
        ],
        "likeCount": 3,
        "timelineReadPermissionFlags": [],
        "mediaLikeCount": 0,
        "totalTipAmount": 0,
        "attachmentTipAmount": 0,
        "accountMentions": [],
        "hashtags": []
      }
    ],
    "aggregatedPosts": [],
    "accountMedia": [
      {
        "id": "500000000000000001",
        "accountId": "800000000000000001",
        "previewId": null,
        "mediaId": "500000000000000101",
        "createdAt": 1794951600,
        "deleted": false,
        "permissionFlags": 0,
        "price": 0,
        "media": {
          "id": "500000000000000101",
          "type": 2,
          "status": 1,
          "accountId": "800000000000000001",
          "mimetype": "video/mp4",
          "width": 1080,
          "height": 1920,
          "metadata": "{\"duration\":7.133}",
          "locations": [],
          "variants": []
        }
      }
    ],
    "accountMediaBundles": [
      {
        "id": "600000000000000001",
        "accountId": "800000000000000001",
        "previewId": null,
        "permissionFlags": 0,
        "price": 0,
        "accountMediaIds": [
          "500000000000000002",
          "500000000000000003"
        ],
        "bundleContent": [
          {
            "accountMediaId": "500000000000000002",
            "pos": 0
          },
          {
            "accountMediaId": "500000000000000003",
            "pos": 1
          }
        ]
      }
    ],
    "hasMore": true
  },
  "_pagination": {
    "next_page": "https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/posts?before=400000000000000001"
  },
  "_meta": {
    "_credits": {
      "used": 1,
      "balance": 10055789,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 5000,
      "limit_day": null,
      "remaining_minute": 4999,
      "remaining_day": null,
      "notice": "We have decided to remove our daily rate limits. Please remove any references to these in your integrations."
    }
  }
}