Create Data Export
Create a new data export request. This will calculate the required credits and prepare the export for starting.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Request Body
application/json
The type of data to export
"transactions" | "chat_messages" | "media_vault" | "trial_links" | "tracking_links" | "payouts" | "chargebacks" | "public_profiles"Array of account prefixed IDs to export data from. Not required for public_profiles type.
The start date for the export (ISO 8601 format). Not required for public_profiles type.
The end date for the export (ISO 8601 format). Not required for public_profiles type.
Array of column names to include in the export (optional, defaults to all columns for the export type)
The output file format. Supported formats vary by export type: csv or xlsx for transactions, chat_messages, trial_links, tracking_links, payouts, chargebacks, public_profiles; zip for media_vault.
"csv" | "xlsx" | "zip"Type-specific export options. For chat_messages: maxChats (optional), maxMessages (required, max 100,000), skipMassMessages (optional, bool). For public_profiles: query (optional, full-text search), gender (optional, filter: male, female, trans, couple), minSubscribePrice (optional, USD), maxSubscribePrice (optional, USD), location (optional), minPostsCount (optional, minimum posts), minPhotosCount (optional, minimum photos), minVideosCount (optional, minimum videos), minSubscribersCount (optional, minimum subscribers), minJoinDate (optional, ISO 8601 date), minLastSeenAt (optional, ISO 8601 date), createdAtFrom (optional, ISO 8601 date, profile added to DB after), createdAtTo (optional, ISO 8601 date, profile added to DB before), instagram (optional), twitter (optional), tiktok (optional), maxResults (optional, limit results).
When true, automatically starts the export after creation.
Response Body
application/json
curl -X POST "https://app.onlyfansapi.com/api/data-exports" \ -H "Content-Type: application/json" \ -d '{ "type": "transactions", "file_type": "csv" }'{
"data": {
"id": "data_export_abc123xyz789",
"type": "chat_messages",
"status": "calculating_credits",
"start_date": "2024-01-01T00:00:00+00:00",
"end_date": "2024-12-31T23:59:59+00:00",
"file_type": "csv",
"created_at": "2024-12-02T12:00:00+00:00",
"requires_scraping": true,
"credit_calculation_note": "This export type requires data scraping. Credits will be calculated and charged after scraping completes."
},
"_meta": {
"_credits": {
"used": 0,
"balance": 9500,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 60,
"limit_day": null,
"remaining_minute": 56,
"remaining_day": null,
"notice": ""
}
}
}