---
title: "Extracts entities from a document and links them to a knowledge base."
method: POST
path: "/entities"
tags: ["entities"]
---

# Extracts entities from a document and links them to a knowledge base.

`POST /entities`

## Request

- Base URL: `https://api.rosette.com/rest/v1`
- URL: `https://api.rosette.com/rest/v1/entities`
- Auth: API key in header `X-RosetteAPI-Key`

Returns each entity extracted from the input. The response is a list of extracted entities. Each entity includes an entityId (Wikidata QID or temporary ID), mention (entity text in the input), normalized text (complete form of the entity in the input), the count (number of mentions of entity in the input), the salience [optional] (floating point number 0.0 or 1.0), the confidence [optional] (floating point number between 0 and 1), the linking confidence [optional] (floating point number between 0 and 1), and the PermID [optional] (ID to PermID knowledge base).

## Query parameters

- `output` string

## Request body

- union
  - object
    - `content` string
    - `language` string: 3 letter code of language.
    - `options` object
      - `calculateConfidence` boolean: return linking confidence score
      - `calculateSalience` boolean: return salience score
      - `includeDBpediaTypes` boolean: return the full ontological path of the type within the DPBedia hierarchy
      - `includePermID` boolean: return the id to PermID knowledge base
      - `linkEntities` boolean: link entities in the text to knowledge base(s); cloud default is true, enterprise default is false
      - `linkMentionMode` 'text' | 'entities': optional link candidate generation mode - find entities in text or consider pre-existing (extracted by previous processors) entities
      - `modelType` 'statistical' | 'DNN': NER model type to use; default is statistical. DNN is only valid for language codes ara, eng, and kor.
      - `structuredRegionProcessingType` 'none' | 'nerModel' | 'nameClassifier': set how structured text is processed
      - `enableStructuredRegion` boolean: enable the Apache Tika processor to extract lists and tables for contentUri (HTML) input
      - `useIndocServer` boolean: Enables indoc coreference.
  - object
    - `contentUri` string
    - `language` string: 3 letter code of language.
    - `options` object
      - `calculateConfidence` boolean: return linking confidence score
      - `calculateSalience` boolean: return salience score
      - `includeDBpediaTypes` boolean: return the full ontological path of the type within the DPBedia hierarchy
      - `includePermID` boolean: return the id to PermID knowledge base
      - `linkEntities` boolean: link entities in the text to knowledge base(s); cloud default is true, enterprise default is false
      - `linkMentionMode` 'text' | 'entities': optional link candidate generation mode - find entities in text or consider pre-existing (extracted by previous processors) entities
      - `modelType` 'statistical' | 'DNN': NER model type to use; default is statistical. DNN is only valid for language codes ara, eng, and kor.
      - `structuredRegionProcessingType` 'none' | 'nerModel' | 'nameClassifier': set how structured text is processed
      - `enableStructuredRegion` boolean: enable the Apache Tika processor to extract lists and tables for contentUri (HTML) input
      - `useIndocServer` boolean: Enables indoc coreference.

## Response `200`

OK

- EntitiesResponse
  - `entitiesResponse` Entity[]: list of extracted entities
    - `type` string: entity type
    - `mention` string: mention text
    - `normalized` string: normalized mention text
    - `count` integer: mention count
    - `mentionOffsets` MentionOffsets[]: list of offsets for all mentions
      - `startOffset` integer
      - `endOffset` integer
    - `entityId` string: entity id
    - `confidence` number: confidence score (0.0.-1.0)
    - `linkingConfidence` number: linking confidence score (0.0.-1.0)
    - `DPediaTypes` object[]: If includeDBPediaTypes option is true, this field contains a list of the full ontological path of the type(s) within the DBpedia hierarchy
      - `DPpediaType` string
    - `permId` string: Thomeson Reuters Permanent Identifier
    - `salience` number: salinece score (0.0 or 1.0), indicating whether the entity is important to the overall scope of the document

---

[API](https://skmtc.dev/babelstreet/apis/rosette-text-analytics.md) · [All operations](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/revisions/7c1d1497a5dd?raw)
