Web Search Documentation for Yahoo! Search

We’re shutting down this service in April 2011. For further details, please see the Deprecated Services blog post.

Submitting Web Queries

The Web Search service allows you to search the Internet for web pages. See also the other Search services.

Request URL


Request parameters

See information on constructing REST queries

Parameter Value Description
appid string (required) The application ID. See Application IDs for more information.
query string (required) The query to search for (UTF-8 encoded). This query supports the full search language of Yahoo! Search, including meta keywords. Total size of he query must be less than 1KB..
region string: default us The regional search engine on which the service performs the search. For example, region=uk will give you the search engine at uk.search.yahoo.com. Supported Regions.
type all (default), any, or phrase

The kind of search to submit:

  • all returns results with all query terms.
  • any returns results with one or more of the query terms.
  • phrase returns results containing the query terms as a phrase.
results integer: default 10, max 100 The number of results to return.
start integer: default 1 The starting result position to return (1-based). The finishing position (start + results - 1) cannot exceed 1000.
format any (default), html, msword, pdf, ppt, rss, txt, xls Specifies the kind of file to search for.
adult_ok no value (default), or 1 Specifies whether to allow results with adult content. Enter a 1 to allow adult content.
similar_ok no value (default), or 1 Specifies whether to allow multiple results with similar content. Enter a 1 to allow similar content.
language string: default no value (all languages) The language the results are written in. Supported Languages.
country string: default no value The country in which to restrict your search results. Only results on web sites within this country are returned. Supported Country Codes.
site string: default no value A domain to restrict your searches to (e.g. www.yahoo.com). You may submit up to 30 values (site=www.yahoo.com&site=www.cnn.com).
subscription string: default no value Any subscriptions to premium content that should also be searched. You may submit multiple values. Supported Subscription Codes.
license any (default), cc_any, cc_commercial, cc_modifiable The Creative Commons license that the contents are licensed under. You may submit multiple values (e.g. license=cc_commercial&license=cc_modifiable).
output string: xml (default), json, php The format for the output. If json is requested, the results will be returned in JSON format. If php is requested, the results will be returned in Serialized PHP format.
callback string The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the Yahoo! Developer Network JSON Documentation.

Sample Request Url: http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=madonna&results=2

Response fields

The schema document for this service response is located at http://search.yahooapis.com/WebSearchService/V1/WebSearchResponse.xsd

Field Description
ResultSet Contains all of the query responses. Has 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.

Result Contains each individual response.
Title The title of the web page.
Summary Summary text associated with the web page.
Url The URL for the web page.
ClickUrl The URL for linking to the page. See URL linking for more information.
MimeType The MIME type of the page
ModificationDate The date the page was last modified, in unix timestamp format.
Cache The URL of the cached result, and its size in bytes.

Sample response

The following is a sample response for the query madonna:

Rate Limits

The Web Search service is limited to 5,000 queries per IP address per day and to noncommercial use. See information on rate limiting.


The Web Search service returns the standard errors. There are no service-specific errors.

Terms of Use

Please see our Usage Policy to learn about acceptable uses and how to request additional queries.

Support & Community

The Web Search service is discussed on the yws-search-general mailing list.

Yahoo Groups Discussions