Select language

Upload Ultimate Login Create Account
REST API v2

API Documentation

Integrate DDownload into your applications. Manage files, folders, and account data programmatically with our REST API.

Rate Limit

Maximum request rate allowed per API key.

3-4 requests / second

API Key

Get your API key from the Affiliate Dashboard settings.

Affiliate → Settings → API

Base URL

All endpoints use this base URL.

https://api-v2.ddownload.com/api

Account

GET

Account Info

Endpoint
https://api-v2.ddownload.com/api/account/info?key=key
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
Response
{ "msg": "OK", "server_time": "2018-08-11 04:30:07", "status": 200, "result": { "storage_left": "inf", "premium_traffic_left": 102400, "email": "[email protected]", "premium_expire": "2018-01-22 18:00:00", "balance": "100", "traffic_used": "120", "traffic_left": "12000", "storage_used": "34001" } }
GET

Account Stats

Endpoint
https://api-v2.ddownload.com/api/account/stats?key=key&last=last
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
last*
Number
Show stats for last X days. Default: 7
Response
{ "msg": "OK", "server_time": "2017-08-11 04:30:07", "status": 200, "result": [ { "downloads": "0", "profit_views": "0.00000", "views_adb": "1", "sales": "0", "profit_sales": "0.00000", "profit_refs": "0.00000", "profit_site": "0.00000", "views": "0", "refs": "0", "day": "2017-09-12", "profit_total": "0.00000", "views_prem": "0" } ] }

Upload

POST

Upload Form

HTML Example
<form enctype="multipart/form-data" action="UPLOAD_SERVER_URL" method="post"> <input name="sess_id" value="3qr5wkukoy31pd1g"> <input name="file" type="file"> </form>
GET

Upload Server

Endpoint
https://api-v2.ddownload.com/api/upload/server?key=key
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
Response
{ "msg": "OK", "server_time": "2017-08-11 04:29:54", "status": 200, "result": "https://s1.ddownload.com/upload/01" }

Files

GET

Get File Info

Endpoint
https://api-v2.ddownload.com/api/file/info?key=key&file_code=file_code
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
file_code*
String
File code, or list separated by comma. Example: gi4o0tlro01u,gi4o0tlro012
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": [ { "status": 200, "filecode": "gi4o0tlro01u", "name": "4K Time Lapse in the EOS 6D Mark II", "download": "0", "size": "200", "uploaded": "2017-08-10 05:07:17" }, { "status": 404, "filecode": "gi4o0tlro012" } ] }
GET

Get Files List

Endpoint
https://api-v2.ddownload.com/api/file/list?key=key&page=page&per_page=per_page&fld_id=fld_id&public=public&created=created&name=name
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
page*
Number
Page number. Example: 2
per_page*
Number
Number of results per page. Example: 20
fld_id*
Number
Folder ID. Example: 15
public*
Number
Show public (1) or private (0) files only. Example: 1
created*
String
Show only files uploaded after timestamp. Specify number to show only files uploaded X minutes ago. Example: 2018-06-21 05:07:10
name*
String
Filter file names. Example: Iron Man
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": [ { "status": 200, "filecode": "gi4o0tlro01u", "name": "4K Time Lapse in the EOS 6D Mark II", "downloads": "0", "size": "20", "uploaded": "2017-08-10 05:07:17" }, { "status": 404, "filecode": "gi4o0tlro012" } ] }
GET

Check Files (Batch)

Check the status of multiple files at once. Returns whether each file exists, is accessible, or has been removed due to DMCA.

Endpoint
https://api-v2.ddownload.com/api/file/check?key=key&file_code=file_code
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
file_code*
String
File codes separated by comma (max 500). Example: abc123xyz456,def789ghi012
Response
{ "msg": "OK", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "total": 3, "stats": { "found": 2, "not_found": 0, "dmca": 1 }, "files": [ { "file_code": "abc123xyz456", "status": 200, "name": "video.mp4", "size": 104857600, "downloads": 150, "uploaded": "2024-01-10 08:15:30" }, { "file_code": "jkl345mno678", "status": 451, "msg": "Unavailable for legal reasons" } ] } }
Status Codes
200 File exists 404 Not found 451 Removed (DMCA)
GET

File Exists (Duplicate Check)

Check if a file already exists in your account before uploading. Search by MD5 hash, filename, or filename + size.

Endpoint
https://api-v2.ddownload.com/api/file/exists?key=key&md5=md5
https://api-v2.ddownload.com/api/file/exists?key=key&name=name
https://api-v2.ddownload.com/api/file/exists?key=key&name=name&size=size
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
md5
String
MD5 hash of the file (32 hex characters). Example: d41d8cd98f00b204e9800998ecf8427e
name
String
Filename to search for. Example: video.mp4
size
Number
File size in bytes (optional, more accurate). Example: 104857600

You must provide either md5 OR name. Adding size with name makes the search more accurate. MD5 search is the most reliable.

Response (File Found)
{ "msg": "File exists", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "exists": 1, "matches": [ { "match_type": "md5", "file_code": "abc123xyz456", "name": "video.mp4", "size": 104857600, "uploaded": "2024-01-10 08:15:30", "fld_id": 15, "link": "https://ddownload.com/abc123xyz456" } ] } }
Response (File Not Found)
{ "msg": "File not found", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "exists": 0, "matches": [] } }
Response (File Banned)
{ "msg": "This file hash is blocked due to copyright report", "server_time": "2024-01-15 12:30:45", "status": 451, "result": { "banned": 1, "md5": "d41d8cd98f00b204e9800998ecf8427e" } }
GET

Rename File

Endpoint
https://api-v2.ddownload.com/api/file/rename?key=key&file_code=file_code&name=name
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
file_code*
String
File code, or list separated by comma. Example: gi4o0tlro01u
name*
String
New file name. Example: cool_video.mp4
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": [ { "status": 200, "filecode": "gi4o0tlro01u", "name": "4K Time Lapse in the EOS 6D Mark II", "canplay": 1, "views_started": "1", "downloads": "0", "size": "201", "uploaded": "2017-08-10 05:07:17" }, { "status": 404, "filecode": "gi4o0tlro012" } ] }
GET

Set File Folder

Endpoint
https://api-v2.ddownload.com/api/file/set_folder?key=key&file_code=file_code&fld_id=fld_id
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
file_code*
String
File code, or list separated by comma. Example: gi4o0tlro01u
fld_id*
Number
Folder ID. Example: 15
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200 }
GET

Set File Property

Change file visibility and access settings. You can set files to public/private and/or restrict access to premium users only.

Endpoint
https://api-v2.ddownload.com/api/file/set_property?key=key&file_code=file_code&public=public&premium_only=premium_only
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
file_code*
String
File code, or list separated by comma (max 500). Example: gi4o0tlro01u
public
Number
Set file visibility: 1 = public, 0 = private. Optional.
premium_only
Number
Restrict download access: 1 = premium users only, 0 = all users. Optional.

At least one of public or premium_only must be specified. You can set both in a single request.

Response
{ "msg": "OK", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "updated": 2, "requested": 2 } }
Examples

Make files private:

https://api-v2.ddownload.com/api/file/set_property?key=YOUR_KEY&file_code=abc123xyz456&public=0

Set files to premium-only:

https://api-v2.ddownload.com/api/file/set_property?key=YOUR_KEY&file_code=abc123xyz456&premium_only=1

Make files public and available to all users:

https://api-v2.ddownload.com/api/file/set_property?key=YOUR_KEY&file_code=abc123xyz456,def789ghi012&public=1&premium_only=0
GET

Get Deleted Files

Endpoint
https://api-v2.ddownload.com/api/files/deleted?key=key&last=last
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
last*
Number
Number of files limit. Example: 20
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": [ { "file_code": "gtl2mhgw4is7", "name": "1mb.bin", "deleted": "2017-08-11 20:00:01", "deleted_ago_sec": "194316" }, { "file_code": "uoyagho8c707", "name": "2mb.bin", "deleted": "2017-08-10 20:30:02", "deleted_ago_sec": "278915" } ] }

Folders

GET

Get Folder/File List

Endpoint
https://api-v2.ddownload.com/api/folder/list?key=key&fld_id=fld_id
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
fld_id*
Number
Folder ID. Example: 15
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": { "folders": [ { "name": "Sub1", "fld_id": "24" } ], "files": [ { "link": "https://ddownload.com/4w0sy8e63f0c", "uploaded": "2017-07-18 04:06:39", "file_code": "4w0sy8e63f0c", "fld_id": "16", "name": "100mb.bin" } ] } }
GET

Create New Folder

Endpoint
https://api-v2.ddownload.com/api/folder/create?key=key&parent_id=parent_id&name=name
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
parent_id*
Number
Parent folder ID. Example: 15
name*
String
Folder name. Example: New Folder
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": { "fld_id": "26" } }
GET

Rename Folder

Endpoint
https://api-v2.ddownload.com/api/folder/rename?key=key&fld_id=fld_id&name=name
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
fld_id*
Number
Folder ID. Example: 15
name*
String
New folder name. Example: Renamed Folder
Response
{ "msg": "OK", "server_time": "2017-08-11 04:28:53", "status": 200, "result": "true" }
GET

Delete Folder

Delete a folder. If the folder contains files or subfolders, use force=1 to move them and delete anyway.

Endpoint
https://api-v2.ddownload.com/api/folder/delete?key=key&fld_id=fld_id
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
fld_id*
Number
Folder ID to delete. Example: 15
force
Number
Set to 1 to force delete. Files move to root, subfolders to parent.
Response (Success)
{ "msg": "OK", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "deleted_folder": "My Folder", "files_moved_to_root": 5, "subfolders_moved_to_parent": 2 } }
Response (Folder Not Empty)
{ "msg": "Folder contains 5 files. Use force=1 to move files to root and delete folder.", "server_time": "2024-01-15 12:30:45", "status": 400, "result": { "files": 5 } }
GET

Move Folder

Move a folder to a different parent folder. Use parent_id=0 to move to root.

Endpoint
https://api-v2.ddownload.com/api/folder/move?key=key&fld_id=fld_id&parent_id=parent_id
Parameters
key*
String
API key. Example: 1hj124iod23j12gd3
fld_id*
Number
Folder ID to move. Example: 15
parent_id*
Number
New parent folder ID. Use 0 for root. Example: 20
Response
{ "msg": "OK", "server_time": "2024-01-15 12:30:45", "status": 200, "result": { "moved": 1, "folder_name": "My Folder", "old_parent_id": 0, "new_parent_id": 20, "new_parent_name": "Archive" } }

You cannot move a folder into itself or into one of its own subfolders (circular reference protection).

Ready to get started?

Get your API key from your account settings and start integrating.

Go to Settings
Sign Up
Enter your email to create an account.
Login
Log in to your account
Forgot your password?
Enter your email to reset your password