RapidShare API - Last updates and revision history on bottom of this document
Routines giving back many values are subject of many changes. For example the routine getaccountdetails returns many key-value pairs. Those pairs
might be sorted differently in the future. Some values might disappear, new values may appear. Make sure your program can handle this changes without
a need for an update. If a value disappears, you should assume a "0" value. If a new value appears, your program should just ignore it. Your program
must not rely on the sort-order of the list.
Follow these rules to avoid unwanted DDOS attacks
=================================================
Since RapidShare serves a very large community, programming errors in popular tools might cause an unwanted DDOS attack to the RapidShare servers.
When programming tools, always keep in mind that your tool might be used by millions of people at the same time. So make sure you do not kill our API servers,
which might cause some big financial issues on your side. Always make sure your program STOPS retrying a failed request after 3 tries. Always make sure you
do not make more API calls than necessary.
How to call the API
===================
https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine (recommended)
http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine (without SSL)
Additional parameters can be added via http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine¶m1=value1¶m2=value2
You can of course also call the API via POST. GET parameters are ignored if the POST method is used. So if you use the POST method, send ALL parameters via POST.
In case you get an error, the reply always starts with "ERROR: " followed by a plain string telling you what is wrong. You should always check this.
The best is if you just output the string to the user. The string is self-explanatory and every user should know what went wrong.
Be careful when giving too many wrong passwords. The password brute-force protection will block your IP when you enter too many wrong passwords and/or killcodes.
This protection has nothing to do with the point system mentioned above and works independently.
Additional globally accepted parameters
=======================================
Every routine taking login and password parameters also accepts the parameter "cookie". If you give "cookie=63AC34AA98443H....", RapidShare will decrypt
the cookie and overwrite the parameters login and password with the parameters stored in the encrypted cookie. This can be understood as a login override.
Every routine also accepts the global parameters "cbf" (callback-function) and "cbid" (callback-ID). If these parameters are given and valid, the reply
of the API-function will be compatible to JavaScript by returning a function call. For example, cbf=myfunction cbid=123 results in myfunction(123,"$output");
Folder based Access Control Lists (Folder ACLs)
===============================================
You can now easily control the distribution of your files by editing the Access Control Lists (ACLs) of your folders. An ACL ist a "-"-separated list of account IDs.
For example: 5424-87585-23-0-446 (0 is special. See below.)
BROWSE ACL: These users may browse your folder by calling a special URL. By doing so, the user will see all available browseable folders. From there he can BROWSE the folders.
This means he can see all files, but not download them. Even if you give them the download link directly, downloading will NOT work without the DOWNLOAD right.
DOWNLOAD ACL: These users may download the files in this folder. If the BROWSE right is not given, browsing is not possible and the user can only download files he knows
the full RapidShare download URL for. This is basically the plain old One-Click Hosting behaviour.
UPLOAD ACL: These users may upload new files into this folder.
The users listed are the names of the users in your contact list. However, some special users exist not being part of your contact list, but defined internally.
Special user 0: This user refers to public access. For example, the standard One-Click Hosting behaviour is BROWSE="", DOWNLOAD="0".
This means you can download any file you know the download link for. To maintain backward compatibility, all folders without any rights specified are
automatically set to this standard behaviour. As soon as you add a user, be sure to add the special user 0 as well if needed.
Mailflags section
=================
The user can decide, which RapidShare e-mails are allowed to be sent to him. The mailflags argument is a simple string of connected letters, where each letter
is standing for a mail type. If it is a capital letter, the user explicitly does NOT want to receive this type of e-mail. If it is a lower case letter, the user
explicitly WANTS to receive this type of e-mail. If the letter is missing, the system may decide. The following letters are available:
i = Tells free users about files to be deleted soon (inactive files)
All subroutines in random chaotic order (Yeah, sorry)
=====================================================
sub=nextuploadserver
Description: Gives the next available upload server to use. See sub=upload for further information.
Parameters: None
Reply fields: 1:The upload server. Complete it with rs$uploadserver.rapidshare.com
Reply format: integer
sub=renamefile
Description: Renames a file to something else. Be aware that your users will not be able to download the file anymore by using the old link!
Parameters: login=ID or username
password=password of the login
fileid=The file ID in question
newname=A new name for the file. Invalid characters will automatically be converted to "_"
Reply fields: 1:new filename
Reply format: string
sub=movefilestorealfolder
Description: Moves one or more files to a RealFolder.
Parameters: login=ID or username
password=password of the login
files=comma separated list of file ids (max. 30.000 bytes)
realfolder=ID of the RealFolder
Reply fields: 1:OK
Reply format: string
sub=editfolders
Description: Edits the properties of the given folders in batch mode.
Parameters: login=ID or username
password=password of the login
commands=A batch of commands to execute. Every command is separated by byte value 255 (%FF).
URL encoded example: folders%3D1,2,3%FFaclul%3D4434-1234%FFacldl%3D%FFfolders%3D10%FFname%3Dtest
This sets aclul to "4434-1234" for folders 1, 2 and 3, deletes acldl and sets the name of folder 10 to test.
Each command sets the value for the folders of the previous folder command.
The available commands are: folders, name, aclbrowse, aclul, acldl
Reply fields: 1:OK
Reply format: string
sub=deletefiles
Description: Deletes one or more files forever. (files parameter limited to 10000 bytes)
Parameters: login=ID or username
password=password of the login
files=comma separated list of file IDs.
Reply fields: 1:OK
Reply format: string
sub=addrealfolder
Description: Adds a new RealFolder
Parameters: login=ID or username
password=password of the login
name=Name of the folder (Max. 250 bytes)
parent=ID of parent folder. 0=root
Reply fields: 1:RealFolder ID
Reply format: integer
sub=delrealfolder
Description: Deletes existing RealFolders including all files in the folders.
Parameters: login=ID or username
password=password of the login
realfolder=ID of the RealFolder (multiple RealFolders allowed by passing a comma-separated list; String limited to 1000 bytes)
Reply fields: 1:OK
Reply format: string
sub=moverealfolder
Description: Changes the parent ID of existing RealFolders.
Parameters: login=ID or username
password=password of the login
realfolder=ID of the RealFolder (multiple RealFolders allowed by passing a comma-separated list; String limited to 1000 bytes)
newparent=New parent ID
Reply fields: 1:OK
Reply format: string
sub=listfiles
Description: Lists all files in a given format in a given RealFolder or in all RealFolders. While there is no limit how many files an account can save, this routine will
return max. 10.000 files. If you get exactly 10.000 files, some files might be skipped. Please tell the user to use folders now.
RapidShare is built to support accessing old versions of the files. If you see entries with the same filename in the same RealFolder, only display the newest
file (uploadtime) to the user. The user should be able to access the old files (for example by right clicking the filename). You should NOT display old file
versions like indepentent files, as this will confuse the users.
IMPORTANT: Do NOT call listfiles for every folder, before the user explicitly requests the content of the folder. Users can have over 10.000 folders and this
will lock the account automatically due to prohibited infrastructure attacks.
Parameters: login=ID or username
password=password of the login
realfolder=ID of the real folder to list files from. 0=root all=All folders (max. 3000 entries will be returned!)
filename=Optional. Give a filename to get only results where filename=$filename. Search for %test% to find any filename containing 'test'.
fileids=Optional. Give a comma-separated list of file IDs to get only results with the corresponding file IDs. fileids=1545615,1345154,215143 (Limited to 3000 bytes)
fields=A comma separated list of database columns you want to receive. You will always receive the fileid.
Example: fields=downloads,size will reply many lines in the format "$fileid,$downloads,$size\n"
Available columns: downloads,lastdownload,filename,size,serverid,type,x,y,realfolder,killdeadline,uploadtime,comment,md5hex,licids,sentby
Format: Everything is human readable except timestamps, which are unix timestamps (integers).
contact=If given, lists the files of the remote contact. realfolder must be given as well, since we check for the BROWSE ACL permission.
If the contact has given the public browse right to the given folder, login and password is not needed.
Reply fields: 1:fileid
2:dynamically adjusted
OR
"NONE" (if no results are found, it returns just "NONE")
Reply format: integer,fields (provided fields depend on your request)
sub=listrealfolders
Description: Returns all found RealFolders. Returns "NONE" if the result is empty.
Parameters: login=ID or username
password=password of the login
Reply fields: 1:RealFolder ID
2:Parent RealFolder ID
3:Name of the folder
4:BROWSE ACL
5:UPLOAD ACL
6:DOWNLOAD ACL
Reply format: integer,integer,string,string,string,string\n (One line per record)
sub=listcontacts
Description: Returns all available contacts. Returns "NONE" if the result is empty.
Parameters: login=ID or username
password=password of the login
Reply fields: 1: The contact string
2: Name
3: e-mail address
4: add time
5: last send time
Reply format: integer,string,string,integer,integer\n (One line per record)
sub=listcontactrequests
Description: Returns all still pending contact requests. Returns "NONE" if the result is empty.
Parameters: login=ID or username
password=password of the login
Reply fields: 1: Contact's name
2: Contact's e-mail address
3: last request time (requests may be sent again.)
Reply format: string,string,integer\n (One line per record)
sub=deletecontactrequest
Description: Deletes a pending contact request. The contact can't be added anymore, even if the recipient clicks on the link in the e-mail.
Parameters: login=ID or username
password=password of the login
email=The e-mail address of the contact-request to delete.
Reply fields: 1: OK
Reply format: string
sub=listremotefolders
Description: Returns all shared folders of the given contact ID and the respective permissions. Permission might be one of the following numbers:
0=No right for you.
1=ONLY you have this right on that folder.
2=A few persons have this right, but not public.
3=Everyone has this right.
Notes: If the result is completely empty, it just returns "NONE".
Parameters: login=ID or username (Optional)
password=password of the login (Optional)
contact=The contact string of the remote file system.
Reply fields: 1:RealFolder ID
2:Parent RealFolder ID
3:Name of the folder
4:May upload permission
5:May download permission
6:Marks if account is full (0=OK, 1=Too many files, 2=Storage limit reached, 3=Files+Sorage limit reached)
Reply format: integer,integer,string,integer,integer,integer\n (One line per record)
sub=getaccountdetails
Description: Returns key-pair values for the specific account. Warning: The order may change, and we will probably add or remove values in the future.
You should make sure that your program does not stop working if new values appear or existing values disappear.
Parameters: login=ID or username
password=password of the login
withpublicid=1 (Optional. If given, the reply also contains the always-changing public ID via publicid=STRING)
withcookie=1 (Optional. If given, the reply also contains cookie=STRING. You need this string only if you need to set a valid encryped cookie.)
Reply fields: 1:key 2:value
Reply format: string=string or integer\n...
Reply example: accountid=integer
name=string
servertime=integer
addtime=integer
username=string
directstart=integer
country=2 capital letter country code
mailflags=A short string explaining what e-mails the user wants to receive (See mailflags section)
language=2 lower-case letter language code
jsconfig=string
email=string
curfiles=integer
curspace=integer
rapids=integer
billeduntil=integer
nortuntil=integer
maxspacegb=integer
additionalspacegb=integer
isfa = integer
publicid=string (Optional. See 'withpublicid' above.)
cookie=string (Optional. See 'withcookie' above.)
sub=setaccountdetails
Description: Changes the settings of an account. Every parameter is optional. Not transmitting a parameter name means not changing it. If you want to clear a value,
send "username=" for example.
Parameters: login=ID or username
password=Password of the login
newpassword=Sets a new password.
email=Sets a new e-mail address. (When this is changed, the user will receive an e-mail, which has to be confirmed.)
username=Sets a new username to login as an alias.
name=Got married?
directstart=1 or 0. Downloads will start instantly.
jsconfig=A custom value, which can be set as you like. Max. 64 alphanumeric characters.
country=XX (2 capital letter country code. We need this for VAT reasons.)
mailflags=An optional short string explaining what e-mails the user wants to receive (See mailflags section)
language=XX (2 lower-case letter language code. If undefined, we choose the browser settings for web pages and english for e-mails.)
manualpw=your password (the transmitted cookie will not fill this field automatically). Only required if you change e-mail and/or password.
Reply fields: 1:OK
Reply format: string
sub=confirmemailchange
Description: When you change your e-mail address via setaccountdetails, you will get an e-mail to your new e-mail address containing a link you have to click. If you do not
click the link, nothing is changed. The link expires after 24 hours.
Parameters: auth=The auth string
Reply fields: 1:OK
Reply format: string
sub=checkfiles
Description: Gets status details about a list of given files. (files parameter limited to 3000 bytes. filenames parameter limited to 30000 bytes.)
Parameters: files=comma separated list of file ids
filenames=comma separated list of the respective filename. Example: files=50444381,50444382 filenames=test1.rar,test2.rar
Reply fields: 1:File ID
2:Filename
3:Size (in bytes. If size is 0, this file does not exist.)
4:Server ID
5:Status integer, which can have the following numeric values:
0=File not found
1=File OK
3=Server down
4=File marked as illegal
6:Short host (Use the short host to get the best download mirror: http://rs$serverid$shorthost.rapidshare.com/files/$fileid/$filename)
7:MD5 (hexadecimal)
Reply format: integer,string,integer,integer,integer,string,string
sub=sendmail
Description: You may send an e-mail to someone containing files. E-mail sending is restricted and has several anti-spam methods included.
Parameters: name=YOUR name
replyemail=YOUR e-mail address (required, so users can reply to their received e-mails)
subject=Max. 64 bytes of a freely chooseable subject
comment=A comment you want to attach to your e-mail. "<" and ">" are substituted by "_". \n is substituted by
.
email1=First e-mail address to send to
email2=Second e-mail address (optional)
email3=Third e-mail address (optional)
fileid1=File ID 1 to inform the receiver about
filename1=The filename for fileid1 (required)
fileidX=Same as above. Supported up to fileid99
filenameX=Supported up to filename99
Reply fields: 1: OK
Reply format: string
sub=getrapidtranslogs
Description: Downloads log files to give you detailed infos about your Rapids Transactions. Max. 1000 entries will be displayed.
Parameters: login=ID or username
password=password of the login
Reply fields: 1: time
2: ip
3: rapids (Positive number = received Rapids, negative number = Spent Rapids)
4: reason
Reply format: integer,integer,integer,string
sub=remotegets
Description: Manages your remote uploads to RapidShare.
Parameters: login=ID or username
password=password of the login
cmd=Command. See descriptions below.
cmd=addjob
Description: Adds a job to the queue.
+Parameters: folderid=An optional folder ID to save the files to.
urls=A long text field separated by new lines. Every line contains one URL.
Reply fields: OK
Reply format: string
cmd=killfinishedjobs
Description: Deletes all finished jobs from the queue.
Reply fields: OK
Reply format: string
cmd=killjobs
Description: Deletes jobs with the job identifiers ID. Notice that its not possible to delete jobs having status 0, 1 or 4.
You will not get an error, but the job is just not deleted.
+Parameters: jobids=ID,ID,ID,ID.....
cmd=listjobs
Description: Gives a detailed list of all currently stored jobs.
Reply fields: id=Unique job identifier.
size=Bytes currently downloaded.
ulsize=Bytes already uploaded to RapidShare.
status= 0: Unprocessed (only visible for a few seconds, if at all).
1: Downloading from remote server.
2: Download aborted because the file became too big.
3: Download aborted because the file downloaded too long.
4: Download finished. Uploading to RapidShare.
5: Upload to RapidShare finished. Job finished.
7: Upload failed 3 times for unknown reasons. Job aborted.
8: Upload failed because the file is black listed.
9: Download failed for unknown reasons.
11: Enqueued for later processing because this account already downloads 5 files at the same time.
12: Upload failed! Account is full.
fileid=After a finished upload, the RapidShare file ID is stored here.
url=The URL where the file is downloaded from.
Reply fields: integer,integer,integer,integer,integer,string
sub=claimcoupon
Description: Claims a coupon and transfers the Rapids to your RapidShare account.
Parameters: login=ID or username
password=password of the login
couponcode=The coupon code.
country=The country you live in (2-3 letter code, optional.)
Reply fields: 1: rapids (how many Rapids your account got)
2: days (how many days your account got. This is NOT the calculated days from the Rapids above! Coupons CAN contain Rapids AND/OR days independently.)
Reply format: integer,integer
sub=customdb
Description: In order to help you create cooler programs, we offer you the possibility to use a simple account based key value database.
Every account can store up to 100 independent records. If you need to store user dependent data, you should choose a keyword, which will not be chosen
by someone else by coincidence. You should avoid general keywords like "data" or "test". Keywords can contain up to 64 alphanumeric characters.
If your program name is called "Cool Download Manager V2", we recommend using something like "CoolDownloadManager_V2_data".
IMPORTANT: If you need to store several values, do not fall to the bad habit to create a db-key for every value. Create ONE key for your
application and use a container format for all your values. Maybe comma separated, or new-line separated. Whatever you can work with.
Parameters: login=ID or username
password=password of the login
keyword=The keyword to apply the command to. (Not required for cmd=list)
cmd=Command to execute within this module. See below.
cmd=list
Description: Returns a list of all currently existing keywords.
Reply fields: Comma separated list of keywords.
Reply format: string,string,string...
cmd=write
Description: Overwrites (or creates) the key "keyword". Returns an error if the maximum amount of allowed keys is exceeded.
+Parameters: value=Up to 65.000 bytes of binary data. For security reasons, % < > will be escaped to %XX. The 65.000 limit will be checked AFTER conversion!
Reply fields: OK
Reply format: string
cmd=read
Description: Reads the value stored with the given keyword. Returns "ERROR: Key not found." if the key does not exist.
Reply fields: value stored
Reply format: unfiltered binary data
cmd=delete
Description: Deletes the given key completely. Returns "ERROR: Key not found." if the key does not exist.
Reply fields: OK
Reply format: string
sub=fetchpublickeyfromcustomdb
Description: Keys starting with public_ can be fetched by anonymous users.
Parameters: username=Username of the user
keyword=The keyword to read. Returns "ERROR: Key not found." if the key does not exist.
Reply fields: 1: The value of the key
Reply format: string
sub=newpremiumaccount
Description: Creates a new premium account and sends an e-mail to "email". The user has to click the validation link in the e-mail in order to activate the account.
Parameters: username=Needed for logging in (must be unique system wide)
name=Your name (does not need to be unique)
email=a valid e-mail address
password=the password or your choice
isfa = Set to "1" if you want a "FreedomAccount" (default is 0)
confirmcontact=Contact confirmation string. If given, the contact will be automatically confirmed after a successful signup. See sub=requestcontact.
If the signup e-mail is the same than the e-mail used to contact the user, the account will be automatically verified as well.
country=Your country. Two upper-case letter code. If not given, the IP will tell us.
Reply fields: 1: the new account ID
2: the encrypted cookie string
Reply format: integer,string OR integer,string,$contactdata
$contactdata: If confirmcontact is given, the string is extended by "," + $contactdata, which contains the following data:
"$contact,$contactname,$contactemail,$ownname,$ownemail,$fileid1/$filename1,$fileid2/$filename2....."
sub=validateaccount
Description: Activates a new created premium account.
Parameters: accountid=the account ID
authcode=the authentification code as seen in the e-mail sent to the user.
Reply fields: 1: OK
Reply format: string
sub=requestcontact
Description: Requests permission to add a user to your contact list. Needed to directly send files to the contact's account via sub=rapidsave.
The recipient will receive an e-mail asking for permission. The user will see ownname, contactname and contactemail in this e-mail.
You will see the new contact within sub=listcontacts only after the recipient's comfirmation.
Parameters: login=your ID or username
password=your password
ownname=Your name (this name will be used in the address book of the user you want to add)
contactname=The name of your contact (this name will be used in your own address book)
contactemail=The e-mail addess of your contact (this addess will be used in your own address book as well)
comment=An optional comment for the receiver. Max. 250 bytes.
fileids=A list of file IDs in your account you want to send. Optional. If given, the files will be copied as soon as the recipient has confirmed the contact.
Reply fields: 1: OK
Reply format: string
sub=confirmcontact
Description: Confirms a contact request. After confirmation, both parties will have the new contact book entry and can start sending files to each other.
Parameters: login=your ID or username
password=your password
string=The confirmation string, which is sent to the recipient via e-mail by calling sub=requestcontact
Reply: $contact,$contactname,$contactemail,$ownname,$ownemail + ",$fileid/$filename" for every attached file.
sub=editcontact
Description: Edits an existing contact. You can change the name and the e-mail address of each contact.
Parameters: login=your ID or username
password=your password
contactid=The account ID of the contact (see sub=listcontacts)
name=A new name for your contact
email=A new e-mail for your contact
Reply fields: 1: OK
Reply format: string
sub=deletecontact
Description: Deletes an existing contact.
Parameters: login=your ID or username
password=your password
contactid=The account ID of the contact (see sub=listcontacts)
Reply fields: 1: OK
Reply format: string
sub=giverapids
Description: Transfers an amount of Rapids to another Premium account. The Rapids will be transferred immediately.
Parameters: login=your ID or username
password=your password
manualpassword=your password (the transmitted cookie will not fill this field automatically)
toaccountid=The recipient's account ID.
rapids=how many Rapids you want to send. Valid range: 100 to 9999
message=an optional short message to the recipient (max. 100 bytes)
Reply fields: 1: OK
Reply format: string
sub=licensemanager
Description: You can create Licenses and connect them to your files. Files with Licenses can only be downloaded by users owning a PLicense.
A PLicense is a Purchased License, thus a legitimate copy of a License. This way you can offer Licenses to be purchased for Rapids.
Parameters: login=ID or username
password=password of the login
cmd=Command to execute within this module. See below.
cmd=listlicenses
Description: Returns a list of all your created licenses.
Reply fields: 1: License ID
2: Name
3: Description
4: Rapids (Price)
5: Hours valid
6: Add time (Unix-Timestamp)
7: Last edit time (Unix-Timestamp)
8: Valid until (Unix-Timestamp)
Reply format: "integer","string","string","integer","integer","integer","integer","integer"\n (one line per record)
cmd=addlicense
Description: Creates a new license. You need to create a license first before you can sell products.
Parameters: name=The name of the product. This will be shown as a headline to your customers.
description=The description of the product. This will be written below the name using a smaller font.
rapids=How many Rapids are needed to buy this license. (0-50000)
hoursvalid=Optional. How many hours the license is valid after purchase. (0-65000)
validuntil=Optional. If given, this unix-timestamp says how long this license is purchaseable. 0=Unlimited
Reply fields: 1: License ID
Reply format: string
cmd=editlicense
Description: Edits an existing license. Skipping a parameter means setting it to 0 or ""!.
Parameters: licid=License ID to edit.
name=The name of the product. This will be shown as a headline to your customers.
description=The description of the product. This will be written below the name and of course smaller than the name.
rapids=How many Rapids are needed to buy this license. (0-50000)
hoursvalid=Optional. How many hours the license is valid after purchase. (0-65000)
validuntil=Optional. If given, this is a unix-timestamp describing how long one can purchase this license. 0=Unlimited
Reply fields: OK
Reply format: string
cmd=deletelicense
Description: Deletes the given license ID. This will fail if you still have files connected to this license ID.
Parameters: licid=License ID to delete.
Reply fields: OK
Reply format: string
cmd=managefiles
Description: Attaches or deletes the given license to the given files.
Parameters: licid=The license-ID to add
files=Comma separated list of file IDs you want to affect.
mode="add" to add a license, or "del" to remove a license.
Reply fields: 1: Number of affected files.
Reply format: integer
cmd=editplicense
Description: Edits a PLicense. The seller and the buyer may edit the PLicense. So far only a comment can be set. The buyer's comment and
the seller's comment are independent and a secret to each other.
Parameters: licid=License ID to edit.
role="seller" or "buyer".
comment=A comment. Max. length 4096 bytes.
plicowner=The account ID OR the public ID of the owner of the PLicense. Only required if role=Seller.
Reply fields: OK
Reply format: string
cmd=listsoldplicenses
Description: Returns a list of all sold PLicenses including the public ID of the owner of the PLicense.
Parameters: licid=License ID to list.
Reply fields: 1: Public ID
2: Valid until (unix timestamp)
3: How many Rapids the user paid for this license.
4: Time the PLicense was given (unix timestamp)
5: The comment you attached to the PLicense.
Reply format: string,integer,integer,integer,string\n (One line per record)
sub=getfilelicenses
Description: Returns a list of available license choices for the given file ID. This routine is for potential customers. Expired and 0-Rapids licenses are hidden.
Parameters: fileid=The file ID to get the available license options from.
Reply fields: 1: License ID
2: Name
3: Description
4: Rapids (Price)
5: Hours valid after purchase per customer (0=Unlimited)
6: Valid until (Unix-timestamp 0=Unlimited)
Reply format: "integer","string","string","integer","integer","$integer"\n (one line per record)
sub=getpurchasedlicenses
Description: Returns a list of all purchased licenses.
Parameters: login=your ID or username
password=your password
Reply fields: 1: License ID
2: Valid until (unix-timestamp. 0 = unlimited)
3: Paid Rapids (How many Rapids you have paid to own this license.)
4: Purchased at (Unix-Timestamp)
5: IP address you had when you purchased this license
6: Name
7: Description
8: Rapids (Actual value of the license. NOT what you have paid, but what the actual price is right now.)
Reply format: "integer","integer","integer","integer","string","string","string","integer"\n (one line per record)
sub=purchaselicense
Description: Purchases the given license. For security reasons, you have to enter your password by hand. Coders MUST NEVER automate this process.
Parameters: login=Your ID or username
password=Your password
licid=License ID
password2=Your password, entered by your own hands.
rapids=How many Rapids you want to pay. (Yes, you MAY pay more than neccessary. You get an error if this is lower than the price.)
Reply fields: 1: OK
Reply format: string
sub=listfilesinlicense
Description: Lists all files in a given format in a given license
Parameters: login=ID or username
password=password of the login
licid=License ID
fields=A comma separated list of database columns you want to receive. You will always receive the fileid.
Example: fields=filename,size will reply many lines in the format "$fileid,$filename,$size\n"
The following file columns are available: filename,size,serverid,type,x,y,killdeadline,licids,md5hex
WARNING: "licids" WILL contain commas! To safely use licids, it has to be the last field so you effectively limit the split operation to x fields.
Format: Everything is human readable except timestamps, which are unix timestamps (integers).
Reply fields: 1:fileid
2:dynamically adjusted
OR
"NONE" (if no results, it returns "NONE")
Reply format: integer,fields (fields depending on fields you request)
sub=resendauthcode
Description: Resends the auth code to unlock a new unused premium account.
Parameters: login=Your account ID or your username
password=Your password
Reply fields: 1: OK
Reply format: string
sub=upload
Description: Call this function to upload a file to RapidShare. SSL uploads are possible without problems. BEFORE uploading to our servers, you MUST call sub=nextuploadserver
in order to get the next free upload server. The sub=upload call MUST NOT be called at api.rapidshare.com, but at rs[nextuploadserver].rapidshare.com. Replace
[nextuploadserver] with the number replied by sub=nextuploadserver.
Parameters: login=ID or username
password=password of the login
incomplete=1 (Optional. If given, the file can be resumed using sub=uploadresume)
folder=Optional folder ID to upload the file to.
filename=By default, RapidShare takes the provided filename in the multi-part encoding. This parameter overrides it.
filecontent=The actual file. The limit is 2 GB. You can upload files up to 100 GB by using sub=uploadresume.
uploadid=A random 8-18 digits number. You only need this if you want to call sub=uploadprogress. Useless if you are no browser.
For technical reasons this parameter has to be given in the HTTP header (GET paramter) AND in the HTTP body (POST parameter).
Example: POST Call via "rsapi.cgi?uploadid=12345", all other parameters (PLUS the same uploadid again as well) via input type hidden.
contact=Uploads the file to a foreign account. For this to work, you have to provide a folder. The folder has to have upload right granted for you.
You MAY upload anonymously (not providing login and password) if the owner has granted the public upload right.
Reply: The first line is "INCOMPLETE" or "COMPLETE", followed by \n (You might get COMPLETE even if you sent incomplete=1 in case an identical file already exists within the RapidShare platform.)
Each following line is standing for one uploaded file.
1: The file ID (you might get an already existing file ID if the identical file already exists in your account AND in the same folder.)
2: Received size in bytes.
3: Lower case MD5 hex of the sent data.
Reply format: integer,integer,string\n (One line per file)
sub=uploadresume
Description: Call this function to resume an incomplete file. This is only possible if you used sub=upload with the parameter incomplete=1 before.
You can call this function as often as you want.
Parameters: login=ID or username
password=password of the login
fileid=The file ID you want to resume. Must be an incomplete upload (type=250 in sub=listfiles)
complete=If 1, this is the last chunk. After this, the file will be sealed and is available for downloading.
md5hex=Optional. The hex MD5 value in lower-case letters of the file. If the given and the calculated md5 values do not match, you will get an error.
filecontent=The actual file data. Must be between 500.000 and 100.000.000 bytes.
Reply fields: 1: If request parameter md5hex is given, it returns "OK", else it returns the calculated chunk hex MD5.
Reply format: string
sub=download
Description: Call this function to download a file from RapidShare. You can use http:// or https:// (SSL). Since this function is also called by browsers,
we append a JavaScript to every error message, which redirects the user to our homepage. Line 1 is the plain error string as usual, while
line 2 is JavaScript code for browser redirection.
Parameters: fileid=File ID
filename=Filename
login=Your login (Optional parameter. Required for downloading licensed content and folder-restricted content.)
password=Your password
[start|position]= You can specifiy where to start downloading. Valid examples are: start=123000 start=0-10000 position=5000-10000 position=50000
directstart=1 If given, the download will start instantly. Only parsed if called via rapidshare.com/files/$fileid/$filename.
try=1 If given, it will always reply DL:$hostname,0123456789,0,$md5hex. Useful if you rely on a text reply for the first call. Only parsed if NOT called via rapidshare.com/files/$fileid/$filename.
Reply: If this sub is called via rapidshare.com/files/$fileid/$filename it works as follows:
Call this function with fileid, filename and optionally with login and password (Cookie overrides browser login parameters.)
If directstart=1 is given, you will instantly get the file (maybe after an automatic relocation.)
If directstart is not given, you will get
If this sub is called natively via the API, it works as follows:
Call this function with fileid, filename and optionally with login and password. If you called the correct server, you will instantly get the file.
In case you called the wrong server (or you have given try=1), you will get "DL:$hostname,0123456789,0,$md5hex". Repeat the same call on http(s)://$hostname to get the file.
Notice: 0123456789 is a dummy value for backward-compatibility. Ignore this value. Same for the following 0, which is also a dummy value now.
sub=forgotpw
Description: With this function you can request an e-mail with steps how to reset your password.
Parameters: email=The e-mail address you registered your account with.
Reply fields: 1: Number of e-mails sent.
Reply format: integer
sub=confirmpasswordreset
Description: This function is called to set a new password for your account.
Parameters: auth=The auth string as seen in the e-mail sent by sub=forgotpw
newpassword=A new password to save.
Reply fields: 1: OK
Reply format: string
sub=sendmailtosupport
Description: Sends an e-mail to the RapidShare support.
Parameters: from=Your own e-mail address, which is required so that we can contact you.
subject=Up to 20 alphanumerical characters
text=Your Text. Unicode allowed. Max. 20000 letters
Reply fields: 1: OK
Reply format: string
sub=verifyerror
Description: Verifies if a RapidShare error message is authentic. Returns an error on fail.
Parameters: error=The full error. "ERROR: A valid error message (magic)"
Reply fields: 1: OK
Reply format: string
sub=uploadprogress
Description: Returns information about your current uploads. NOTICE: You have to call this function at the same server the upload is currently running.
Parameters: uploadid=The upload ID
Reply fields: 1: Received bytes so far (bytes)
2: Expected size (bytes)
3: Server timestamp in milliseconds
4: Status
0=Uploading
1=Upload OK
2=File too big
3=API Login failed
4=Illegal file detected
5=Some uploads OK, some illegal files detected (multi file upload with one call)
6=Upload sub called the wrong way. See upload api doc and plain error text reply of the sub=upload call.
7=Upload to foreign account failed. Account owner did not give permission.
8=Account's technical storage limit reached.
5: If the upload is successful, this string is "FILEID,FILENAME,SIZE,MD5HEX".
Reply format: integer#integer#integer#integer#string
sub=rapidsave
Description: Parses a given text, fetches all RapidShare links and saves all found files to the destination. Scenarios can be:
1. Copying files from one folder to another folder within your own account.
2. Copying files from your account to someone else's account. (with or without target folder)
3. Copying files from a foreign account to a specified folder in your own account.
Parameters: login=ID or username
password=password of the login
realfolder=The RealFolder ID to put all files into. Optional for sending files to someone else.
text=A text containing RapidShare links (max. 30.000 bytes)
contact=An optional remote contact to send the files to.
Reply fields: 1: Number of valid files parsed.
2: Sum of bytes of all valid files.
3: "No title" (Historic reasons. May be removed in the future.)
4: Multi line human readable result string. You should parse this for "ERROR: ".
Reply format: integer,integer,string\nlong multi-line string
sub=editfilecomments
Description: Edits the comments saved with your files. Multiple files may be given to set or delete the comment on all of them.
Parameters: login=ID or username
password=password of the login
files=comma separated list of file ids. Limited to 10.000 bytes.
comment=The comment. Limited to 4096 bytes.
Reply fields: 1: Number of updated records.
Reply format: integer
sub=requestlowlevelaccessauthstring (Yeah, long name. Sue me!)
Description: Requests access to the low level access API. This API allows you to use block based commands for reading and writing files and is
essential for creating virtual drives with RapidShare. See Low Level API Documentation for details.
Parameters: login=ID or username
password=password of the login
version=2.57785 (You have to supply this)
Reply fields: 1: Auth string. Valid for one hour.
Reply format: string
sub=requestlowlevelaccess
Description: Requests low level access on any server. You need a valid auth string, which can be requested via requestlowlevelaccessauthstring.
Parameters: auth=Low level access auth string (see sub=requestlowlevelaccessauthstring)
version=2.57785 (You have to supply this)
Reply: On success, it returns "BIN\n" and does not close the connection. On error, it returns "ERROR: message" and closes the connection.
sub=eventparticipate
Description: Participates on the given event.
Parameters: login=ID or username
password=password of the login
eventid=The ID of the event.
customstring=An optional custom string to be saved.
Reply fields: 1: OK
Reply format: string
sub=extendrapidpro
Description: Manually extends RapidPro.
Parameters: login=ID or username
password=password of the login
rapids=Amount rapids to be converted into runtime
Reply fields: 1: OK
Reply format: string
sub=gettrafficlogs
Description: Downloads log files to give you detailed infos about your outgoing traffic.
Parameters: login=ID or username
password=password of the login
type=public, group, self or classic
today=1 (If given, the result will only be dlkb for today. Date not included.)
Reply fields: 1: date in YYYY-MM-DD
2: dlkb
Reply format: string,integer\n (one line per record)
sub=invitefriend
Description: Invite a friend to use RapidShare.
Parameters: login=ID or username
password=password of the login
email= e-mail of your friend
friendname= Name of your friend
ownname = Name to identify yourself
Reply fields: 1: OK
Reply format: string
sub=showcommissions
Description: Show a list of earned/pending commissions.
Parameters: login=ID or username
password=password of the login
Reply fields: 1: paytime (when a friend did a payment)
2: payoutrequest (when you requested a payout)
3: amount (commission you get. may be 0 in case of chargebacks)
4: payouttime (when we processed your payout)
or "NONE" if list is empty.
Reply format: unix_timestamp, unix_timestamp, float, unix_timestamp
sub=payoutcommissions
Description: Claims a payout. You need at least 20EUR of payable amount.
Parameters: login=ID or username
password=password of the login
ppemail= Your PayPal e-mail we use for payouts.
Reply fields: 1: OK
Reply format: string
Low Level File Access Documentation
===================================
This is a BETA feature. Please do not use in production systems outside RapidShare yet.
RapidShare supports low level file access. This function is needed to implement RapidShare into block device drivers.
The following is a step-by-step description, how a typical low level access works:
First you have to request low level access. This is done by sub=requestlowlevelaccessauthstring, which is a standard HTTP request.
You will receive an auth string, which is valid for one hour. Now you can establish binary connections with RapidShare.
Connect to any server and call the HTTP request sub=requestlowlevelaccess. On success, you will receive "BIN\n" and then you can
start sending binary commands to the server. To read files from the server, you need to know which files are available and the server,
where they are stored. To do this, use the binary call ListFiles. Please do not call ListFiles more often than necessary. The calls are
logged and flooding will result in a closed account. Use wise caching here. When you know the file and server, connect to the server.
Call sub=requestlowlevelaccess on the server to enter binary context like you did before. Send binary OpenFileHandle and then ReadData.
Performance hints:
- SSL is supported, but without encryption it is a little bit faster.
- Be prepared for unexpected connection closes. In such case, you may try to reconnect immediately.
- RapidShare uses tcp buffers of 512 KB in both directions. You should do the same. This speeds up TCP connections.
- You MAY send multiple read commands at the same time (queueing). You will receive the response in the same order as the requests
have been sent. This makes sense if you have many small read commands on the same file. To make sure you have received the full API packet,
the length of every packet type is well defined in the protocol. Notice that there is a limitation in the queuing method. When the RapidShare
TCP send buffer overflows, the connection is immediately dropped. So make sure that our TCP write buffer does not overflow ;)
The complete communication is binary oriented. This means, you have to forget about easy new line separators and you can not use
methods like ReadLine() (.NET hint: Use the Socket class. Forget the TcpClient class.)
General rule:
Everything starts with an one-byte command initializer. The length of the command itself depends on the command.
In case of non-fixed-length commands, the length of the command is specified in the command definition.
Commands accepted by the server:
Command: ReadData
Binary: 1(byte) + seekH(byte) + seekL(uint) + length(uint)
Description: Reads length bytes of data from position seekH*2^32+seekL. Files bigger than 254*4 GB are not supported. length is limited to 600.000 bytes;
If seekH is 255, no seek will be done. In this case, continuous read requests will start where the last one finished.
Errors: 002: Invalid length value.
003: No file handle is open. Call OpenFileHandle before!
004: Invalid seek value.
005: Unable to read file data from system.
006: is greater than the remaining file.
007: Download permission denied by owner.
008: Bandwidth throttlling on. Please wait length/50000 seconds and then retry the call.
Command: WriteData
Binary: 2(byte) + seekH(byte) + seekL(uint) + length(uint) + length bytes of data to write
Description: Writes length bytes of data from position seekH*2^32+seekL. Files bigger than 254*4 GB are not supported. length is limited to 600.000 bytes;
If seekH is 255, no seek will be done. In this case, continuous write requests will start where the last one finished.
If the write is bigger than the file, the data will be appended. You can not seek to a position larger than the file itself.
WARNING: WriteData contains a truncate function. If length is 0, the file will be truncated to seekH and seekL! For this reason, you should
implement a double check before sending write requests that you actually send data to be written!
Errors: 001: No file handle is open. Call OpenFileHandle before!
002: File does not exist anymore.
003: Writing to this file is not allowed, because the file has been symlinked by other users or by the same user in a different folder.
004: Invalid length value.
005: Invalid seek value.
006: Files > 100.000.000.000 bytes not allowed.
007: Internal file system error
008: Upload permission denied by owner.
Command: OpenFileHandle
Binary: 3(byte) + fileId(uint)
Description: Open file handle for file ID . This command is only required to open a NEW file handle, since you already have opened your initial
file handle by calling sub=openfilehandle.
Errors: 001: File not found.
002: File is marked as illegal and can't be opened.
003: Foreign file access denied by account owner.
004: This file requires a license, which you do not own.
005: Physical file access failed.
Command: GetUploadServers (Only api.rapidshare.com)
Binary: 4(byte)
Description: Requests a list of all upload servers accepting new files. You must choose a random server from that list. You only need to call this function once.
The only case you have to recall this function is when CreateNewFile returns error 218.
Errors: None
Command: CreateNewFile
Binary: 5(byte) + folderId(ushort) + contactId(uint) + contactMd5(16 bytes) + nameLength(byte) + name(nameLength bytes)
Description: Creates a new empty file in your account (contactId=0) or in the contact's account in the given folder folderId. Call this on a server randomly selected
via GetUploadServers. In case you get error 218, you need to call GetUploadServers again.
Errors: 001: Uploads on this server not allowed. If you get this, call GetUploadServers again.
002: Invalid contact MD5. (CRIT)
003: Uploading to foreign accounts requires target folder.
004: Uploading to foreign account failed. Target folder not found.
005: Uploading to foreign account failed. Upload permission denied by account owner.
006: Too many files in target account.
007: Error creating file on local file system.
008: Invalid filename. Allowed (regexp): '\w\-\.\x80-\xF7\ \!\#\$\%\&\(\)\+\;\=\~'
009: Storage limit reached.
Command: DeleteFile (Only api.rapidshare.com)
Binary: 6(byte) + fileId(uint)
Description: Deletes a file. To delete many files, use command queueing to speed up the operation. Notice that it does not matter on which server you call this function.
Errors: 001: File deletion permission not given.
Command: ListFiles (Only api.rapidshare.com)
Binary: 7(byte) + folderId(ushort) + contactId(uint) + contactMd5(16 bytes)
Description: Requests a list of all files in folder folderId. If folderId is 65535, files from all folders will be returned. This routine does not return more than 10.000
files at all. If the account has <= 10000 files, you can call with folderId 65535. If it has more than 10.000 files, you need to call this routine on demand
for every folder the user accesses.
Errors: 001: Invalid contact MD5. (CRIT)
002: Listing a foreign folder requires a valid folderId.
003: Fetching foreign folder file list failed. Folder not found.
004: Listing foreign folder failed. List permission not granted by account owner.
005: No files found in folder.
006: Permission denied by folder owner.
Command: ToggleEventNotifier (Only api.rapidshare.com)
Binary: 8(byte) + switch(byte)
Description: This toggles the event notifier. switch=0 means off, switch=1 means on. While on, this connection receives live events as defined in the client command section.
Command: ListFolders (Only api.rapidshare.com)
Binary: 9(byte) + contactId(uint) + contactMd5(16 bytes)
Description: Requests a list of all folders. For foreign accounts, only folders allowed to access will be returned.
Errors: 001: Invalid contact MD5. (CRIT)
002: No folders found.
003: Browsing denied by folder owner.
Command: CreateNewFolder (Only api.rapidshare.com)
Binary: 10(byte) + folderId(ushort) + contactId(uint) + contactMd5(16 bytes) + nameLength(byte) + name(nameLength bytes)
Description: Creates a new empty folder in your account (contactId=0) or in the contact's account in the given folder folderId.
Errors: 002: Invalid contact MD5. (CRIT)
003: Uploading to foreign accounts requires target folder.
004: Uploading to foreign account failed. Target folder not found.
005: Uploading to foreign account failed. Upload permission denied by account owner.
006: Too many folders in target account.
008: Invalid filename. Allowed (regexp): '\w\-\.\x80-\xF7\ \!\#\$\%\&\(\)\+\;\=\~'
Command: DeleteFolder (Only api.rapidshare.com)
Binary: 11(byte) + folderId(ushort) + contactId(uint) + contactMd5(16 bytes)
Description: Deletes a folder (including all files) in your account (contactId=0) or in the contact's account in the given folder folderId.
Errors: 001: File deletion permission not given.
002: Invalid contact MD5. (CRIT)
003: Accessing foreign accounts requires target folder.
004: Accessing foreign account failed. Target folder not found.
005: Accessing foreign account failed. Access permission denied by account owner.
Command: RenameFile (Only api.rapidshare.com)
Binary: 12(byte) + destinationFolderId(ushort) + fileIdOrFolderId(uint) + contactId(uint) + contactMd5(16 bytes) + nameLength(byte) + name(nameLength bytes)
Description: Renames a fileId OR a folderId to name. IDs below 65535 are always folders. If its not your entry, contact details have to be given.
Errors: 001: Rename permission not given.
002: Invalid contact MD5. (CRIT)
003: Accessing foreign accounts requires target folder.
004: Accessing foreign account failed. Target folder not found.
005: Accessing foreign account failed. Access permission denied by account owner.
008: Invalid filename. Allowed (regexp): '\w\-\.\x80-\xF7\ \!\#\$\%\&\(\)\+\;\=\~'
Command: ListContacts (Only api.rapidshare.com)
Binary: 13(byte)
Description: Requests a list of all contacts.
Errors: 001: No contacts found.
Command: Reserved
Binary: 250(byte)
Description: Reserved, because this is the error handling command on the client side.
Commands, which have to be accepted by the client:
Command: ReadData OK
Binary: 1(byte) + seekH(byte) + seekL(uint) + compressedFlag(byte) + length(uint) + data(length*byte)
Description: Server command ReadData executed successfully. length data bytes appended. If compressedFlag is 1, length is the compressed length and the data is gzip compressed.
Command: WriteData OK
Binary: 2(byte) + writtenBytes(int)
Description: Server command WriteData executed successfully. writtenBytes bytes written to file system. If writtenBytes is NOT what you expect, something went wrong.
This might happen if the RapidShare filesystem is full or some other serious problem is existing. The file might be corrupt after such an event.
Command: OpenFileHandle OK
Binary: 3(byte)
Description: Server command OpenFileHandle executed successfully.
Command: GetUploadServers OK
Binary: 4(byte) + bytesFollowing(ushort) + server1(ushort) + server2(ushort) ....
Description: Server command GetUploadServers executed successfully. A list of servers is appended. It MIGHT happen that you get an empty list.
In this case, no uploads can be done right now. (Empty list = 04 00 00)
Command: CreateNewFile OK
Binary: 5(byte) + fileId(uint)
Description: Server command CreateNewFile executed successfully. The file ID is appended.
Command: DeleteFile OK
Binary: 6(byte)
Description: Server command DeleteFile executed successfully.
Command: ListFiles OK
Binary: 7(byte) + numFiles(uint) + followingBytes(uint) + gzipped data.
Description: Server command ListFiles executed successfully. followingBytes bytes of gzip-compressed data added.
Data is a repeating struct: fileId(uint) + lastDownload(uint) + sizeH(byte) + sizeL(uint) + folder(ushort) + uploadTime(uint) + serverId(ushort) + filenameLength(byte) + filename
To get the file size, use the formula sizeH*2^32+sizeL. The struct repeats itself numFiles times.
Command: Event
Binary: 8(byte) + contactId(uint) + folderId(ushort) + eventType(byte) + eventData
Description: An event noteworthy for the client has happened in the RapidShare file system. If contactId is 0, the user's file system is involved. Else it is the contact's file system.
eventType 1 = New file. eventData = fileId(uint) + listFilesStructBytes(ushort) + listFilesStruct. listFilesStruct is the same struct as found in ListFiles.
eventType 2 = File deleted. eventData = fileId(uint)
eventType 3 = New folder. eventData = folderId(ushort) + listFoldersStructBytes(ushort) + listFoldersStruct. listFoldersStruct is the same struct as found in ListFolders.
eventType 4 = Folder deleted. eventData = folderId(ushort)
eventType 5 = Chat message appended from contact contactId (0=System).
Command: ListFolders OK
Binary: 9(byte) + numFolders(ushort) + followingBytes(uint) + gzipped data.
Description: Server command ListFolders executed successfully. followingBytes bytes of gzip-compressed data added.
Data is a repeating struct: folderId(ushort) + parentId(ushort) + mayUpload(byte) + mayDownload(byte) + lengthName(byte) + name
The struct repeats itself numFolders times. mayUpload/mayDownload ist a flag: 0=no 1=OnlyYou 2=YouAndOthers 3=PublicAccess 4=YourFolderAndShared 5=YourFolderAndPrivate 6=AccountFull
Command: CreateNewFolder OK
Binary: 10(byte) + folderId(ushort)
Description: Server command CreateNewFolder executed successfully. The folder ID is appended.
Command: DeleteFolder OK
Binary: 11(byte) + deletedFiles(uint)
Description: Server command DeleteFolder executed successfully.
Command: RenameFile OK
Binary: 12(byte)
Description: Server command RenameFile executed successfully.
Command: ListContacts OK
Binary: 13(byte) + numContacts(ushort) + followingBytes(uint) + gzipped data.
Description: Server command ListContacts executed successfully. followingBytes bytes of gzip-compressed data added.
Data is a repeating struct: contactId(uint) + contactMd5(16 bytes) + lengthName(byte) + name
The struct repeats itself numContacts times.
Command: 250(byte) + errorFunction(byte) + errorCode(byte)
Description: An error occured within a function. errorFunction is the functionId (the command you called), errorCode the function error Code.
Errors marked with CRIT will result in a closed connection.
===================================================== HitCounter API Documentation =================================================================
sub=hc_newkeyword
Description: Creates a new keyword to be used with the hit counter. To use the hit counter, you need to call http(s)://hc.rapidshare.com/counter.cgi?id=$id
within your web pages. This returns a 1x1 transparent GIF pixel.
Parameters: login=ID or username
password=Password of the login
keyword=The keyword to create
Reply fields: 1: Created ID
Reply format: integer
sub=hc_listkeywords
Description: Returns a list of all your created keywords.
Parameters: login=ID or username
password=Password of the login
Reply fields: 1: ID
2: Keyword
Reply format: integer,string\n (One line per record)
sub=hc_deletekeyword
Description: Deletes an existing keyword. This action is NOT undoable.
Parameters: login=ID or username
password=Password of the login
keyword=The keyword to delete
Reply fields: 1: OK
Reply format: string
sub=hc_listhits
Description: Returns a list of all counted hits for the respective keyword.
Parameters: login=ID or username
password=Password of the login
keyword=The keyword to analyze
Reply fields: 1: Date interval (String format: "MM-DD HH:MM to HH:MM CET" Intervals are from MM=00-14 15-29 30-44 and 45-59)
2: Hits
Reply format: string,integer\n (One line per record)
RapidShare-API Revision history (we reserve the right to remove old or obsolete entries at anytime)
===================================================================================================
25.05.2009
Introduction of the revision history.
trafficsharelogs_v1,trafficsharebandwidth_v1: actually make them work as they should.
trafficsharelogs_v1: range and custom parameter added.
checkfiles_v1: status values re-formatted and value 6 added.
30.05.2009
getaccountdetails_v1: Possibility to earn money added. Thus, referers added, new parameter withrefstring added.
01.06.2009
getaccountdetails_v1: referers changed to refpoints. Possibility for collector's users to earn money added. refpoints and refstring added there as well.
04.06.2009
premiumzonelogs_v1: Function added.
getapicpu_v1: Now permanent. MAX value added.
05.06.2009
filemigrator_v1: acceptfee added. File migrator not free anymore due to massive abuse.
08.06.2009
getaccountdetails_v1: withcookie added. If you need to set the new encrypted cookie, this string will include cookie=STRING in the reply.
14.06.2009
getreward_v1 and setreward_v1 added.
22.06.2009
global: Support for encrypted API login added via global override parameter cookie=HEXSTRING
25.06.2009
getaccountdetails_v1: reply field "type" added.
01.07.2009
getaccountdetails_v1: prempoints always returns 0. It will be removed shortly!
06.07.2009
getaccountdetails_v1: prempoints now removed. refrate added.
getpointlogs_v1: added function.
getreferrerlogs_v1: added function.
15.07.2009
listfiles_v1: killdeadline added.
16.07.2009
listfiles_v1: now takes new optional parameter "fileids"
06.08.2009
getlinklist_v1: Internal bug-fixes and changed reply separator from , to " and reply is no longer HTML encoded.
11.08.2009
getreward_v1: Reply changed. Points removed.
17.08.2009
filemigrator_v1: acceptfee removed. Fee removed completely.
masspoll_v1: vote changed to a1...a5 to enable possibility of surveys.
19.08.2009
getaccountdetails_v1: points renamed to fpoints. ppoints added. "points=0" added to avoid broken applications.
getpointlogs_v1: ppoints changed from integer to float.
21.08.2009
ppointstorefpoints_v1: added function.
22.08.2009
ppointstorefpoints_v1: changed reply.
ppointstofpoints_v1: added function.
24.08.2009
getaccountdetails_v1: refrate changed to ppointrate, refpoints removed.
getreferrerlogs_v1: refpoints changed to ppoints.
ppointstorefpoints_v1: function removed.
getreward_v1: refrate changed to ppointrate.
05.10.2009
getaccountdetails_v1: updated documentation to reality: points replaced by fpoints and ppoints, prempoints removed.
06.10.2009
Inserted missing RSAntiHack check routines in several api functions.
renamefile_v1: changed function so that you need a login now to use it. No longer accepts killcode identification
08.10.2009
getreferrerlogs_v1: confirmed flag added.
18.10.2009
filemigrator_v1: Some design flaws fixed with RealFolders. Syntax has changed slightly. srcrealfolder removed. fileids now alternatively takes a RealFolder ID and no longer an "*".
26.10.2009
getaccountdetails_v1: mirror, mirror2, mirror3 and mirror4 replaced by "mirrors", a comma separated list of mirrors to use.
05.11.2009
checkfiles_v1: limit of files to check at once lowered from 10000 bytes to 3000 bytes.
18.12.2009
setaccountdetails_v1: "mirrors" added, old mirror behaviour removed.
19.12.2009
renamefile_v1: reply field is now the renamed file name. This might differ from the given file name, since the server removes invalid chars.
17.01.2010
enablersantihack_v1: noemail parameter added. Reply modified.
21.01.2010
remotegets_v1: Function added.
05.03.2010
buylots_v1: Function removed.
getaccountdetails_v1: "lots" removed.
getreward_v1 and setreward_v1: Functions removed.
06.03.2010
ppcforextension_v1: Function added.
10.03.2010
getaccountdetails_v1: ppointrate removed.
getdonationprojects_v1: Function added.
donate_v1: Function added.
23.04.2010
sendmail_v2: Function added.
customdb_v1: Function added.
05.05.2010
ppointstofpoints_v1: Exchange rate changed from 1.25 to 1.0
13.05.2010
convertpoints_v1: Function added.
newcolaccount_v1: Function added.
20.05.2010
newpremiumaccount_v1: Function added.
25.05.2010
ONE YEAR RAPIDSHARE API!!!!!!!!1111111111111
getaccountdetails_v1: "validuntil" is now obsolete. Use "platinumuntil" instead. "spacetype" added. "premkbleft" is now obsolete. Use "dlkbleft" instead.
setaccountdetails_v1: "spacetype" added. All parameters now optional. If not given, the respective old values are not changed.
26.05.2010
remotegets_v1: listjobs -> status=12 added.
validateaccount_v1: Function added.
05.06.2010
convertcoltoprem_v1: Function added.
28.06.2010
getaccountdetails_v1: platinumuntil, validuntil, dlkbleft, premkbleft, plustrafficmode, spacetype removed.
getaccountdetails_v1: bodkb changed to tskb. protectfiles changed to verified. rapids, rperday and autocleanup added,
setaccountdetails_v1: spacetype removed. autocleanup and rperday added.
ppcforextension_v1: reply changed from validuntil to rapids.
wiretransfer_v1: Function added.
donate_v1: Function removed.
getdonationprojects_v1: Function removed.
newcolaccount_v1: Function removed.
30.06.2010
getrapidpaylogs_v1: Function added.
01.07.2010
getaccountdetails_v1: withrefstring removed, withpublicid, minrperday, maxrperday, lastbilltime, happyhours added.
setaccountdetails_v1: minrperday, maxrperday added.
getreferrerlogs_v1: Function removed.
giverapids_v1: Function added.
getrapidgiftlogs_v1: Function added.
convertcoltoprem_v1: Function removed.
02.07.2010
All functions: Removed "type". This parameter is from now on ignored.
getpointlogs_v1: Function removed.
03.07.2010
licensemanager_v1: Function added.
getaccountdetails_v1: lastbilltime changed to billeduntil to technically allow more flexible billing.
06.07.2010
giverapids_v1: Preserve limit of 450 Rapids removed.
setaccountdetails_v1: rperday, minrperday, maxrperday removed. autoextend and autorefill added. autocleanup changed to keepfilesforever.
getaccountdetails_v1: minrperday, maxrperday, rperday, ppoints, fpoints removed. autoextend and autorefill added. autocleanup changed to keepfilesforever.
ppointstofpoints_v1: Function removed.
convertpoints_v1: Function removed.
buytraffic_v1: Function added.
extendrapidpro_v1: Function added.
trafficsharebandwidth_v1: Function removed.
14.07.2010
New global optional parameters "cbf" and "cbid" added to return JavaScript compatible outputs.
15.07.2010
moverealfolder_v1: Support for multiple targets added.
16.07.2010
delrealfolder_v1: Support for multiple targets added.
checkfiles_v1: Return status values changed. Compatibility for normal downloads preserved.
17.07.2010
getlicenses_v1: Function renamed to getfilelicenses_v1.
getpurchasedlicenses_v1: Function added.
18.07.2010
purchaselicense_v1: Function added.
getrapidgiftlogs_v1: Function removed (Use getpendingcredits_v1 instead. This is a new global function for received Rapids.)
getpendingcredits_v1: Function added.
giverapids_v1: Delayed Rapids transfer lowered from 3 days to 5 hours. Rapids limit changed to 10-5000.
20.07.2010
New global optional parameter "rsantihack" added.
filemigrator_v1: srcaccount and srcpassword now ignored. Source is always the api caller.
02.08.2010
listfilesinlicense_v1: Function added.
05.08.2010
resendauthcode_v1: Function added.
paypalok_v1: Function added.
08.08.2010
download_v1: Function added.
09.08.2010
movefilestorealfolder_v1: "disabledownloads" and "enabledownloads" parameters added.
newpremiumaccount_v1: Reply extended.
12.08.2010
viewlinklist_v1: Function added.
movelinklistentries_v1: Function added.
14.08.2010
getrapidpaylogs_v1: Function marked as obsolete. Use getrapidtranslogs_v1 instead.
getrapidtranslogs_v1: Function added.
16.08.2010
giverapids_v1: The recipient parameter now also accepts a file ID. The optional message to the recipient can now hold up to 100 characters.
deletefreefile_v1: Function added.
18.08.2010
resendauthcode_v1: Now also accepts a username. Parameter "accountid" renamed to "login".
getrapidpaylogs_v1: Function removed.
forgotpw_v1: Function added.
getaccountdetails_v1: Parameter "withpublicid" extended.
19.08.2010
giverapids_v1: Parameter "rtype" added.
21.08.2010
NEW FEATURE: Since some special institutions decide to invest more and more money in network sniffing hardware (and TCP data injection as well, just to mention it),
we now also offer fully encrypted SSL downloads. This is a beta feature, only available when using download_v1 to request your files and it doubles your
billed traffic as well. Its really painfully costy to encrypt high speed downloads. Feel free to test it out. Don't hesitate to analyze your network traffic.
When we have enough experience with this feature, we might lower the traffic cost factor.
download_v1: Now in public beta stage. New parameter "withmd5hex" added. See function description for background information.
setaccountdetails_v1: Parameter "onlyssldls" added. If enabled, you will get an error message if you download without a SSL connection. Only works with download_v1.
getaccountdetails_v1: Reply key "onlyssldls" added.
27.09.2010
extendrapidpro_v1: Now also accept "months" parameter.
getaccountdetails_v1: "newmsgs", "rcbotauth", "vipuntil" added.
giverapids_v1: Parameter rtype now also supports "accountid" and "addtime".
sendmailtosupport_v1: Function added.
rc_contactuser_v1: Function added.
rc_cfeedispute_v1: Function added.
rc_listcontacts_v1: Function added.
rc_comparecontacts_v1: Function added.
rc_editcontact_v1: Function added.
rc_editcontactcategories_v1: Function added.
rc_setaccountdetails_v1: Function added.
rc_downloadcontact_v1: Function added.
rc_downloadmyprofile_v1: Function added.
rc_listmessages_v1: Function added.
rc_markmessages_v1: Function added.
rc_deletecontact_v1: Function added.
rc_searchcontacts_v1: Function added.
rc_alertuser_v1: Function added.
The RapidContact Notification Bot: Documentation added.
ppcforextension_v1: Function now OBSOLETE! Use claimcoupon_v1 instead.
claimcoupon_v1: Function added.
paymentok_v1: Function added.
10.10.2010
rc_listcontacts_v1: Reply field "lastmsgfrom" included.
28.10.2010
_ premiumzonelogs_v1: Reply now appends "billedkb".
getaccountdetails_v1: Reply now includes "nortuntil".
02.11.2010
giverapids_v1: Request parameter "manualpassword" added.
07.11.2010
rc_downloadcontact_v1: Reply field "grouprights" removed.
rc_downloadmyprofile_v1: Reply field "grouprights" removed.
rc_searchcontacts_v1: Request parameters "type" and "listgroupmembers" removed. Reply field "grouprights" removed.
10.11.2010
rc_contactuser_v1: Reply changed from "OK" to message timestamp.
11.11.2010
claimcoupon_v1: Optional parameter "country" added.
uploadprogress_v1: Function added.
buypaypalpid_v1: Function added.
getaccountdetails_v1: "newmsgs" removed.
rc_listmessages_v1: Request parameters "onlynew" and "markmessages" removed. User flag and new flag in reply removed.
rc_markmessages_v1: Function removed.
rc_contactuser_v1: Request parameter "flag" removed.
rc_listcontacts_v1: Function removed. The RCBot is now mandatory to participate in RapidContact.
RCBot: Command "cl": Reply field "new messages" removed.
RCBot: Command "li": Reply "wentoffline" appended.
rc_downloadcontact_v1: Reply field "wentoffline" added.
13.11.2010
rc_deletemessages_v1: Function added.
rc_listmessages_v1: Request parameters changed.
18.11.2010
RapidContact: The username is no longer unique.
rc_contactuser_v1: ctype "name" changed to "rcaddtime,name". ctype "rsname" added.
rc_downloadcontact_v1: ctype "name" changed to "rcaddtime,name". Reply field "addtime" changed to "rcaddtime".
rc_searchcontacts_v1: Accepts new optional parameter "queryusernames=1".
rc_comparecontacts_v1: Reply changed.
rc_cfeedispute_v1: ctype "name" changed to "rcaddtime,name".
23.11.2010
RCBot: The contact list reply has been extended by the "lone" flag. The new event "lc" has been added.
24.11.2010
rc_searchcontacts_v1: Mandatory request parameters "queryfindmes" and "queryusernames" added.
25.11.2010
rc_contactuser_v1: Optional request parameter "channel" added.
rc_listmessages_v1: Reply format changed to insert "channel".
RCBot: Reply format for "nm" changed to include "channel".
rc_contactuser_v1: Optional request parameter "nosave" added.
29.11.2010
rc_contactuser_v1: Optional request parameter "maxcfeedisputes" added.
07.12.2010
rc_getaccountdetails_v1: Optional request parameter "withsession" added.
08.12.2010
rp_newsubdomain: Function added.
rp_listsubdomains: Function added.
rp_editsubdomain: Function added.
http://rapidpages.com/rapidpages.cgi: Function added. (External API)
_v1 removed everywhere. It looks ugly and we don't really need it anyway. Backward compatibility assured for some time.
giverapids: Rapids will be transferred immediately now. Artifical delays removed.
getpendingcredits: Function removed.
09.12.2010
getapicpu: Function removed. Use the HTTP response header field "X-APICPU" provided in every response header.
http://rapidpages.com/rapidpages.cgi: Command "renamefile" added.
13.12.2010
rc_downloadcontact: Reply parameter "wentoffline" removed.
16.12.2010
http://rapidpages.com/rapidpages.cgi: Command "renamesubdomain" added.
17.12.2010
rc_setaccountdetails: pubprofile replaced by rpsubdomain.
rc_downloadcontact: pubprofile replaced by rpsubdomain.
rc_downloadmyprofile: pubprofile replaced by rpsubdomain.
26.12.2010
getaccountdetails: rcbotauth removed. RCBot now uses the standard RapidShare sessions introduced with RapidPages.
RCBot: New login format. See doc.
RCBot: New request modes 5 and 6 added to request the online status of a user by providing the public ID.
28.12.2010
API-Doc: Cleaned up the documentation a bit.
29.12.2010
http://rapidpages.com/rapidpages.cgi: Sub=upload: Flag "overwrite" added.
03.01.2011
http://rapidpages.com/rapidpages.cgi: Rewritten to add folder management.
06.01.2011
verifyerror: Function added.
22.01.2011
enablersantihack: Function removed.
disablersantihack: Function removed.
sendrsantihackmail: Function removed.
getaccountdetails: rsantihack removed.
customdb: cmd=list added.
30.01.2011
hc_newkeyword: Function added.
hc_listkeywords: Function added.
hc_deletekeyword: Function added.
hc_listhits: Function added.
07.02.2011
ppcforextension: Function removed.
19.02.2011
License manager widely improved.
21.02.2011
setaccountdetails: Parameter "onlyssldls" removed. All premium downloads are now SSL downloads.
getaccountdetails: Reply key "onlyssldls" removed.
SSL downloading: Additional traffic fee removed. SSL downloading is now the default way to go.
04.04.2011
remotegets: listjobs reply changed to include uploaded size.
11.04.2011
getaccountdetails: tskb,kff,autorefill,happyhours removed.
setaccountdetails: keepfilesforever,autorefill removed.
premiumzonelogs: Function removed.
buytraffic: Function removed.
17.04.2011
setaccountdetails: country added.
24.04.2011
listfiles: Reply limited to support unlimited number of files per account.
giverapids: Rapids range adjusted to 100-9999.
renamerealfolder: Name max. length extended to 250 bytes.
addrealfolder: Name max. length extended to 250 bytes.
25.04.2011
listfiles: Filename parameter now also accepts SQL wildcard "%". Search for %foo% to find any filename containing foo.
26.04.2011
movefilestorealfolder: enabledownloads and disabledownloads removed.
checkfiles: md5 now always supplied.
download: md5 now always supplied.
listfiles: md5 is no longer a history field but a regular field.
27.04.2011
listfiles: uploadtime is no longer a history field but a regular field. IP removed.
licensemanager: listgroupmembers changed to listgivenplicenses and extended.
02.05.2011
trafficsharelogs: Function removed.
getaccountdetails: "vipuntil" removed.
TrafficShare type documentation simplified.
09.05.2011
getaccountdetails: country added.
11.05.2011
getaccountdetails: autoextend removed.
setaccountdetails: autoextend removed.
extendrapidpro: Function removed.
listaffildb: Function added.
getactivefriends: Function added.
sendinvitefriendmail: Function added.
15.05.2011
rapidsave: Function added.
19.05.2011
claimcoupon: Reply extended.
25.05.2011
TWO YEARS RAPIDSHARE API!!!!!!!!1111111111111oneoneone
05.06.2011
rapidsave: Request parameters "package" and "preview" added. Reply changed.
createrapidsavepackage: Function added.
listrapidsavepackages: Function added.
deleterapidsavepackages: Function added.
rc_setaccountdetails: Request parameter cfeefileid removed.
rc_downloadcontact: Reply field cfeefileid removed.
rc_downloadmyprofile: Reply field cfeefileid removed.
rc_contactuser: ctype fileid removed.
rc_searchcontacts: Reply field 6 removed (cfeefileid).
10.06.2011
listrapidsavepackages: Reply extended.
12.06.2011
rapidpages.cgi: Limits extended to 1.024.000 bytes per file and 3.000 files per subdomain.
rapidsave: Reply extended.
15.06.2011
uploadprogress: Status codes explained.
23.06.2011
RapidSave packages: Mandatory access password introduced.
editfilecomments: Function added.
24.06.2011
TrafficShare type 2 (secured TrafficShare) removed.
27.06.2011
filemigrator: Function removed.
28.06.2011
giverapids: rtype removed. Now only public ID is possible.
RapidContact removed.
createrapidsavepackage: Request parameter "replaceid" added.
listrapidsavepackages: Reply changed to include mtime.
08.07.2011
RapidPages is now an internal tool.
09.07.2011
X-APICPU removed.
11.07.2011
Versioning support added. Listfiles documentation updated. Fully backward compatible.
17.07.2011
rapidsave: Request parameter "contactid" added.
19.07.2011
requestcontact: Function added.
confirmcontact: Function added.
editcontact: Function added.
listcontacts: Function added.
newpremiumaccount: Optional request parameter "confirmcontact" added.
25.07.2011
confirmemailchange: Function added.
02.08.2011
Folder based Access Control Lists added.
listcontacts: Function merged into listrealfolders.
getaccountdetails: withpublicid now only supports the always-changing public ID.
renamerealfolder: Function removed. Use editfolder instead.
editfolder: Function added with ACL support.
listrealfolders: Now also lists the folder's ACLs.
rapidsave & download: Support for folder ACLs added.
delrealfolder: Now deletes the files as well, just as you might expect.
deletefiles: Support for deleting RealFolders dropped. Use delrealfolder instead.
upload: Function added
uploadresume: Function added
11.08.2011
deletefreefile: Function removed.
newlinklist: Function removed.
editlinklist: Function removed.
copyfilestolinklist: Function removed.
newlinklistsubfolder: Function removed.
deletelinklistentries: Function removed.
editlinklistentry: Function removed.
movelinklistentries: Function removed.
12.08.2011
Backward compatibility for _v1 calls removed.
uploadresume: Reply changed.
20.08.2011
checkincomplete: Function removed. Use listfiles requesting type (check if type==250) combined with request parmeter "fileids".
24.08.2011
listfiles: Optional request parameters "order" and "desc" removed.
25.08.2011
sendmail: Required request parameter(s) killcodeX replaced with filenameX
31.08.2011
getlinklist: Function removed.
deletelinklist: Function removed.
viewlinklist: Function removed.
trafficsharetype: Function removed.
03.09.2011
getaccountdetails: mailflags reply parameter added.
setaccountdetails: mailflags request parameter added.
mailflags documentation added.
05.09.2011
getaccountdetails: language reply parameter added.
setaccountdetails: language request parameter added.
27.09.2011
listremotefolders: Function added.
28.09.2011
listfiles: Remote browsing added. New request parameter "contactid" added.
04.10.2011
listcontacts: Function added.
Improved ACL implementation
05.10.2011
giverapids: recipient changed to toaccountid.
12.10.2011
editfolders: Function added (will replace sub editfolder)
03.11.2011
requestlowlevelaccess: Function added.
openfilehandle: Function added.
Block based low level file access implemented.
29.11.2011
editfolder: Depreciated function removed. Use editfolders instead.
30.11.2011
listfiles: List attribute "sentby" added.
upload: UPLOAD ACL implemented.
04.12.2011
listfiles: Important notes added.
06.12.2011
uploadprogress: More status codes added.
listremotefolders: Reply extended.
15.12.2011
listcontactrequests: Function added.
20.12.2011
get/setaccountdetails: Parameter folderalias added.
resolvefolderalias: Function added.
listremotefolders: Parameter withfolderalias added.
eventparticipate: Function added.
deletecontactrequest: Function added.
03.01.2012
listremotefolders: "contactid" changed to more secure "contact" request parameter.
listfiles: "contactid" changed to more secure "contact" request parameter.
upload: "toaccountid" changed to more secure "contact" request parameter.
listcontacts: Now returns a "contact" instead of a simple account-ID.
06.01.2012
rapidsave: "contactid" changed to more secure "contact" request parameter.
12.01.2012
deletecontact: Function added.
editcontact: Delete function moved to separate function.
26.01.2012
rapidsave: Not an exclusive RapidPro feature.
12.06.2012
sendinvitefriendmail: Function removed.
getactivefriends: Function removed.
validateaccount: New reply "OK" instead of the cookie.
13.06.2012
rapidsave: Reply adjusted.
listaffildb: Function removed.
14.06.2012
forgotpw: Function extended.
confirmpasswordreset: Function added.
26.07.2012
newpremiumaccount: Country request parameter added.
13.09.2012
extendrapidpro: Function added.
28.09.2012
remotegets: Optional parameter folderid added.
01.10.2012
gettrafficlogs: Function added.
download: Function simplified.
08.11.2012
gettrafficlogs: Request parameter "today" added.
12.11.2012
Low Level API: Compressed packets implemented.
27.11.2012
RapidSave packages removed.
28.11.2012
Upload-API: md5hex and size request parameters removed.
29.11.2012
LLAPI: Command enqueueing added.
LLAPI: Raw write support added.
04.12.2012
CustomDB improved.
12.12.2012
listfiles: File limit per folder raised from 3.000 to 10.000
movefilestorealfolder: files parameter extended from 3.000 to 30.000 bytes.
LLAPI: New command GetUploadServers added.
LLAPI: New command CreateNewFile added.
13.12.2012
LLAPI: New command DeleteFile added.
15.12.2012
LLAPI: Basically rewritten.
17.12.2012
LLAPI: Event handler extended, ListFolders added.
30.12.2012
LLAPI: Truncate function in Write added, CreateNewFolder added, DeleteFolder added, RenameFile added, ListContacts added.
28.01.2013
fetchpublickeyfromcustomdb: Function added.
31.01.2013
newpremiumaccount: Name added.
getaccountdetails: Name added.
setaccountdetails: Name added.
13.02.2013
resolvefolderalias: Function removed.
listremotefolders: "withfolderalias" removed.
getaccountdetails: folderalias removed.
setaccountdetails: folderalias removed.
13.03.2013
LLAPI: error codes regarding folder ACL added.
08.04.2013
invitefriend: Function added
showcommisions: Function added
payoutcommissions: Function added