Reputation: 117
I want to get triples which has a specific tail. For example get triples with /m/3s31es
as their tail and the results like:
/m/111111 /has/name /m/3s31es
/m/222222 /has/city /m/3s31es
/m/333333 ... /m/3s31es
...
Is there an freebase api to implement this? Thank you
Upvotes: 0
Views: 140
Reputation: 10540
The Freebase RDF endpoint only serves up single RDF documents. There is no API associated with it (SPARQL or otherwise).
You have three choices:
Do your querying using the Freebase MQLRead API (perhaps using the results to retrieve RDF documents if that's the final format that you want).
Download the RDF dump, load it in a RDF triplestore and use SPARQL or whatever query language the triplestore supports.
Download the RDF dump and use zgrep to find all the triples which match your desired pattern.
The first option will be quickest for small amounts of data and #3 will be quickest for larger amounts of data. If you're going to have to do this a lot, the extra upfront costs of #2 may be worth it.
Upvotes: 1