Search subreddits
curl --request GET \
--url https://api.konbiniapi.com/v1/reddit/search/subreddits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/reddit/search/subreddits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/reddit/search/subreddits', 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.konbiniapi.com/v1/reddit/search/subreddits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.konbiniapi.com/v1/reddit/search/subreddits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.konbiniapi.com/v1/reddit/search/subreddits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/reddit/search/subreddits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/reddit/search/subreddits?query=reddit",
"totalItems": 1309,
"cursor": null,
"nextCursor": "t5_subreddit_2",
"next": "https://api.konbiniapi.com/v1/reddit/search/subreddits?query=reddit&cursor=t5_subreddit_2&count=25",
"itemCount": 30,
"orderedItems": [
{
"type": "Group",
"id": "https://www.reddit.com/r/reddit/",
"url": "https://www.reddit.com/r/reddit/",
"name": "reddit ",
"entityId": "5s5qbl",
"slug": "reddit",
"summary": "The most official Reddit community of all official Reddit communities. Your go-to place for Reddit updates, announcements, and news. Occasional frivolity.",
"description": "Your go-to place for Reddit updates, announcements, and news from the admins.",
"guidelines": "Remember the human. Read the rules before posting.",
"published": "2022-02-01T21:37:21.000Z",
"isAdult": false,
"isSearchable": true,
"category": "Reddit",
"language": "en",
"isArchived": false,
"isQuarantined": false,
"hasWiki": true,
"access": "restricted",
"allowedPosts": [
"link"
],
"allowedComments": [
"video"
],
"memberCount": 271679,
"icon": {
"type": "Image",
"url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
"entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
"width": 1536,
"height": 528
},
"image": {
"type": "Image",
"url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
"entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
"width": 1536,
"height": 528
}
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"code": "missing_api_key",
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"code": "api_key_disabled",
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"code": "not_found",
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}Search
Search subreddits
Searches public Reddit subreddits across the platform.
GET
/
v1
/
reddit
/
search
/
subreddits
Search subreddits
curl --request GET \
--url https://api.konbiniapi.com/v1/reddit/search/subreddits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/reddit/search/subreddits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/reddit/search/subreddits', 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.konbiniapi.com/v1/reddit/search/subreddits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.konbiniapi.com/v1/reddit/search/subreddits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.konbiniapi.com/v1/reddit/search/subreddits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/reddit/search/subreddits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/reddit/search/subreddits?query=reddit",
"totalItems": 1309,
"cursor": null,
"nextCursor": "t5_subreddit_2",
"next": "https://api.konbiniapi.com/v1/reddit/search/subreddits?query=reddit&cursor=t5_subreddit_2&count=25",
"itemCount": 30,
"orderedItems": [
{
"type": "Group",
"id": "https://www.reddit.com/r/reddit/",
"url": "https://www.reddit.com/r/reddit/",
"name": "reddit ",
"entityId": "5s5qbl",
"slug": "reddit",
"summary": "The most official Reddit community of all official Reddit communities. Your go-to place for Reddit updates, announcements, and news. Occasional frivolity.",
"description": "Your go-to place for Reddit updates, announcements, and news from the admins.",
"guidelines": "Remember the human. Read the rules before posting.",
"published": "2022-02-01T21:37:21.000Z",
"isAdult": false,
"isSearchable": true,
"category": "Reddit",
"language": "en",
"isArchived": false,
"isQuarantined": false,
"hasWiki": true,
"access": "restricted",
"allowedPosts": [
"link"
],
"allowedComments": [
"video"
],
"memberCount": 271679,
"icon": {
"type": "Image",
"url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
"entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
"width": 1536,
"height": 528
},
"image": {
"type": "Image",
"url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
"entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
"width": 1536,
"height": 528
}
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"code": "missing_api_key",
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"code": "api_key_disabled",
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"code": "not_found",
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}