Metadata API call

API Endpoint package

Content Verification

API endpoint

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

Supported Languages

English

Description

Given an article URL or raw text, the endpoint will return all trustworthiness relevant metadata that TrustServista is able to obtain for the URL or given raw text. The API call works with both articles that have been already processed by TrustServista and also on-demand URLs.

If the given contentUri is not preprocessed by TrustServista then some of the attributes from the JSON above could be empty. Here is a list of attributes that could be missing in these cases:

  • author
  • title
  • source
  • publishDate
  • updateDate
  • trustLevelType will be set to “local” meaning that the score was computed from the metadata TrustServista could extract out of the article content only
  • patientZeroUrl

This endpoint is used in the TrustServista Web Dashboard to perform a URL verification:

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.foxnews.com/opinion/2017/03/01/president-trumps-best-speech.html" }' \
    "https://trust.servista.eu/api/rest/v2/metadata"

Sample JSON response

{
	"id": "8c750aab3f3d58eee14bd13f7cc6c5ad",
	"ui": "https://www.trustservista.com/alphaui/#/articledashboard/1/8c750aab3f3d58eee14bd13f7cc6c5ad",
	"url": "http://www.foxnews.com/opinion/2017/03/01/president-trumps-best-speech.html",
	"author": "foxnewsonline@foxnews.com (Fox News Online) ",
	"title": "NEWT GINGRICH: President Trump's best speech",
	"source": "Fox News",
	"publishDate": "2017-03-01 23:55:11",
	"updateDate": "2017-03-02 00:22:42",
	"sentiment": "neu",
	"trustLevel": 58,
"trustLevelType":"global",
	"trustLevelComponent": {
		"trustLevelComponents": [{
				"type": "author",
				"score": 1.0
			}, {
				"type": "entity",
				"score": 0.588
			}, {
				"type": "sentiment",
				"score": 1.0
			}
		]
	},
	"trustLevelMessage": "We found this article's author. \n This article has decent (58.80%) context setting (who/when/where). \n This article has an overall neutral sentiment (objective).  \n Patient Zero's TrustLevel is: 50% Trusted \n This article's TrustLevel is calculated using the metrics above and also takes in account Patient Zero's TrustLevel.",
"patientZeroUrl:"http://www.foxnews.com/opinion/2017/03/01/trump-stuns-media-detractors-with-extraordinary-speech-but-washington-post-others-still-go-to-war.html"
	"entities": [{
			"type": "PERSON",
			"normalized": "Donald Trump",
			"count": 13
		}, {
			"type": "TITLE",
			"normalized": "President",
			"count": 10
		}, {
			"type": "LOCATION",
			"normalized": "United States",
			"count": 10
		}, {
			"type": "ORGANIZATION",
			"normalized": "Democratic",
			"count": 3
		}, {
			"type": "NATIONALITY",
			"normalized": "Americans",
			"count": 2
		}, {
			"type": "TEMPORAL:DATE",
			"normalized": "January",
			"count": 1
		}, {
			"type": "TEMPORAL:TIME",
			"normalized": "two minutes",
			"count": 1
		}, {
			"type": "IDENTIFIER:EMAIL",
			"normalized": "donald.j.trump@gov.usa.com",
			"count": 1
		} 
	],
	"summary": "President Donald Trump’s address to the Joint Session of Congress last night perfectly expressed his vision of American greatness.  But it was when President Trump mentioned his plan to rebuild America’s infrastructure that the ice on the Democratic side really started to break.  President Trump grabbed their attention when he mentioned his plan to gather public and private support to build a trillion-dollars-worth of American infrastructure improvements.  It was a poignant moment that rivaled anything we have seen since President Ronald Reagan was in office.\n But the heart of the speech – the core of his message – was the same powerful set of proposals which enabled Trump to win the nomination, win the election and become president of the United States.\n"
}

Try our API for free!

Includes 1,000 API requests for all available endpoints.

Request API key