Skip to content
Skills Library
Data & analytics · Analysis

diffbot-entities

/diffbot-entities

Identify and resolve named entities in text using the Diffbot NLP API. Links mentions to Diffbot Knowledge Graph entities with confidence scores and sentiment. Use when the user wants to extract entities from text, do NER (named entity recognition), identify companies or people mentioned, or get Diffbot IDs for entities. Triggers on: identify entities, entity recognition, NER, find entities in text, extract entities, entity linking, diffbot NLP, named entity.

Licence
MIT
Last repository change
28.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Identify and resolve named entities in text using the Diffbot NLP API. Links mentions to Diffbot Knowledge Graph entities with confidence scores and sentiment. Use when the user wants to extract entities from text, do NER (named entity recognition), identify companies or people mentioned, or get Diffbot IDs for entities. Triggers on: identify entities, entity recognition, NER, find entities in text, extract entities, entity linking, diffbot NLP, named entity.

Original author description

Identify and resolve named entities in text using the Diffbot NLP API. Links mentions to Diffbot Knowledge Graph entities with confidence scores and sentiment. Use when the user wants to extract entities from text, do NER (named entity recognition), identify companies or people mentioned, or get Diffbot IDs for entities. Triggers on: identify entities, entity recognition, NER, find entities in text, extract entities, entity linking, diffbot NLP, named entity.

How it works

  1. The db entities CLI
  2. Workflow
  3. Output fields
  4. Tips
Original SKILL.md headings · 93 lines, 485 words
SKILL.md preview
---
name: diffbot-entities
description: "Identify and resolve named entities in text using the Diffbot NLP API. Links mentions to Diffbot Knowledge Graph entities with confidence scores and sentiment. Use when the user wants to extract entities from text, do NER (named entity recognition), identify companies or people mentioned, or get Diffbot IDs for entities. Triggers on: identify entities, entity recognition, NER, find entities in text, extract entities, entity linking, diffbot NLP, named entity."
allowed-tools: Bash(~/.diffbot/venv/bin/db:*), Bash(python3 -m venv ~/.diffbot/venv:*), Bash(~/.diffbot/venv/bin/pip install:*)
---

# Diffbot Entities (NLP)

Identify and resolve named entities in text using the Diffbot NLP API. Each entity is linked to a Diffbot Knowledge Graph record with confidence, salience, and sentiment scores.

## The `db entities` CLI

**Always invoke with the fixed path `~/.diffbot/venv/bin/db`.**

```
~/.diffbot/venv/bin/db entities "<text>" [-f table|json|dql] [--lang <code>]
echo "<text>" | ~/.diffbot/venv/bin/db entities
```

| Flag | Default | Description |
|------|---------|-------------|
| `-f`, `--format` | `table` | Output: `table` (rich), `json` (raw API), `dql` (ID filter for `db dql`) |
| `--lang` | `auto` | Language code (e.g. `en`, `es`, `fr`). Default auto-detects. |

Text can be passed as a CLI argument or piped via stdin.

## Workflow

### Step 1 — bootstrap

```
[ -d ~/.diffbot/venv ] || python3 -m venv ~/.diffbot/venv && ~/.diffbot/venv/bin/pip install -q 'diffbot>=3.0.0'
```

The token is read from `DIFFBOT_API_TOKEN` env var or `~/.diffbot/credentials`. If missing:

```
echo "DIFFBOT_API_TOKEN=YOUR_TOKEN_HERE" > ~/.diffbot/credentials && chmod 600 ~/.diffbot/credentials
```

### Step 2 — identify entities

From a string argument:

```
~/.diffbot/venv/bin/db entities "Apple CEO Tim Cook announced record quarterly earnings."
```

From a file via stdin:

```
cat article.txt | ~/.diffbot/venv/bin/db entities
```

Full JSON (inspect raw API fields):

```
~/.diffbot/venv/bin/db entities "Elon Musk founded Tesla and SpaceX." -f json
```

### Step 3 — use entity IDs in DQL

The `-f dql` format emits an `id:or(...)` filter string that can be piped directly into `db dql export`:

```
~/.diffbot/venv/bin/db entities "Apple, Microsoft, and Google dominate cloud AI." -f dql
# → id:or("EiqAqBMJHMT","EL7WL3J","EiCxSaRJP") 

~/.diffbot/venv/bin/db entities "Apple, Microsoft, and Google dominate cloud AI." -f dql \
  | xargs -I{} ~/.diffbot/venv/bin/db dql export "{}" \
      --spec "name,Name;nbEmployees,Employees;homepageUri,Website" \
      --out ~/.diffbot/tmp/entities.csv
```

This is a fast path for turning free text into structured KG lookups — much faster than a name-based DQL query because ID lookups bypass full-text search.

## Output fields

The `table` format shows one row per entity:

| Column | Description |
|--------|-------------|
| **Entity** | Mention text as it appears in the source |
| **Type** | Entity type (`Organization`, `Person`, `Place`, `Product`, etc.) |
| **Confidence** | 0–1 score for entity resolution accuracy |
| **Salience** | 0–1 prominence in the text (higher = more central) |
| **Sentiment** | Per-entity sentiment: `+0.xx` (positive), `-0.xx` (negative), `~0.00` (neutral) |
| **Diffbot ID** | KG entity ID (usable in DQL `id:` lookups) |

The document-level sentiment is printed above the table when present.

## Tips

- **Confidence vs salience**: confidence is about resolution accuracy (is this the right KG record?); salience is about topic importance (how central is this entity to the text?).
- The `dql` format is the killer feature — use it to bridge free text and structured KG data without manually copying IDs.
- For multilingual text, pass `--lang <code>` explicitly for better accuracy.
- Entities without a Diffbot ID were recognized but not linked to the KG (proper noun detection without record match).

Versions

The database has no other skills named diffbot-entities.

Database snapshot: 13.11.2026 · package version 02bbea1c8140 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100algo-nlp-ner
    Implement Named Entity Recognition to identify and classify entities in text. Use this skill when the user needs to extract people, organizations, locations, dates, or custom entities from documents — even if they say 'extract names from text', 'find companies mentioned', or 'entity extraction'.
  • 100diffbot-dql
    Query the Diffbot Knowledge Graph directly with DQL (Diffbot Query Language). The general-purpose layer beneath the entity-specific Diffbot skills — use it for any entity type or query shape they do not cover: products, patents, job posts, facet aggregations, ontology…
  • 92extract-entities
    Custom-label named-entity recognition (gliner2-base-v1). Use when the user wants to extract entities with their own labels — people, organizations, locations, products, dates, or any caller-defined entity types — from a passage.
  • 92extract-entities
    Custom-label named-entity recognition (gliner2-base-v1). Use when the user wants to extract entities with their own labels — people, organizations, locations, products, dates, or any caller-defined entity types — from a passage.
  • 100diffbot-extract
    Extract markdown or structured content from a URL using the Diffbot Extract API — a live fetch and parse of the page, seconds per call. Try `/diffbot-web-search` with `url:<URL>` first: it reads Diffbot's already-extracted copy from the Web Index in ~300ms and answers most page…
  • 100spacy-nlp
    Natural language processing with spaCy. Use when: (1) named entity recognition, (2) POS tagging and dependency parsing, (3) text tokenization and linguistic analysis, (4) rule-based pattern matching, (5) custom NER pipelines. NOT for: LLM inference or text generation (use…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.