REST API

Developers can plug the tagthe.net service into their own programs by using simple http requests.

This document and the APIs herein are subject to change at any time. Sorry, the API is still under development.

Overview

Send a HTTP GET or POST request to http://tagthe.net/api/?[METHOD]=[VALUE]. You will receive a response document with the tags we found in the text.

Methods

Text

  • Example: http://tagthe.net/api/?text=Hello%20World!

Important Notice: The value of the text-parameter needs to be UTF-8 encoded!

URL

  • Example: http://tagthe.net/api/?url=http://tagthe.net

Response Documents

All queries to the REST API return a document containing some tags, bundled in dimensions (think of them as categories). Response documents are available in XML and JSON syntax. Tagthe.net returns XML syntax by default. If you want JSON output you need to append a parameter named view with "json" as it's value to your HTTP request.

XML View
http://tagthe.net/api/?url=http://www.knallgrau.at/en

<?xml version="1.0" encoding="UTF-8"?>
<memes>
  <meme source="http://www.knallgrau.at/en" updated="Tue May 02 15:55:30 CEST 2006">
    <dim type="title">
      <item>knallgrau | Company</item>
    </dim>
    <dim type="topic">
      <item>company</item>
      <item>business</item>
      <item>blog</item>
      <item>management</item>
      <item>software</item>
      <item>content</item>
      <item>Contact</item>
      <item>platform</item>
      <item>twoday</item>
      <item>knallgrau</item>
    </dim>
    <dim type="person">
      <item>Dieter Rappold</item>
    </dim>
    <dim type="size">
      <item>7047</item>
    </dim>
    <dim type="content-type">
      <item>text/html</item>
    </dim>
    <dim type="location">
      <item>Austria</item>
      <item>Vienna</item>
    </dim>
    <dim type="language">
      <item>english</item>
    </dim>
    <dim type="author">
      <item>Ronald Malis</item>
    </dim>
  </meme>
</memes>

JSON View
http://tagthe.net/api/?url=http://www.knallgrau.at/en&view;=json

{"memes":[{"source":"http://www.knallgrau.at/en",
           "updated":"Mon May 15 13:38:14 CEST 2006",
           "dimensions":{"title":["knallgrau | Company"],
           "topic":["knallgrau","twoday","platform","Contact","content",
           "software","management","blog","business","company"],
           "person":["Dieter Rappold"],
           "size":["7047"],
           "content-type":["text/html"],
           "location":["Vienna","Austria"],
           "language":["english"],
           "author":["Ronald Malis"]}}]}

It's also possible to define a callback for the return JSON object. If the parameters callback and view=json are given the response is encapsulated in a function call to the given callback. So the above request would return MyFunc({"memes" ... }) if the parameter callback=MyFunc was present.

Every response document consists of a root element memes containing several meme objects which in turn contain the dimensions. Currently our service returns the following types of dimensions when given a text:

  • language - always present. value can be "unknown".
  • topic* **
  • location*
  • person*
All other dimensions are only returned when a URL is given:
  • title
  • size - the size of the resource in bytes
  • content-type - the mimetype of the resource
  • author*
* optional
** you can define the maximum number of returned topics by adding a parameter named count with the desired value to your request. if the parameter is omitted tagthe.net will return a maximum of 10 topics by default.

Usage

For the moment the service can be used free of charge. We do not limit the number of requests to it, however we ask you to send us a short notice whenever you plan to build an application that uses tagthe.net heavily.