blob: 23a63f550f47255640f3c404bb9e55e35c777eed [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="freebase_v1.html">Freebase Search</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#reconcile">reconcile(lang=None, confidence=None, name=None, prop=None, limit=None, kind=None)</a></code></p>
79<p class="firstline">Reconcile entities to Freebase open data.</p>
80<p class="toc_element">
81 <code><a href="#search">search(domain=None, help=None, query=None, scoring=None, filter=None, prefixed=None, with=None, mid=None, encode=None, limit=None, type=None, as_of_time=None, stemmed=None, format=None, spell=None, exact=None, lang=None, indent=None, cursor=None, callback=None, without=None, output=None, mql_output=None)</a></code></p>
82<p class="firstline">Search Freebase open data.</p>
83<p class="toc_element">
84 <code><a href="#search_media">search_media(domain=None, help=None, query=None, scoring=None, filter=None, prefixed=None, with=None, mid=None, encode=None, limit=None, type=None, as_of_time=None, stemmed=None, format=None, spell=None, exact=None, lang=None, indent=None, cursor=None, callback=None, without=None, output=None, mql_output=None)</a></code></p>
85<p class="firstline">Search Freebase open data.</p>
86<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="reconcile">reconcile(lang=None, confidence=None, name=None, prop=None, limit=None, kind=None)</code>
89 <pre>Reconcile entities to Freebase open data.
90
91Args:
92 lang: string, Languages for names and values. First language is used for display. Default is 'en'. (repeated)
93 confidence: number, Required confidence for a candidate to match. Must be between .5 and 1.0
94 name: string, Name of entity.
95 prop: string, Property values for entity formatted as
96: (repeated)
97 limit: integer, Maximum number of candidates to return.
98 kind: string, Classifications of entity e.g. type, category, title. (repeated)
99
100Returns:
101 An object of the form:
102
103 {
104 "costs": { # Server costs for reconciling.
105 "hits": 42, # Total number of hits found.
106 "ms": 42, # Total milliseconds spent.
107 },
108 "warning": [ # If filled, then there were recoverable problems that affected the request. For example, some of the properties were ignored because they either are not valid Freebase predicates or are not indexed for reconciliation. The candidates returned should be considered valid results, with the caveat that sections of the request were ignored as specified by the warning text.
109 {
110 "reason": "A String", # Code for identifying classes of warnings.
111 "message": "A String", # Warning message to display to the user.
112 "location": "A String", # Location of warning in the request e.g. invalid predicate.
113 },
114 ],
115 "match": { # If filled, this entity is guaranteed to match at requested confidence probability (default 99%).
116 "lang": "A String", # Language code that candidate and notable names are displayed in.
117 "confidence": 3.14, # Percentage likelihood that this candidate is the unique matching entity. Value will be between 0.0 and 1.0
118 "notable": { # Type or profession the candidate is notable for.
119 "id": "A String", # MID of notable category.
120 "name": "A String", # Name of notable category in specified language.
121 },
122 "mid": "A String", # Freebase MID of candidate entity.
123 "name": "A String", # Freebase name of matching entity in specified language.
124 },
125 "candidate": [ # If filled, then the listed candidates are potential matches, and such should be evaluated by a more discerning algorithm or human. The matches are ordered by confidence.
126 {
127 "lang": "A String", # Language code that candidate and notable names are displayed in.
128 "confidence": 3.14, # Percentage likelihood that this candidate is the unique matching entity. Value will be between 0.0 and 1.0
129 "notable": { # Type or profession the candidate is notable for.
130 "id": "A String", # MID of notable category.
131 "name": "A String", # Name of notable category in specified language.
132 },
133 "mid": "A String", # Freebase MID of candidate entity.
134 "name": "A String", # Freebase name of matching entity in specified language.
135 },
136 ],
137 }</pre>
138</div>
139
140<div class="method">
141 <code class="details" id="search">search(domain=None, help=None, query=None, scoring=None, filter=None, prefixed=None, with=None, mid=None, encode=None, limit=None, type=None, as_of_time=None, stemmed=None, format=None, spell=None, exact=None, lang=None, indent=None, cursor=None, callback=None, without=None, output=None, mql_output=None)</code>
142 <pre>Search Freebase open data.
143
144Args:
145 domain: string, Restrict to topics with this Freebase domain id. (repeated)
146 help: string, The keyword to request help on.
147 Allowed values
148 langs - The language codes served by the service.
149 mappings - The property/path mappings supported by the filter and output request parameters.
150 predicates - The predicates and path-terminating properties supported by the filter and output request parameters.
151 query: string, Query term to search for.
152 scoring: string, Relevance scoring algorithm to use.
153 Allowed values
154 entity - Use freebase and popularity entity ranking.
155 freebase - Use freebase entity ranking.
156 schema - Use schema ranking for properties and types.
157 filter: string, A filter to apply to the query. (repeated)
158 prefixed: boolean, Prefix match against names and aliases.
159 with: string, A rule to match against. (repeated)
160 mid: string, A mid to use instead of a query. (repeated)
161 encode: string, The encoding of the response. You can use this parameter to enable html encoding.
162 Allowed values
163 html - Encode certain characters in the response (such as tags and ambersands) using html encoding.
164 off - No encoding of the response. You should not print the results directly on an web page without html-escaping the content first.
165 limit: integer, Maximum number of results to return.
166 type: string, Restrict to topics with this Freebase type id. (repeated)
167 as_of_time: string, A mql as_of_time value to use with mql_output queries.
168 stemmed: boolean, Query on stemmed names and aliases. May not be used with prefixed.
169 format: string, Structural format of the json response.
170 Allowed values
171 ac - Compact format useful for autocomplete/suggest UIs.
172 classic - [DEPRECATED] Same format as was returned by api.freebase.com.
173 entity - Basic information about the entities.
174 guids - [DEPRECATED] Ordered list of a freebase guids.
175 ids - Ordered list of freebase ids.
176 mids - Ordered list of freebase mids.
177 spell: string, Request 'did you mean' suggestions
178 Allowed values
179 always - Request spelling suggestions for any query at least three characters long.
180 no_results - Request spelling suggestions if no results were found.
181 no_spelling - Don't request spelling suggestions.
182 exact: boolean, Query on exact name and keys only.
183 lang: string, The code of the language to run the query with. Default is 'en'. (repeated)
184 indent: boolean, Whether to indent the json results or not.
185 cursor: integer, The cursor value to use for the next page of results.
186 callback: string, JS method name for JSONP callbacks.
187 without: string, A rule to not match against. (repeated)
188 output: string, An output expression to request data from matches.
189 mql_output: string, The MQL query to run againist the results to extract more data.
190</pre>
191</div>
192
193<div class="method">
194 <code class="details" id="search_media">search_media(domain=None, help=None, query=None, scoring=None, filter=None, prefixed=None, with=None, mid=None, encode=None, limit=None, type=None, as_of_time=None, stemmed=None, format=None, spell=None, exact=None, lang=None, indent=None, cursor=None, callback=None, without=None, output=None, mql_output=None)</code>
195 <pre>Search Freebase open data.
196
197Args:
198 domain: string, Restrict to topics with this Freebase domain id. (repeated)
199 help: string, The keyword to request help on.
200 Allowed values
201 langs - The language codes served by the service.
202 mappings - The property/path mappings supported by the filter and output request parameters.
203 predicates - The predicates and path-terminating properties supported by the filter and output request parameters.
204 query: string, Query term to search for.
205 scoring: string, Relevance scoring algorithm to use.
206 Allowed values
207 entity - Use freebase and popularity entity ranking.
208 freebase - Use freebase entity ranking.
209 schema - Use schema ranking for properties and types.
210 filter: string, A filter to apply to the query. (repeated)
211 prefixed: boolean, Prefix match against names and aliases.
212 with: string, A rule to match against. (repeated)
213 mid: string, A mid to use instead of a query. (repeated)
214 encode: string, The encoding of the response. You can use this parameter to enable html encoding.
215 Allowed values
216 html - Encode certain characters in the response (such as tags and ambersands) using html encoding.
217 off - No encoding of the response. You should not print the results directly on an web page without html-escaping the content first.
218 limit: integer, Maximum number of results to return.
219 type: string, Restrict to topics with this Freebase type id. (repeated)
220 as_of_time: string, A mql as_of_time value to use with mql_output queries.
221 stemmed: boolean, Query on stemmed names and aliases. May not be used with prefixed.
222 format: string, Structural format of the json response.
223 Allowed values
224 ac - Compact format useful for autocomplete/suggest UIs.
225 classic - [DEPRECATED] Same format as was returned by api.freebase.com.
226 entity - Basic information about the entities.
227 guids - [DEPRECATED] Ordered list of a freebase guids.
228 ids - Ordered list of freebase ids.
229 mids - Ordered list of freebase mids.
230 spell: string, Request 'did you mean' suggestions
231 Allowed values
232 always - Request spelling suggestions for any query at least three characters long.
233 no_results - Request spelling suggestions if no results were found.
234 no_spelling - Don't request spelling suggestions.
235 exact: boolean, Query on exact name and keys only.
236 lang: string, The code of the language to run the query with. Default is 'en'. (repeated)
237 indent: boolean, Whether to indent the json results or not.
238 cursor: integer, The cursor value to use for the next page of results.
239 callback: string, JS method name for JSONP callbacks.
240 without: string, A rule to not match against. (repeated)
241 output: string, An output expression to request data from matches.
242 mql_output: string, The MQL query to run againist the results to extract more data.
243</pre>
244</div>
245
246</body></html>