We just released our native n8n integration!ยป Try now
OnlyFans API
Chat Messages

Search Chat Messages

Search messages in a specific chat. Returns a list of message IDs matching the search query.

GET
/api/{account}/chats/{chat_id}/messages/search
AuthorizationBearer <token>

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

In: header

Path Parameters

account*string

The Account ID

chat_id*string

The ID of the chat (usually a fan's OnlyFans User ID)

Query Parameters

query*string

The query search in messages

Request Body

application/json

query*string

Response Body

application/json

curl -X GET "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/chats/123/messages/search?query=Hello" \  -H "Content-Type: application/json" \  -d '{    "query": "est"  }'
{
  "data": [
    123,
    456,
    789
  ],
  "_meta": {
    "_credits": {
      "used": 1,
      "balance": 999999892,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 1000,
      "limit_day": 50000,
      "remaining_minute": 999,
      "remaining_day": 49979
    }
  }
}