List the topics extracted for a run
curl --request GET \
--url https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics \
--header 'x-project-id: <x-project-id>'import requests
url = "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics"
headers = {"x-project-id": "<x-project-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-project-id': '<x-project-id>'}};
fetch('https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-project-id: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-project-id", "<x-project-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics")
.header("x-project-id", "<x-project-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-project-id"] = '<x-project-id>'
response = http.request(request)
puts response.read_body{
"topics": [
{
"id": "019dd32e-b19e-7956-88f6-4b9a877f3697",
"rank": 1,
"label": "Electric vehicle charging",
"keywords": [
"ev charging",
"charging network",
"fast charger"
],
"size": 14,
"memberPointIds": [
"019dd32e-b19e-7956-88f6-4b9a877f3697"
]
}
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Source Topics
List the topics extracted for a run
Returns the topics (density clusters of the embedded source metadata, named by an LLM) for a run, biggest first. Topics are produced automatically once embedding completes — poll the run until its topicsStatus is ready, then read them here. Empty while clustering is pending/running or when no dense topics were found.
GET
/
api
/
v1
/
source-topics
/
runs
/
{runId}
/
topics
List the topics extracted for a run
curl --request GET \
--url https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics \
--header 'x-project-id: <x-project-id>'import requests
url = "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics"
headers = {"x-project-id": "<x-project-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-project-id': '<x-project-id>'}};
fetch('https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-project-id: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-project-id", "<x-project-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics")
.header("x-project-id", "<x-project-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mentionlab.io/api/v1/source-topics/runs/{runId}/topics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-project-id"] = '<x-project-id>'
response = http.request(request)
puts response.read_body{
"topics": [
{
"id": "019dd32e-b19e-7956-88f6-4b9a877f3697",
"rank": 1,
"label": "Electric vehicle charging",
"keywords": [
"ev charging",
"charging network",
"fast charger"
],
"size": 14,
"memberPointIds": [
"019dd32e-b19e-7956-88f6-4b9a877f3697"
]
}
]
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}