MQL
From Freebase
MQL (Metaweb Query Language; rhymes with "pickle") is an API for making programmatic queries to freebase. This allows you to incorporate knowledge from the Freebase database into your own applications and websites. It is analogous to the SPARQL query language used in RDF. It uses JSON objects as queries via standard HTTP requests and responses.
Type the following URL into your web browser's location bar.
https://www.googleapis.com/freebase/v1/mqlread?query={"type":"/music/artist","name":"The Police","album":[]}
The query is easier to understand if it is formatted like this:
{
"type": "/music/artist",
"name": "The Police",
"album": []
}
Where there is a 'null' or '[]', data is returned from freebase. The result can be parsed with a JSON parser.
Tools
Documentation
- MQL Manual
- MQL operators
- MQL errors: the various errors that MQL can return, and what they mean
- MQL Cheatsheet (two page PDF)
- MQL Cookbook
- Undocumented MQL: the bits of MQL not documented in the official reference
- "MQL" on the mailing lists - old questions and answers
See Also
- MQL Extensions (aka eMQL)
- Graphd
- Query optimization
- JGD -- JSON Graph Data -- A triple store and query engine for querying small datasets represented as JSON files.