Understanding API response format, metadata, and headers
Every API response follows a consistent structure with two main components:
data
field containing OnlyFans information_pagination
field with pagination information, if the endpoint is paginated_meta
object containing request metadataHere’s an example response:
data
FieldThe data
field always contains the actual OnlyFans response data. Its structure varies depending on the endpoint being called. For example:
/profiles/{username}
/messages
endpoints/subscribers
endpoints_pagination
fieldSome endpoints return paginated data. For example, /chats
, /chats/XYZ/messages
or /tracking-links
.
In this case, the response will include a _pagination
field with the next_page
field that you can use to fetch the next page of results.
If there are no more pages, the next_page
field will be null
.
_meta
ObjectThe _meta
object contains three sections of metadata about your request:
_credits
: Credit usage information
used
: Credits consumed by this requestbalance
: Your remaining credit balancenote
: Additional information about credit usage_cache
: Caching status and information
is_cached
: Whether this response was served from cachecached_at
: When the response was cachednote
: Instructions for bypassing cache if needed_rate_limits
: Rate limiting information
limit_minute
: Requests allowed per minutelimit_day
: Requests allowed per dayremaining_minute
: Remaining requests this minuteremaining_day
: Remaining requests todayEach response includes comprehensive metadata in the headers:
Content Headers
content-type
: Always application/json
Credit Headers
x-ofapi-credits-used
: Credits used by this requestx-ofapi-credits-balance
: Your remaining credit balancex-ofapi-is-cached
: Whether response was cachedRate Limit Headers
x-rate-limit-limit-minute
: Per-minute limitx-rate-limit-limit-day
: Daily limitx-rate-limit-remaining-minute
: Remaining minute requestsx-rate-limit-remaining-day
: Remaining daily requestsYou can control caching behavior using query parameters:
?fresh=true
to force a fresh response from OnlyFansThe same information is available in both headers and the _meta
object. Use
headers for quick access in code, and the _meta
object for more detailed
information including notes and timestamps.