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

Here you have simple examples of requests to the Topics Extraction 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.

  CURL *curl;
  CURLcode res;
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_URL, "<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
    struct curl_slist *headers = NULL;
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    res = curl_easy_perform(curl);
  var client = new RestClient("<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  IRestResponse response = client.Execute(request);
  curl --location --request POST '<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>'
  var settings = {
    "url": "<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>",
    "method": "POST",
    "timeout": 0,

  $.ajax(settings).done(function (response) {
  var https = require('follow-redirects').https;
  var fs = require('fs');

  var options = {
    'method': 'POST',
    'hostname': '',
    'path': '/topics-2.0?key=<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>',
    'headers': {
    'maxRedirects': 20

  var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {

    res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);

    res.on("error", function (error) {

  require "uri"
  require "net/http"

  url = URI("<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>")

  https =, url.port);
  https.use_ssl = true

  request =

  response = https.request(request)
  puts response.read_body
  import Foundation

  var semaphore = DispatchSemaphore (value: 0)

  var request = URLRequest(url: URL(string: "<your_key>&lang=<lang>&txt=<text>&tt=<topic_type>")!,timeoutInterval: Double.infinity)
  request.httpMethod = "POST"

  let task = URLSession.shared.dataTask(with: request) { data, response, error in
    guard let data = data else {
      print(String(describing: error))
    print(String(data: data, encoding: .utf8)!)


If you work in PHP, you can find our SDK in Packagist. If you prefer Python, the SDK is uploaded to Pypi. You can check both of them out in our Github account.

The next examples make a request to the Topics Extraction API with the text entered by the user. Once the request has been made, the output is processed and all the types of topics detected are extracted.

These examples show the following fields of information:

  • entities: form and sementity > type
  • concepts: form and sementity > type
  • time expressions: form
  • money expressions: form
  • quantity expressions: form
  • other expressions: form
  • quotations: form, who > form, who > lemma, verb > form and verb > lemma
  • relations: form, subject > form, subject > lemma_list, verb > form and verb > lemma_list

PHP logo


Java logo


Python logo


Visual Basic logo


Not enough? You can also check out TailorBrands' Ruby Wrapper. And of course, if you create your own integration in any other language, we'd love to hear about it!