Media
Scrape media from the OnlyFans CDN
Scrapes a `https://cdn*.onlyfans.com/*` URL and uploads it to the OnlyFans API CDN, so that you can view or download the file. **Max file size is 500MB**
AuthorizationBearer <token>
Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Path Parameters
accountstring
The Account ID
urlstring
The CDN URL to scrape. Keep in mind that these URLs expire fast.
expiration_date?string | null
The expiration date of our returned temporary_url
. Default of 5 minutes.
Response Body
curl -X POST "https://app.onlyfansapi.com/api/string/media/scrape" \
-H "Content-Type: application/json" \
-d '{
"url": "https://cdn2.onlyfans.com/files/e/e5/123/600x400_123.jpg?Tag=2&u=123&Policy=123&Signature=signature&Key-Pair-Id=123"
}'
{
"temporary_url": "https://ofapi-media-prod.nyc3.digitaloceanspaces.com/123/600x400_123.jpg",
"expiration_date": "2025-01-01T00:00:00.000000Z"
}
{
"error": "ONLYFANS_COM_ERROR",
"message": "OnlyFans returned an unknown error.: [403]",
"description": "This error happened most probably because of a bug in the OnlyFans.com API or you sent wrong parameters (like a non-existing user id).",
"onlyfans_response": {
"status": 403,
"body": null
},
"_meta": {
"_credits": {
"used": 1,
"balance": 123,
"note": "OnlyFans returned an error, but we still had to make an API request to OnlyFans.com"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 1000,
"limit_day": 50000,
"remaining_minute": 999,
"remaining_day": 50000
}
}
}