Topics
List all topics
Returns all topics ordered alphabetically. Each includes synonyms, parent topic (if any), and parent sub-disciplines with their disciplines. Topics are the most specific units of the taxonomy.
GET
/api/v2/topics
Response
Authentication
Requires Bearer token in the Authorization header.
Response
id
uuid
Unique identifier
name
string
Topic name (canonical label)
slug
string
URL-safe identifier
description
string
Brief description
synonyms
string[]
Alternative names for this topic
parent_topic
object|null
Parent topic if this is a sub-topic
sub_disciplines
array
Sub-disciplines this topic belongs to, each with its disciplines
curl -X GET "https://macademiatree.com/api/v2/topics" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
response = requests.get(
"https://macademiatree.com/api/v2/topics",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()const response = await fetch("https://macademiatree.com/api/v2/topics", {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
const data = await response.json();$ch = curl_init("https://macademiatree.com/api/v2/topics");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);req, _ := http.NewRequest("GET", "https://macademiatree.com/api/v2/topics", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://macademiatree.com/api/v2/topics"))
.header("Authorization", "Bearer YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());require "net/http"
require "json"
uri = URI("https://macademiatree.com/api/v2/topics")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)[
{
"id": "d4e5f6a7-b8c9-0123-def0-1234567890ab",
"name": "Neural Networks",
"slug": "neural-networks",
"description": "Computing systems inspired by biological networks",
"synonyms": [
"Artificial Neural Networks",
"ANN"
],
"parent_topic": {
"id": "...",
"name": "Machine Learning",
"slug": "machine-learning"
},
"sub_disciplines": [
{
"id": "...",
"name": "Deep Learning",
"slug": "deep-learning",
"disciplines": [
{
"id": "...",
"name": "Computer Science",
"slug": "computer-science"
}
]
}
]
}
]{
"error": "Invalid or missing API key"
}