Search

Search

These are used by the extension for searching GiveALink in different ways: (None should require the user to be logged in, but at least one may make use of it if the user is logged in.)

Searching by url

To search for tags and resources related to a url:
Request http://givealink.org/api/search_url?url=[url] to get a bipartite network of tags and urls related to it formatted as follows:
<bipartite>
<urls>
<url title=[title] url=[url] tags=[space-separated tags, all tags related to this url] />
<url title=[title] url=[url] tags=[space-separated tags, all tags related to this url] />
</urls>
<pairs>
<pair url=[url] tag=[tag] />
<pair url=[url] tag=[tag] />
</pairs>
<tags>
<tag name=[tag] centrality=[strength] />
<tag name=[tag] centrality=[strength] />
</tags>
</bipartite>

Searching by tags

To search for tags and resources related to a set of tags:
Request http://givealink.org/api/search_tags?tag=[space-separated tags] to get a bipartite network of tags and urls related to it formatted as follows:
<bipartite>
<urls>
<url title=[title] url=[url] tags=[space-separated tags, all tags related to this url] />
<url title=[title] url=[url] tags=[space-separated tags, all tags related to this url] />
</urls>
<pairs>
<pair url=[url] tag=[tag] />
<pair url=[url] tag=[tag] />
</pairs>
<tags>
<tag name=[tag] centrality=[strength] />
<tag name=[tag] centrality=[strength] />
</tags>
</bipartite>

Tag similarity

To get the similarity network for a set of tags:
Request http://givealink.org/api/tag_similarity?tags=[space-separated tags] to get the similarities formatted as following:
<tagsims>
<edge source=[tag] target=[tag] sim=[similarity] />
<edge source=[tag] target=[tag] sim=[similarity] />
</tagsims>

Tag recommendations

To get tag recommendations for a url (possibly using user or already-supplied tags as input for recommendation schemes):
Request http://givealink.org/api/tag_recommendation?url=[url](&tags=[space-separated tags]) to get the similarities formatted as following:
<tags>
<tag name=[tag] centrality=[strength] method=[string used for user study, based on recommendation scheme and ranking] />
<tag name=[tag] centrality=[strength] method=[string used for user study] />
</tags>