Text API call

API Endpoint package

Text Analysis

API endpoint

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

Supported Languages

English, German, Spanish, French

Description

Given an article URL or content (raw HTML), the endpoint will return the content clean plain text.

This API call will remove all unwanted regions from the HTML page keeping only the useful content, such as the article title and body.

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.scotsman.com/news/uk/bbc-apologises-for-mystery-person-quiz-where-answer-was-ian-brady-1-4453616" }' \
    "https://trust.servista.eu/api/rest/v2/text"

Sample JSON response

{
"text": "The BBC has apologised for a segment on a local radio station during which listeners were asked to guess the identity of a mystery person, who turned out to be Moors murderer Ian Brady.\nBBC Radio Leeds ran a news-related feature during Sunday’s breakfast show asking people to guess who the person was after listening to four songs as clues.\nDJ Nathan Turvey, who was standing in for Radio Leeds’ regular Sunday presenter, played Mott The Hoople’s All The Young Dudes and The Brady Bunch theme song, followed by The Smiths’ Suffer Little Children, which was written in memory of the Moors murders\nThe last song played was The Talking Heads’ Psycho Killer.\nThe clip is hosted on Radiofail, a website featuring mistakes by DJs.\nAfter playing the tracks, Turvey can he heard saying: “They were four songs all linked to someone in the news this week, all you’ve got to do is work out who it is.”\nA BBC spokesman said: “This was clearly unacceptable and we apologise.”\nChild-killer Brady, 79, died last week after spending half a century in prison for murders he committed with his partner Myra Hindley.\n"
}

Try our API for free!

Includes 1,000 API requests for all available endpoints.

Request API key