Similar API call

API Endpoint package

Text Analysis

API endpoint

https://trust.servista.eu/api/rest/v2/similar

Supported Languages

English, German, Spanish

Description

Given two article URLs or two pieces of content (raw text), the endpoint will return a number that show how similar (100 means 100% identical content) given contents are.

The request data structure:
DocumentRequest {
content1 (string): String input for 1st content
contentUri1 (string): URI to accessible content 1 (content1 and contentUri1 are mutually
exclusive),
language1 (string, optional): Language: ISO 639-3 code for 1st content
content2 (string): String input for 2nd content,
contentUri2 (string): URI to accessible content 2 (content2 and contentUri2 are mutually
exclusive),
language2 (string, optional): Language: ISO 639-3 code
}

Read more about the difference between semantic and syntactic similarity comparison.

Sample cURL call

curl -X POST -H "X-TRUS-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-H "Accept: application/json"  \
-H "Cache-Control: no-cache" \
-d '{"contentUri1": "http://derstandard.at/2000062446163/Nordkorea-empoert-ueber-US-Bomberfluege", "contentUri2": "https://www.welt.de/politik/ausland/article8613356/Nordkorea-droht-wegen-US-Manoever-mit-Atomwaffen.html" }' \
"https://trust.servista.eu/api/rest/v2/similar"

Sample JSON response

{"similarity":93}

Try our API for free!

Includes 1,000 API requests for all available endpoints.

Request API key