Spot finds the people, organizations, locations and dates in a text and returns each one with its exact character offsets, so you can highlight, link or index them.
It reads ten languages out of the box. For personal data like emails, phone numbers and IDs, use Veil instead.
Use it
curl https://labs.greatwork.company/v1/run \
-H "Authorization: Bearer $GWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "spot-1",
"input": "Satya Nadella met with Ursula von der Leyen in Brussels to discuss Microsoft'\''s new data centers in Ireland."
}'const res = await fetch("https://labs.greatwork.company/v1/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GWL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "spot-1",
"input": "Satya Nadella met with Ursula von der Leyen in Brussels to discuss Microsoft's new data centers in Ireland."
}),
});
const { output, usage } = await res.json();import os, requests
res = requests.post(
"https://labs.greatwork.company/v1/run",
headers={"Authorization": f"Bearer {os.environ['GWL_API_KEY']}"},
json={
"model": "spot-1",
"input": "Satya Nadella met with Ursula von der Leyen in Brussels to discuss Microsoft's new data centers in Ireland."
},
)
output = res.json()["output"]Set GWL_API_KEY to a key from your dashboard. The bare name spot works too and follows new versions.
Options
input: A string, or an array of up to 64 strings to run as a batch.
| Name | Type | Default | What it does |
|---|---|---|---|
types | string[] person | organization | location | date | Only return these entity types. | |
threshold | number | 0.5 | Score at or above which an entity is returned. |
Output
| Field | Type | Meaning |
|---|---|---|
spans | object[] | Entities in order: type, text, start, end (character offsets, end exclusive), score. |
counts | object | How many of each type. |
Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}. Send an array as input and output is an array in the same order.
Examples
News sentence
{
"model": "spot-1",
"input": "Satya Nadella met with Ursula von der Leyen in Brussels to discuss Microsoft's new data centers in Ireland."
}{
"spans": [
{
"type": "person",
"text": "Satya Nadella",
"start": 0,
"end": 13,
"score": 0.9994
},
{
"type": "person",
"text": "Ursula von der Leyen",
"start": 23,
"end": 43,
"score": 0.9999
},
{
"type": "location",
"text": "Brussels",
"start": 47,
"end": 55,
"score": 0.9998
},
{
"type": "organization",
"text": "Microsoft",
"start": 67,
"end": 76,
"score": 0.9999
},
{
"type": "location",
"text": "Ireland",
"start": 99,
"end": 106,
"score": 0.9999
}
],
"counts": {
"person": 2,
"location": 2,
"organization": 1
}
}Captured on our production servers: 35 ms, 1 text, $0.00002.
{
"model": "spot-1",
"input": "Hi Priya, Marcus from Northwind Traders here. We'll be in Austin on the 14th if you want to meet at the Domain."
}{
"spans": [
{
"type": "person",
"text": "Priya",
"start": 3,
"end": 8,
"score": 0.9983
},
{
"type": "person",
"text": "Marcus",
"start": 10,
"end": 16,
"score": 0.9984
},
{
"type": "organization",
"text": "Northwind Traders",
"start": 22,
"end": 39,
"score": 0.9998
},
{
"type": "location",
"text": "Austin",
"start": 58,
"end": 64,
"score": 0.9994
}
],
"counts": {
"person": 2,
"organization": 1,
"location": 1
}
}Captured on our production servers: 30 ms, 1 text, $0.00002.
Spanish
{
"model": "spot-1",
"input": "Gabriel García Márquez nació en Aracataca y trabajó para El Espectador en Bogotá."
}{
"spans": [
{
"type": "person",
"text": "Gabriel García Márquez",
"start": 0,
"end": 22,
"score": 0.9999
},
{
"type": "location",
"text": "Aracataca",
"start": 32,
"end": 41,
"score": 0.9997
},
{
"type": "organization",
"text": "El Espectador",
"start": 57,
"end": 70,
"score": 0.9995
},
{
"type": "location",
"text": "Bogotá",
"start": 74,
"end": 80,
"score": 0.9998
}
],
"counts": {
"person": 1,
"location": 2,
"organization": 1
}
}Captured on our production servers: 19 ms, 1 text, $0.00002.
Good for
- Link company and people names in articles
- Build a who-was-mentioned index for transcripts
- Pre-fill CRM fields from emails
- Find locations to geocode
Limits and caveats
- Four types only: person, organization, location, date.
- Product names and brands are often missed or called organizations.
Pricing
$0.02 per 1,000 texts. One unit per text up to 2,000 characters; longer texts are split into 2,000-character chunks and each chunk is a unit. Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).
Built on
Davlan/distilbert-base-multilingual-cased-ner-hrl, 135M (DistilBERT multilingual) parameters. License: AFL-3.0. We run it on our servers with our own long-text chunking and score aggregation.