Topics
Classify text (Aboutness)
deprecated
DEPRECATED: This endpoint is deprecated and not recommended for new projects. It will not receive updates or support.
Classify arbitrary text to find relevant OpenAlex topics. Costs $0.01 per request.
GET
/
text
/
topics
Classify text (Aboutness)
curl --request GET \
--url 'https://api.openalex.org/text/topics?api_key='import requests
url = "https://api.openalex.org/text/topics?api_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.openalex.org/text/topics?api_key=', 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.openalex.org/text/topics?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.openalex.org/text/topics?api_key="
req, _ := http.NewRequest("GET", url, nil)
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.openalex.org/text/topics?api_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openalex.org/text/topics?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"count": 123
},
"results": [
{
"id": "<string>",
"display_name": "<string>",
"score": 123,
"subfield": {
"id": "<string>",
"display_name": "<string>"
},
"field": {
"id": "<string>",
"display_name": "<string>"
},
"domain": {
"id": "<string>",
"display_name": "<string>"
}
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Your OpenAlex API key. Get a free key at https://openalex.org/settings/api
Query Parameters
Title text to classify
Abstract text to classify
Your OpenAlex API key (required). Get a free key at https://openalex.org/settings/api
⌘I
Classify text (Aboutness)
curl --request GET \
--url 'https://api.openalex.org/text/topics?api_key='import requests
url = "https://api.openalex.org/text/topics?api_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.openalex.org/text/topics?api_key=', 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.openalex.org/text/topics?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.openalex.org/text/topics?api_key="
req, _ := http.NewRequest("GET", url, nil)
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.openalex.org/text/topics?api_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openalex.org/text/topics?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"count": 123
},
"results": [
{
"id": "<string>",
"display_name": "<string>",
"score": 123,
"subfield": {
"id": "<string>",
"display_name": "<string>"
},
"field": {
"id": "<string>",
"display_name": "<string>"
},
"domain": {
"id": "<string>",
"display_name": "<string>"
}
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}