user2530076
user2530076

Reputation: 51

Freebase MQL Query - topic_equivalent_webpage

This seems to be a pretty straightforward query, but I'm not getting any results for topic_equivalent_webpages. There should be a long list of wikipedia urls, etc.

[{ "id": "/m/0gg4gh4", "name": null, "type": "/common/topic", "/common/topic/topic_equivalent_webpage": [] }]

Please help. Thank you for your help.

Upvotes: 2

Views: 276

Answers (2)

Tom Morris
Tom Morris

Reputation: 10540

Although, as Shawn says, they're dynamically generated, they could be available through MQL if Google chose to allow it.

If you're willing to jump through a few extra hoops, you could generate the links yourself. You'd need to do the following:

  • collect all key values for namespaces which have URI templates
  • collect all the URI templates for the relevant namespaces
  • use the URI templates and the key values to generate the requisite URIs

URI templates change approximately never ie. once they're defined, they almost never change. Keys change pretty much never as well, although they're often added to.

One the downside, you'd have to replicate functionality that Google has easily available. On the upside, you could use it for bulk queries and not be limited to the Topic APIs one-at-a-time constraints.

The other option is to filter the RDF dump for the links you need. They're all pre-rendered there.

Upvotes: 0

Shawn Simister
Shawn Simister

Reputation: 4603

The topic_equivalent_webpages aren't accessible from the MQL API because they dynamically generated from the Freebase topic's keys using URL templates. The easiest way to get the data is from the Topic API like this:

https://www.googleapis.com/freebase/v1/topic/m/0gg4gh4?filter=/common/topic/topic_equivalent_webpage

Upvotes: 4

Related Questions