HomeUsing the Platform APIPlatform API Reference


This method retrieves the document file from the specified URL.


urlstring(required)Note that, since you are putting a URL inside a URI-encoded query, non-URI characters will have to be escaped twice. For example, a URL may look like "http://example.com?q=with spaces" in Firefox address bar. The real URL (with space symbol escaped as %20) is "http://example.com?q=with%20spaces". And by the time you send this to Scribd API, it should be in this form: "url="http%3A%2F%2Fexample.com%3Fq%3Dwith%2520spaces". Same string as before, but with all slashes etc escaped, including the % sign in %20 - now escaped as %25, followed by 20. If you use some kind of library to form the API request, it probably already does the second escaping
doc_type["pdf", "doc", "txt", "ppt", etc](optional)Identify the document type with the extension for this file. Note, images (.jpg, etc.) are not allowed. The following extensions are currently supported: pdf, txt, ps, rtf, epub, key, odt, odp, ods, odg, odf, sxw, sxc, sxi, sxd, doc, ppt, pps, xls, docx, pptx, ppsx, xlsx, court, saif, nitf, newsm
access["public", "private"](optional)Default: "public".
rev_idinteger(optional)The doc_id to save uploaded file as a revision to.
paid_content{0, 1}(optional)If paid_content is set to 1, the document will become a paid content document with protected access and encryption enabled by default. This must be set on initial upload - documents cannot be converted to paid content after the fact. The default is 0.
download_and_drm["download-pdf", "download-pdf-orig", "view-only"](optional)Default: "download-pdf". Make a document downloadable in addition to viewable. This must be set on initial upload - documents cannot be converted after the fact. DRM download option applies ONLY when paid_content is set to 1, and downloading is NOT supported at all when using iPaper Secure.
api_keystring(required)API key assigned to your account.
api_sigstring(optional)MD5 hash of the active request and your secret key. This is an optional security measure. See the signing documentation for more info.
session_keystring(optional)A session key for a signed in user. If this parameter is provided, your application will carry out actions on behalf of the signed in user corresponding to the session key. Otherwise, your application will carry out actions on behalf of the user account associated with the API account. See the authentication documentation for more information
my_user_idstring(optional)This parameter is intended for sites with their own user authentication system. You can create phantom Scribd accounts that correspond to your users by simply passing the unique identifier you use to identify your own user accounts to my_user_id. If you pass this parameter to an API method, the API will act as if it were executed by the phantom user corresponding to my_user_id. See the authentication documentation for more information.

Sample return XML

<?xml version="1.0" encoding="UTF-8"?><rsp stat="ok"><doc_id>123456</doc_id><access_key>key-rvfa2c82sq5bf9q8t6v</access_key><secret_password>2jzwhplozu43cyqfky1m</secret_password></rsp>

Result explanation

doc_idintegerEvery document on Scribd is referenced by a unique ID. You can use the ID of a document to request more information about it or to link to it on Scribd
access_keystringEvery document on Scribd has a unique, secure access key. You must know the access key of a document to embed it.
secret_passwordstringPrivate documents on Scribd have a secret password. You use the secret password of a private document to link to the private page of the document on Scribd. This parameter will only be present if the document is private.

Error codes

500Internal Server Error. Scribd has been notified about this problem.
601Required parameter missing
602Unrecognized or blank file extension
603No file data was sent
606Problem downloading file
631Document was not paid document
637Invalid upload URL - cannot be localhost, scribd.com, or an internal IP.

Back to Platform API Reference