The Search API provides access to Freebase data given a free text query. Please consult Search Overview and the Search Cookbook for more information on how to construct detailed search queries.
Request
HTTP request
GET https://www.googleapis.com/freebase/v1/search
Parameters
All parameters below are optional but you must have one of either query or filter .
as_of_time
string
as_of_time
value to use with mql_output
queries.callback
string
cursor
integer
cursor
parameter along with the limit
parameter allows you to page through a defined number of results at a time. For example, to present 3 pages of successive 10 results, use limit=10
and cursor=0
, then cursor=10
, and cursor=20
.domain
string
encode
string
Acceptable values are:
- "
html
": Encode certain characters in the response (such as tags and ampersands) using HTML encoding. - "
off
": No encoding of the response. You should not print the results directly on a web page without HTML-escaping the content first. (default)
exact
boolean
filter
string
The filter
parameter allows you to create more complex rules and constraints to apply to your query.
The filter
value is a simple language that supports the following symbols:
- the
all
,any
,should
andnot
operators - the
type
,domain
,name
,alias
,with
andwithout
operands - the
(
and)
parenthesis for grouping and precedence
To learn how to use the filter
property see the Search Cookbook
.
format
string
Acceptable values are:
- "
entity
": Basic information about the entities. (default) - "
ids
": Ordered list of Freebaseids
. - "
mids
": Ordered list of Freebasemids
.
indent
boolean
lang
string
limit
integer
limit
parameter with a different value. ( Example
.)mql_output
string
mql_output
MQL query to retrieve actual data about the matches. The MQL results are sorted by decreasing relevance score. prefixed
boolean
query
string
scoring
string
Acceptable values are:
- "
entity
": Use Freebase and popularity entity ranking. (default) - "
freebase
": Use Freebase entity ranking. - "
schema
": Use schema ranking for properties and types.
spell
string
Acceptable values are:
- "
always
": Request spelling suggestions for any query at least three characters long. - "
no_results
": Request spelling suggestions if no results were found. - "
no_spelling
": Don't request spelling suggestions. (default)
stemmed
boolean
prefixed
.type
string
with
string
without
string
Request body
Do not supply a request body with this method.
Response
If successful, the response is a JSON structure.
{ "status":"200 OK", "result":[ { "mid":"/m/0b1zz", "name":"Nirvana", "notable":{"name":"Record Producer","id":"/music/producer"}, "score":55.227268 },{ "mid":"/m/05b3c", "name":"Nirvana", "notable":{"name":"Belief","id":"/religion/belief"}, "score":44.248726 },{ "mid":"/m/01h89tx", "name":"Nirvana", "notable":{"name":"Musical Album","id":"/music/album"}, "score":30.371510 },{ "mid":"/m/01rn9fm", "name":"Nirvana", "notable":{"name":"Musical Group","id":"/music/musical_group"}, "score":30.092449 },{ "mid":"/m/02_6qh", "name":"Nirvana", "notable":{"name":"Film","id":"/film/film"}, "score":29.003593 },{ "mid":"/m/01rkx5", "name":"Nirvana Sutra", "score":21.344824 } ], "cost":10, "hits":0 }