API Reference
Search Clusters
Search for trending discussion clusters using semantic and keyword matching.
GET
/
clusters
/
search
Search Clusters
curl --request GET \
--url https://api.membit.ai/v1/clusters/search \
--header 'X-Membit-Api-Key: <api-key>'import requests
url = "https://api.membit.ai/v1/clusters/search"
headers = {"X-Membit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Membit-Api-Key': '<api-key>'}};
fetch('https://api.membit.ai/v1/clusters/search', 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.membit.ai/v1/clusters/search",
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-Membit-Api-Key: <api-key>"
],
]);
$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.membit.ai/v1/clusters/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Membit-Api-Key", "<api-key>")
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.membit.ai/v1/clusters/search")
.header("X-Membit-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.membit.ai/v1/clusters/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Membit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clusters": [
{
"label": "Machine Learning Study Resources",
"summary": "Several academic resources related to mathematics, computer science, and machine learning are shared...",
"category": "Artificial Intelligence",
"engagement_score": 4010.119762872029,
"search_score": 0.9719360841066075
}
]
}Authorizations
API key for authentication.
Query Parameters
Search query (minimum 3 characters)
Filter clusters by topic category
Maximum number of clusters to return (1-50)
Required range:
1 <= x <= 50Response format
Available options:
json, llm Response
Successful search
Show child attributes
Show child attributes
Previous
Cluster InfoGet detailed information about a specific cluster, including individual posts.
Next
⌘I
Search Clusters
curl --request GET \
--url https://api.membit.ai/v1/clusters/search \
--header 'X-Membit-Api-Key: <api-key>'import requests
url = "https://api.membit.ai/v1/clusters/search"
headers = {"X-Membit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Membit-Api-Key': '<api-key>'}};
fetch('https://api.membit.ai/v1/clusters/search', 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.membit.ai/v1/clusters/search",
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-Membit-Api-Key: <api-key>"
],
]);
$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.membit.ai/v1/clusters/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Membit-Api-Key", "<api-key>")
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.membit.ai/v1/clusters/search")
.header("X-Membit-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.membit.ai/v1/clusters/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Membit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clusters": [
{
"label": "Machine Learning Study Resources",
"summary": "Several academic resources related to mathematics, computer science, and machine learning are shared...",
"category": "Artificial Intelligence",
"engagement_score": 4010.119762872029,
"search_score": 0.9719360841066075
}
]
}