3 The contents of this file are subject to the terms
4 of the Common Development and Distribution License
5 (the "License"). You may not use this file except
6 in compliance with the License.
8 You can obtain a copy of the license at
9 http://www.opensource.org/licenses/cddl1.php
10 See the License for the specific language governing
11 permissions and limitations under the License.
13 <application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
14 xmlns:yn="urn:yahoo:yn"
15 xmlns:ya="urn:yahoo:api"
16 xmlns:html="http://www.w3.org/1999/xhtml"
17 xmlns="http://wadl.dev.java.net/2009/02">
20 <include href="NewsSearchResponse.xsd"/>
21 <include href="NewsSearchError.xsd"/>
24 <resources base="http://api.search.yahoo.com/NewsSearchService/V1/">
25 <resource path="newsSearch">
26 <doc xml:lang="en" title="Yahoo News Search Service">
27 The <html:i>Yahoo News Search</html:i> service provides online searching of news
28 stories from around the world.
30 <param name="appid" type="xsd:string" required="true" style="query">
31 <doc>The application ID. See <html:a href="http://developer.yahoo.com/faq/index.html#appid">Application IDs</html:a> for more information.</doc>
33 <method href="#search"/>
37 <method name="GET" id="search">
38 <doc xml:lang="en" title="Search news stories by keyword"/>
40 <param name="query" type="xsd:string" required="true" style="query">
41 <doc xml:lang="en" title="Space separated keywords to search for"/>
43 <param name="type" type="xsd:string" default="all" style="query">
44 <doc xml:lang="en" title="Keyword matching"/>
46 <doc>All query terms.</doc>
49 <doc>Any query terms.</doc>
51 <option value="phrase">
52 <doc>Query terms as a phrase.</doc>
55 <param name="results" type="xsd:int" default="10" style="query">
56 <doc xml:lang="en" title="Number of results"/>
58 <param name="start" type="xsd:int" default="1" style="query">
59 <doc xml:lang="en" title="Index of first result"/>
61 <param name="sort" type="xsd:string" default="rank" style="query">
62 <doc xml:lang="en" title="Sort by date or rank"/>
63 <option value="rank"/>
64 <option value="date"/>
66 <param name="language" type="xsd:string" style="query">
67 <doc xml:lang="en" title="Language filter, omit for any language"/>
69 <param name="output" type="xsd:string" default="xml" style="query">
70 <doc>The format for the output. If <html:em>json</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/json.html">JSON</html:a> format. If <html:em>php</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/phpserial.html">Serialized PHP</html:a> format.</doc>
72 <option value="json"/>
75 <param name="callback" type="xsd:string" style="query">
76 <doc>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 <html:a href="http://developer.yahoo.com/common/json.html#callbackparam">Yahoo! Developer Network JSON Documentation</html:a>.</doc>
79 <response status="200">
80 <representation mediaType="application/xml" element="yn:ResultSet">
81 <doc xml:lang="en" title="A list of news items matching the query"/>
84 <response status="400">
85 <representation id="SearchError" mediaType="application/xml"