Graph API call

API Endpoint package

News Analytics

API endpoint

https://app.trustservista.com/api/rest/v2/graph

Supported Languages

English (native).

Russian, Arabic, Spanish, French, Chinese (with automated translation).

Description

Given an article URL, the endpoint will return the given article’s relationships with other articles.

The relationships are determined by extracting both explicit (hyperlinks) and implicit (mentions of publishers, like “according to Associated Press”, but with no hyperlink) links contained in the article body.

The relationships are built up to the 3rd level of connection and also contain articles that have not been linked explicit or implicit, but have a high degree or semantic similarity to the analyzed URL.

Read more about our enhanced semantic linking approach.

The graph API call is used to build the Article Graph card in the TrustServista Web Dashboard:

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 '{"contentUri": "http://www.nydailynews.com/news/politics/putin-election-meddling-denials-satisfied-trump-article-1.3311344" }' \
    "https://trust.servista.eu/api/rest/v2/graph"

Sample JSON response

{
	"id": "8adc1e3d92cccd61b275b215e95c94fe",
	"url": "http://www.nydailynews.com/news/politics/putin-election-meddling-denials-satisfied-trump-article-1.3311344",
	"logUrl": "http://assets.nydailynews.com/polopoly_fs/1.3311343.1499531442!/img/httpImage/image.jpg_gen/derivatives/landscape_1200/g20-germany-trump-putin.jpg",
	"title": "Putin says his election meddling denials 'satisfied' Trump",
	"publishTime": "2017-07-08 16:33:00",
	"source": "NY Daily News",
	"sourceLogo": "http://assets.nydailynews.com/nydn/img/static/apple/touch-icon-152.jpg",
	"articleGraphNodeListList": [{
			"level": 1,
			"articleGraphNodes": [{
					"id": "051dec924ceae2bda272f5fb9e43ec76",
					"url": "http://www.nydailynews.com/news/politics/trump-putin-discussed-meeting-article-1.3309172",
					"parentId": "8adc1e3d92cccd61b275b215e95c94fe",
					"parentUrl": "http://www.nydailynews.com/news/politics/putin-election-meddling-denials-satisfied-trump-article-1.3311344",
					"logUrl": "http://assets.nydailynews.com/polopoly_fs/1.3309171.1499448852!/img/httpImage/image.jpg_gen/derivatives/landscape_1200/g20-germany-trump-putin.jpg",
					"title": "Here's what Trump and Putin discussed during their first meeting",
					"publishTime": "2017-07-07 17:37:35",
					"source": "NY Daily News",
					"sourceLogo": "http://assets.nydailynews.com/nydn/img/static/apple/touch-icon-152.jpg",
					"linkType": "explicit"
					"linkDistance": "0.0123556893"
				}, {
					"id": "4400db70b1344186fb2df2d26a2ee983",
					"url": "http://uk.reuters.com/article/uk-g20-germany-putin-trump-idUKKBN19T0QE",
					"parentId": "8adc1e3d92cccd61b275b215e95c94fe",
					"parentUrl": "http://www.nydailynews.com/news/politics/putin-election-meddling-denials-satisfied-trump-article-1.3311344",
					"logUrl": "https://s4.reutersmedia.net/resources/r/?m=02&d=20170708&t=2&i=1192200345&w=&fh=545px&fw=&ll=&pl=&sq=&r=LYNXMPED670RT",
					"title": "Putin says Trump was 'satisfied' with his election meddling denials",
					"publishTime": "2017-07-08 15:24:13",
					"source": "Reuters",
					"sourceLogo": "http://s3.reutersmedia.net/resources_v2/images/favicon/favicon.ico",
					"linkType": "semantic"
					"linkDistance": "0.00355689312"
				}
			]
		}
	]
}

Try our REST API

Request API key