Summary API call

API Endpoint package

Text Analysis

API endpoint

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

Supported Languages

English, German, Spanish, French

Description

Given an article URL or raw text, the endpoint will return the summary of the content.

You can optionally specify the size of the summary in percentage. By default the percentage is set to “10” meaning that the summary will be dimensioned to 10% of the sentences for the whole content. For example, if content has 100 sentences and percentage is set to “20” then the summary will have maximum 20 sentences.

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", "size": "20" }' \
    "https://trust.servista.eu/api/rest/v2/summary"

Sample JSON response

{
"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