For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Support
API ReferenceDocsRelease notes
API ReferenceDocsRelease notes
  • Analytics API Reference
        • POSTExtract relationships
        • GETRelationships supported languages
Support
LogoLogo
Login
Login
Analytics API ReferenceText AnalyticsRelationship Extractor

Extract relationships

POST
/relationships
POST
/rest/v1/relationships
$curl -X POST https://analytics.babelstreet.com/rest/v1/relationships \
> -H "X-BabelStreetAPI-Key: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "contentUri": "https://www.sec.gov/News/PressRelease/Detail/PressRelease/1365171486708"
>}'
200URI
1{
2 "relationships": [
3 {
4 "arg1": "string",
5 "arg1id": "string",
6 "arg2": "string",
7 "arg2id": "string",
8 "confidence": 1.1,
9 "predicate": "string"
10 }
11 ]
12}
Returns the relationships between entities in the input text. <br><br> The response is a list of extracted relationships. A relationship contains <br><br> predicate - usually the main verb, property or action that is expressed by the text<br> arg1 - usually the subject, agent or main actor of the relationship<br> arg1Id [optional] - the entity ID to link an entity to a knowledgebase <br> arg2 [optional] - complements the predicate and is usually the object, theme or patient of the relationship<br> arg2Id [optional] - the entity ID to link an entity to a knowledgebase<br> confidence - a measure of quality of relationship extraction, between 0 - 1
Was this page helpful?
Previous

Relationships supported languages

Next
Built with

Returns the relationships between entities in the input text.

The response is a list of extracted relationships. A relationship contains

predicate - usually the main verb, property or action that is expressed by the text
arg1 - usually the subject, agent or main actor of the relationship
arg1Id [optional] - the entity ID to link an entity to a knowledgebase
arg2 [optional] - complements the predicate and is usually the object, theme or patient of the relationship
arg2Id [optional] - the entity ID to link an entity to a knowledgebase
confidence - a measure of quality of relationship extraction, between 0 - 1

Authentication

X-BabelStreetAPI-Keystring
API Key authentication via header
OR
X-RosetteAPI-Keystring
API Key authentication via header

Request

This endpoint expects an object.
contentstringOptional
The text to be analyzed.
contentUristringOptional
The URI of the content to be analyzed.
languagestringOptional

Three-letter ISO 693-3 language code.

Response

OK
relationshipslist of objects