The Web Search service allows you to search the Internet for web pages. See also the other Web Search services.
The Web Search service is discussed on the yws-search-general mailing list.
http://search.yahooapis.com/WebSearchService/V1/webSearch
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. For details on constructing queries, see Search Tips. |
| 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:
|
| 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
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:
|
| 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. |
The following is a sample response for the query madonna:
The Web Search service is limited to 5,000 queries per IP address per day. See information on rate limiting and our Usage Policy to learn about acceptable uses and how to request additional queries.
The Web Search service returns the standard errors. There are no service-specific errors.
Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings