Search Communities
curl --request POST \
--url https://api.sorsa.io/v3/search-communities \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "IBT",
"next_cursor": "WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0="
}
'import requests
url = "https://api.sorsa.io/v3/search-communities"
payload = {
"query": "IBT",
"next_cursor": "WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0="
}
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'IBT', next_cursor: 'WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0='})
};
fetch('https://api.sorsa.io/v3/search-communities', 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.sorsa.io/v3/search-communities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'IBT',
'next_cursor' => 'WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0='
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/search-communities"
payload := strings.NewReader("{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/search-communities")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/search-communities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}"
response = http.request(request)
puts response.read_body{
"communities": [
{
"banner_url": "<string>",
"id": "1966045657589813686",
"member_count": 74,
"name": "IBT"
}
],
"next_cursor": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Community
Search Communities
Searches for Twitter/X communities by query. Returns id, name, banner_url and member_count for each result, plus next_cursor for pagination. banner_url uses the default banner when no custom banner exists. Empty results are returned as an empty communities array.
POST
/
search-communities
Search Communities
curl --request POST \
--url https://api.sorsa.io/v3/search-communities \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "IBT",
"next_cursor": "WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0="
}
'import requests
url = "https://api.sorsa.io/v3/search-communities"
payload = {
"query": "IBT",
"next_cursor": "WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0="
}
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'IBT', next_cursor: 'WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0='})
};
fetch('https://api.sorsa.io/v3/search-communities', 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.sorsa.io/v3/search-communities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'IBT',
'next_cursor' => 'WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0='
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/search-communities"
payload := strings.NewReader("{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/search-communities")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/search-communities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"IBT\",\n \"next_cursor\": \"WzIuNjAyMDYsMTkzOTQ5NzMxMjY2MzA4MTMzNV0=\"\n}"
response = http.request(request)
puts response.read_body{
"communities": [
{
"banner_url": "<string>",
"id": "1966045657589813686",
"member_count": 74,
"name": "IBT"
}
],
"next_cursor": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
query required, next_cursor optional
Was this page helpful?