Named Entity Recognition (NER) API

Databorg's NER API can extract close to 5000 different types of entities (classes) from any given text in English.
Currently, the API supports 9 languages (see full list below). More are on the way.

Supported languages

Currently, NER API supports the following languages:

  • English - 4948 classes
  • German - 4016 classes
  • French - 2864 classes
  • Italian - 2729 classes
  • Spanish - 1974 classes
  • Portuguese - 2446 classes
  • Dutch - 2434 classes
  • Polish - 2758 classes
  • Russian - 3785 classes

Requesting entity extraction from NER API

Using CURL

curl https://databorg.ai/api/ner \
  -H 'Authorization:"Bearer YOUR_KEY"' \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"text":"The philosopher and mathematician Leibniz was born in Leipzig in 1646 and attended the University of Leipzig from 1661-1666."}'

Using javascript

const url = 'https://databorg.ai/api/ner';
const apiKey = 'YOUR_KEY';
const text = 'The philosopher and mathematician Leibniz was born in Leipzig in 1646 and attended the University of Leipzig from 1661-1666.';

const result = await fetch(url, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ text }),
}).then((r) => r.json());

console.log(result);

Using python

import requests
import json

url = 'https://databorg.ai/api/ner'
apiKey = 'YOUR_KEY'
text = 'The philosopher and mathematician Leibniz was born in Leipzig in 1646 and attended the University of Leipzig from 1661-1666.'

result = requests.post(url, data=json.dumps({"text": text}), headers={
    "Authorization": "Bearer " + apiKey,
    "Content-Type": "application/json",
})

print(result.content)

Example response

Example response:
{
  "entities": [
    {
        "end": 41,
        "entity": "Q5",
        "label": "human",
        "score": 0.7982639819383621,
        "start": 34,
        "word": "Leibniz"
    },
    {
        "end": 61,
        "entity": "Q1549591",
        "label": "big city",
        "score": 0.9998602867126465,
        "start": 54,
        "word": "Leipzig"
    },
    {
        "end": 108,
        "entity": "Q875538",
        "label": "public university",
        "score": 0.9612551927566528,
        "start": 87,
        "word": "University of Leipzig"
    }
  ],
  "text": "The philosopher and mathematician Leibniz was born in Leipzig in 1646 and attended the University of Leipzig from 1661-1666."
}