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.
Currently, NER API supports the following languages:
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."}'
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);
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)
{
"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."
}