Do you have any questions? Write us an email or ask us through the feedback section.

Developer tools

Here you have simple examples of requests to the Summarization API. You can use them to test a sample request and get an example response in a quick and easy way, right in your favorite programming language.

import requests

url = "https://api.meaningcloud.com/summarization-1.0"

payload={
    'key': 'YOUR API KEY',
    'txt': 'YOUR TEXT HERE',
    'sentences': 'NUMBER OF SENTENCES'
}

response = requests.post(url, data=payload)

print('Status code:', response.status_code)
print(response.json())
curl 'https://api.meaningcloud.com/summarization-1.0' \
    --form 'key=YOUR API KEY' \
    --form 'txt=YOUR TEXT HERE' \
    --form 'sentences=NUMBER OF SENTENCES'
const formdata = new FormData();
formdata.append("key", "YOUR API KEY");
formdata.append("txt", "YOUR TEXT HERE");
formdata.append("sentences", "NUMBER OF SENTENCES");

const requestOptions = {
  method: 'POST',
  body: formdata,
  redirect: 'follow'
};

const response = fetch("https://api.meaningcloud.com/summarization-1.0", requestOptions)
  .then(response => ({
    status: response.status, 
    body: response.json()
  }))
  .then(({ status, body }) => console.log(status, body))
  .catch(error => console.log('error', error));
<?php

use GuzzleHttp\Client;

$client = new GuzzleHttp\Client();

$response = $client->post('https://api.meaningcloud.com/summarization-1.0', [
    'multipart' => [
        [
            'name'     => 'key',
            'contents' => 'YOUR API KEY'
        ],
        [
            'name'     => 'txt',
            'contents' => 'YOUR TEXT HERE'
        ],
        [
            'name'     => 'sentences',
            'contents' => 'NUMBER OF SENTENCES'
        ]
    ]
]);

$status = $response->getStatusCode();
$body = json_decode($response->getBody()->getContents(), true);