HomeUsing the Platform APIPlatform API Reference

docs.search

This method searches for the specified query in the public documents on Scribd.com. Private documents are not searchable.

Parameters

NameTypeDescription
querystring(required) What to search for. More information on search queries.
scope["all"](optional) DEPRECATED. In the past, this parameter allowed you to search within a single user's documents, e.g., within the documents uploaded by your API account. Today docs.search only searches public documents site-wide on Scribd.com.
category_idinteger(optional) Restricts search results to only documents in a certain category.
languagestring(optional) Restricts search results to only documents in the specified language (in ISO 639-1 format).
simpleboolean(optional) This option specifies whether or not to allow advanced search queries (more information). When set to false, the API search behaves the same as the search on Scribd.com. When set to true, the API search allows advanced queries that contain filters such as title:"A Tale of Two Cities". Set to "true" by default.
num_startinteger(optional) Together with num_results, allows you to paginate through the results returned. Defaults to 0. num_start+num_results must be less than 1000.
num_resultsinteger(optional) The number of results to return. Defaults to 10. Capped at 1000.
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">
      <result_set totalResultsAvailable="922" totalResultsReturned="2" firstResultPosition="1" list="true">
        <result>
          <title><![CDATA[Ruby on Java]]></title>
          <description><![CDATA[Ruby On Java, Barcamp, Washington DC]]></description>
          <access_key>key-t3q5qujoj525yun8gf7</access_key>
          <doc_id>244565</doc_id>
          <page_count>10</page_count>
          <download_formats></download_formats>
          <when_uploaded>2012-12-14T15:51:58+00:00</when_uploaded>
          <when_updated>2013-11-14T15:51:58+00:00</when_updated>
        </result>
        <result>
          <title><![CDATA[Ruby on Java Part II]]></title>
          <description><![CDATA[Ruby On Java Part II, Barcamp, Washington DC]]></description>
          <access_key>key-2b3udhalycthsm91d1ps</access_key>
          <doc_id>244567</doc_id>
          <page_count>12</page_count>
          <download_formats>pdf,txt</download_formats>
        </result>
      </result_set>
    </rsp>

Result explanation

NameTypeDescription
result_setlist This contains the list of results returned by the search query. This has the following attributes. totalResultsAvailable: The number of query matches in the database. totalResultsReturned: The number of query matches returned. This may be lower than the number of results requested if there were fewer total results available. firstResultPosition: The position of the first result in the overall search.
resultlist Contains each individual result
doc_idinteger Every document on Scribd has a unique document ID. You can use this ID to link to the document, among other things.
secret_passwordstring The secret password allows access to the Scribd pages for private documents. This parameter will only be provided if scope is set to "user" and the given document is actually private
access_keystring The access_key allows you to embed a document on an external site.
titlestring
descriptionstring The document description.
tagsstring Comma separated list of tags for the document
license["by", "by-nc", "by-nc-nd", "by-nc-sa", "by-nd", "by-sa", "c", "pd"] See Wikipedia:Creative_Commons_License. "c" is traditional copyright. "pd" is public domain.
thumbnail_urlURL Link to a JPG that contains a thumbnail of the document. This can be used to make search results more presentable. Do not cache thumbnail URLs - they are subject to change.
page_countinteger The number of pages in the document
download_formatslist List of downloadable extensions.
pricefloat (9.99) The price at which the document is sold. Only available on store documents.
readsinteger Number of reads.
uploaded_bystring The username of the user who uploaded this document.
uploader_idstring The user id of the user who uploaded this document.
when_uploadeddatetime The date the document was originally uploaded
when_updateddatetime The date this document was last updated

Error codes

401Unauthorized
500Internal Server Error. Scribd has been notified about this problem.
601Required parameter missing
610Search is temporarily down
650Invalid parameter value

Back to Platform API Reference