close

  
Filter options:

Freebase Commons Common /common

  • ContentsThe Schema Introspection CookbookMQL RecipesID, Keys, GUID DomainsUser Queries Types and Properties Topic Queries Link Queries Top-Level Queries The Schema Introspection Cookbook The Schema Introspection Cookbook provides MQL recipes for querying information about schema objects, their properties, user interaction with those objects, and the links between them. All the recipes below have been tested, and can be cut-and-pasted into query editor to test the results with your own values. In some cases, links to the relevant sections of the MQL Reference Guide have been included to help you formulate your own queries and explain the query syntax. MQL Recipes ID, Keys, GUID See the MQL Reference Guide, Section 3.3, for more information. ID of a named object. Best practice is to ask for a list of results as there could be more than one object with the same name. [{ "type" : "/music/artist", "name" : "The Police" "id" : null }] GUID of a named object. Best practice is to ask for a list of results as there could be more than one object with the same name. [{ "type" : "/music/artist", "name" : "The Police" "guid" : null }] Keys of the object in "id" and their associated namespaces. Keys are a strong identifier of an object that usually come from external data sources. Examples include GNIS, GNS, Wikipedia, and Netflix. You are guaranteed that one key will match to only one topic, but one topic can have multiple keys. { "id" : "/en/the_police", "key" : [{}] } Retrieve the ID for the article associated with an id { "id" : "/en/the_police", "/common/topic/article" : {"id":null} } Domains List all types in a domain { "id" : "/music", "type" : "/type/domain", "types" : [] } User Queries Topics created by a user, limited to 30 results. [ { "creator" : "/user/jamie", "id" : null, "limit" : 30, "name" : null, "type" : "/common/topic" } ] Types created by a user [ { "creator" : "/user/jamie", "name" : null, "type" : "/type/type" } ] Types and Properties Lists properties of type named in "id". See the MQL Reference Guide, Section 3.4.5, for more information about all the property objects. [ { "id" : "/music/artist", "properties" : [], "type" : "/type/type" } ] Lists property names and ECTs of the type in "id" [ { "id" : "/common/topic", "properties" : [ { "expected_type" : null, "name" : null } ], "type" : "/type/type" } ] Properties of the property in "id" { "id" : "/music/artist/album", "type" : "/type/property", "*" : null } Client-related properties are those used by the Freebase.com client to control the display of property information. These are all properties of /type/property and can be queried in the same way as other properties of a property. These are bare properties; the type is not asserted on the property. /freebase/documented_object/tip: Adding documentation to a property (ect: /type/text) /freebase/property_hints/display_none: True if the property is hidden /freebase/property_hints/disambiguator: True if the property will operate as a disambiguator /freebase/property_hints/display_orientation: vertical if the property should be displayed as such, horizontal otherwise /freebase/type_hints/included_types: lists types included with another type Lists expected type of the property in "id" { "/type/property/expected_type" : null, "id" : "/music/album/track" } List other types included with a type: { "/freebase/type_hints/included_types" : [ {} ], "id" : "/music/artist" } Topic Queries Everything about a topic { "*" : null, "name" : "Jimi Hendrix", "type" : "/music/artist" } When a topic was added, and by whom [ { "creator" : null, "id" : "/wikipedia/en/Star_Wars_Episode_IV", "name" : null, "timestamp" : null, "type" : "/film/film" } ] Link Queries Find the master_property that links a top-level object...

Freebase Commons Freebase /freebase

Comments

Hide