docs.search
This method searches for the specified query within the scribd documents.
Parameters
| string |
query |
(required)
More information on search queries.
|
| integer |
num_results |
(optional)
Number of results to return: Default 10, max 1000.
|
| integer |
num_start |
(optional)
Number to start at: Default 1. Cannot exceed 1000.
|
| ["all", "user", "account"] |
scope |
(optional)
Whether to search all of scribd OR just within one user's documents. If scope is set to "user" and session_key is not provided, the documents uploaded by the API user will be searched. If scope is set to "user" and session_key is given, the documents uploaded by the session user will be searched. If the scope is "account", all documents uploaded by that API account will be searched, even if the API account has uploaded documents on behalf of multiple user accounts. If scope is "all", only public documents will be searched. Set to "user" by default.
|
| string |
api_key |
(required)
API key assigned to your account.
|
| string |
api_sig |
(optional)
MD5 hash of the active request and your secret key. This is an optional security measure. See the signing documentation for more info.
|
| string |
session_key |
(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
|
| string |
my_user_id |
(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>
</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>
</result>
</result_set>
</rsp>
Result explanation
| list |
result_set |
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.
|
| list |
result |
Contains each individual result
|
| integer |
doc_id |
Every document on Scribd has a unique document ID. You can use this ID to link to the document, among other things.
|
| string |
secret_password |
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
|
| string |
access_key |
The access_key allows you to embed a document on an external site.
|
| string |
title |
|
| string |
description |
|
| string |
tags |
Comma separated list of tags for the document
|
| ["by", "by-nc", "by-nc-nd", "by-nc-sa", "by-nd", "by-sa", "c", "pd"] |
license |
See Wikipedia:Creative_Commons_License. "c" is traditional copyright. "pd" is public domain.
|
| URL |
thumbnail_url |
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.
|
| integer |
page_count |
The number of pages in the document
|
Error codes
| 401 |
Unauthorized |
| 500 |
Internal Server Error. Scribd has been notified about this problem. |
| 601 |
Required parameter missing |
| 610 |
Search is temporarily down |
| 650 |
Invalid parameter value |