Meet Ontos API

Ontos API generates semantic metadata for your plain text content. The returned metadata include named entities and semantic relations extracted from the input documents.


With Ontos API you can link your text content with metadata coming from 500'000+ (and growing) web documents. Start developing your own semantic app today!


Sign up now


Quick Tips

Did you know that with Ontos API you can not only extract standard entities like people, places and companies, but also enrich the output metadata with your own types of entities? Read the following tips and find out more about Ontos API.
How to authenticate?
  1. Request:
    http://news.ontos.com/token?j_username=YOUR_USERNAME&j_password=YOUR_PASSWORD
  2. Result (token to be used in all of the following examples):
    YOUR_TOKEN
How to process a text?
  1. Request:
    http://news.ontos.com/api/miner;jsessionid=YOUR_TOKEN?query={
      "get":"process",
      "ontology":"common.english",
      "format":"NTRIPLES",
      "text":"Ontos AG participated in the Semantic Conference in San Jose and is planning to join ESTC2009 in Vienna this year."
    }
  2. Result: This request will return a set of triples for the given text in JSON format.
How to find a person in the database?
  1. Request (search for 'Barack Obama'):
    http://news.ontos.com/api/ontology;jsessionid=YOUR_TOKEN?query={get:"ents",search:"Barack Obama"}
  2. Result, extract (a number attributes for a person and a political party):
    {
      "id":"http://www.ontosearch.com/2008/01/identification#EID-002185a8723cb570ea0fee1439f906d7",
      "label":"Barack Obama",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Person",
      ...
    },
    {
      "id":"http://www.ontosearch.com/2008/01/identification#EID-0faf94fac3036c4149fdbcc73c4b0e92",
      "label":"Obama's party",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Party",
    ...
    }
How to find relations to a person?
  1. Request (search for all facts (relations) for 'Barack Obama'):
    http://news.ontos.com/api/ontology;jsessionid=YOUR_TOKEN?query= {
      get:"rels",
      direction:"Outgoing",
      limit:2,
      select:{get:"coll",select:["type",{ get:"to", select:"label"}]}
    }&entity=http://www.ontosearch.com/2008/01/identification%23EID-002185a8723cb570ea0fee1439f906d7
  2. Result, extract (he has affairs with a political party and an organization and he mentioned a person):
    {
      "label":"Democratic Party",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Affairs_with_Organizations"
    },
    {
      "label":"CBS",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Affairs_with_Organizations"
    },
    {
      "label":"John McCain",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Mentions"
    }
How to find documents about a person?
  1. Request (search documents for Barack Obama. The ID for him is from the example above):
    http://news.ontos.com/api/ontology;jsessionid=YOUR_TOKEN?query={
      get:"docs",
      select:["total",{get: "coll",select["title","url"]}],
      limit:2
    }&entity=http://www.ontosearch.com/2008/01/identification%23EID-002185a8723cb570ea0fee1439f906d7
  2. Result (two articles from npr.org):
    {
      "title":"Defense Secretary Arrives In Iraq : NPR",
      "url":"http://www.npr.org/templates/story/story.php?storyId=111154324&ft=1&f=1004"
    },
    {
      "title":"Defense Secretary Arrives In Iraq : NPR",
      "url":"http://www.npr.org/templates/story/story.php?storyId=111154324&ft=1&f=1001"
    }
How to find entities mention by a given person?
  1. Request (whom does Barack Obama mention):
    http://news.ontos.com/api/ontology;jsessionid=YOUR_TOKEN?query={
      get:"rels",
      direction:"Outgoing",
      relTypes:["http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english%23Mentions"],
      limit:2
    }&entity=http://www.ontosearch.com/2008/01/identification%23EID-002185a8723cb570ea0fee1439f906d7
  2. Result (he mentioned a person and a location):
    {
      "id":"http://www.ontosearch.com/2008/01/identification#EID-00e66bf57b810a68ba9bace8bdaf5aa7",
      "label":"John McCain",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Person",
      ...
    }
    {
      "id":"http://www.ontosearch.com/2008/01/identification#EID-9f9435175272c961bb09d513be3d8da3",
      "label":"Iraq",
      "type":"http://www.ontosearch.com/2008/02/ontosminer-ns/domain/common/english#Location",
      ...
    }