NAV Navbar
shell python php

Introduction

Welcome to the Overtone API. You can use either a body text or a url to obtain a score of the substantiveness for a piece of news content.

You can get started by receiving an API key from the Overtone team. You then send that key as part of a POST request to

https://api.overtone.ai/score

The output will be in JSON.

Scoring

Article by body text

wget --no-check-certificate --quiet \
  --method POST \
  --timeout=0 \
  --header '' \
   'https://api.overtone.ai/score?key=API_KEY&body=BODY'
import requests

url = "https://api.overtone.ai/score?key=API_KEY&body=BODY"

response = requests.request("POST", url)

print(response.text)
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.overtone.ai/score?key=API_KEY&body=BODY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

The above code would return the following JSON output:

[
    {
        "confidence": CONFIDENCE,
        "score": SCORE
    }
]

Here is a code example for when you already have the body text of a piece of news

Article by URL

wget --no-check-certificate --quiet \
  --method POST \
  --timeout=0 \
  --header '' \
   'https://api.overtone.ai/score?key=API_KEY&url=URL'
import requests

url = "https://api.overtone.ai/score?key=API_KEY&url=URL"

response = requests.request("POST", url)

print(response.text)
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.overtone.ai/score?key=API_KEY&url=URL',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

The above code would return the following JSON output:

[
    {
        "confidence": CONFIDENCE,
        "score": SCORE
    }
]

If you would like us to scrape the article text for you, just use the URL with code like this.