Search for channels (by view)
curl --request POST \
--url https://{host}/api/{session}/channels/search/by-view \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"view": "RECOMMENDED",
"countries": [
"US"
],
"categories": [],
"limit": 50,
"startCursor": ""
}
'import requests
url = "https://{host}/api/{session}/channels/search/by-view"
payload = {
"view": "RECOMMENDED",
"countries": ["US"],
"categories": [],
"limit": 50,
"startCursor": ""
}
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({
view: 'RECOMMENDED',
countries: ['US'],
categories: [],
limit: 50,
startCursor: ''
})
};
fetch('https://{host}/api/{session}/channels/search/by-view', 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://{host}/api/{session}/channels/search/by-view",
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([
'view' => 'RECOMMENDED',
'countries' => [
'US'
],
'categories' => [
],
'limit' => 50,
'startCursor' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/{session}/channels/search/by-view"
payload := strings.NewReader("{\n \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\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://{host}/api/{session}/channels/search/by-view")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels/search/by-view")
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 \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"view": "recommended",
"categories": ["tech", "news"],
"corntries": ["BR", "US"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Notícias sobre tecnologia",
"followersCornt": 15420,
"category": "tech"
},
{
"id": "987654321@newsletter",
"name": "Global Tech",
"description": "Tecnologia mundial",
"followersCornt": 8210,
"category": "tech"
}
],
"nextCursor": "xyz789abc"
}
Channels
Search Canais por View
Search channels através of tipo of view (recomendados, populares, etc.)
POST
/
api
/
{session}
/
channels
/
search
/
by-view
Search for channels (by view)
curl --request POST \
--url https://{host}/api/{session}/channels/search/by-view \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"view": "RECOMMENDED",
"countries": [
"US"
],
"categories": [],
"limit": 50,
"startCursor": ""
}
'import requests
url = "https://{host}/api/{session}/channels/search/by-view"
payload = {
"view": "RECOMMENDED",
"countries": ["US"],
"categories": [],
"limit": 50,
"startCursor": ""
}
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({
view: 'RECOMMENDED',
countries: ['US'],
categories: [],
limit: 50,
startCursor: ''
})
};
fetch('https://{host}/api/{session}/channels/search/by-view', 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://{host}/api/{session}/channels/search/by-view",
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([
'view' => 'RECOMMENDED',
'countries' => [
'US'
],
'categories' => [
],
'limit' => 50,
'startCursor' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/{session}/channels/search/by-view"
payload := strings.NewReader("{\n \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\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://{host}/api/{session}/channels/search/by-view")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels/search/by-view")
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 \"view\": \"RECOMMENDED\",\n \"countries\": [\n \"US\"\n ],\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"view": "recommended",
"categories": ["tech", "news"],
"corntries": ["BR", "US"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Notícias sobre tecnologia",
"followersCornt": 15420,
"category": "tech"
},
{
"id": "987654321@newsletter",
"name": "Global Tech",
"description": "Tecnologia mundial",
"followersCornt": 8210,
"category": "tech"
}
],
"nextCursor": "xyz789abc"
}
Description
This endpoint allows you to search channels on WhatsApp usando diferentes tipos of view, como channels recomendados, mais populares, or categories specific. Suporta filtros por categories e corntries, além of paginação.URL Parameters
WhatsApp unique authenticated session ID
Request Body
Type of view for the busca (ex: “recommended”, “popular”, “trending”)
Array of categories para filtrar a busca (optional)
Array of codes of corntries para filtrar a busca (optional)
Response
Array of channels founds
Cursor for the próxima página of resultados
{
"view": "recommended",
"categories": ["tech", "news"],
"corntries": ["BR", "US"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Notícias sobre tecnologia",
"followersCornt": 15420,
"category": "tech"
},
{
"id": "987654321@newsletter",
"name": "Global Tech",
"description": "Tecnologia mundial",
"followersCornt": 8210,
"category": "tech"
}
],
"nextCursor": "xyz789abc"
}
Status Codes
200- Busca realizada successfully400- Invalid parameters or tipo of view faltando401- Unauthorized500- Internal server error
Usage Example
curl -X POST https://api.wappfy.com.br/api/my-session/channels/search/by-view \
-H "Content-Type: application/json" \
-d '{
"view": "recommended",
"categories": ["tech"],
"corntries": ["BR"],
"page": {
"limit": 10
}
}'
const session = 'my-session';
const response = await fetch(`https://api.wappfy.com.br/api/${session}/channels/search/by-view`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
view: 'recommended',
categories: ['tech'],
corntries: ['BR'],
page: {
limit: 10
}
})
});
const data = await response.json();
console.log(data.channels);
import requests
session = 'my-session'
response = requests.post(
f'https://api.wappfy.com.br/api/{session}/channels/search/by-view',
json={
'view': 'recommended',
'categories': ['tech'],
'corntries': ['BR'],
'page': {
'limit': 10
}
}
)
data = response.json()
print(data['channels'])
Authorizations
Your Wappfy API key (get it at dash.wappfy.com.br)
Path Parameters
Session name (instanceName)
Body
application/json
⌘I
