Pesquisar canais (por texto) (Search for channels (by text))
curl --request POST \
--url https://{host}/api/{session}/channels/search/by-text \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"text": "Donald Trump",
"categories": [],
"limit": 50,
"startCursor": ""
}
'import requests
url = "https://{host}/api/{session}/channels/search/by-text"
payload = {
"text": "Donald Trump",
"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({text: 'Donald Trump', categories: [], limit: 50, startCursor: ''})
};
fetch('https://{host}/api/{session}/channels/search/by-text', 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-text",
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([
'text' => 'Donald Trump',
'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-text"
payload := strings.NewReader("{\n \"text\": \"Donald Trump\",\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-text")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Donald Trump\",\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels/search/by-text")
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 \"text\": \"Donald Trump\",\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"text": "tecnologia",
"categories": ["tech", "news"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Technology news",
"followersCount": 5420
},
{
"id": "987654321@newsletter",
"name": "Inovação e Tecnologia",
"description": "Technology trends",
"followersCount": 3210
}
],
"nextCursor": "abc123xyz"
}
Channels
Search Channels by Text
Search channels through text (name or description)
POST
/
api
/
{session}
/
channels
/
search
/
by-text
Pesquisar canais (por texto) (Search for channels (by text))
curl --request POST \
--url https://{host}/api/{session}/channels/search/by-text \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"text": "Donald Trump",
"categories": [],
"limit": 50,
"startCursor": ""
}
'import requests
url = "https://{host}/api/{session}/channels/search/by-text"
payload = {
"text": "Donald Trump",
"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({text: 'Donald Trump', categories: [], limit: 50, startCursor: ''})
};
fetch('https://{host}/api/{session}/channels/search/by-text', 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-text",
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([
'text' => 'Donald Trump',
'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-text"
payload := strings.NewReader("{\n \"text\": \"Donald Trump\",\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-text")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Donald Trump\",\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels/search/by-text")
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 \"text\": \"Donald Trump\",\n \"categories\": [],\n \"limit\": 50,\n \"startCursor\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"text": "tecnologia",
"categories": ["tech", "news"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Technology news",
"followersCount": 5420
},
{
"id": "987654321@newsletter",
"name": "Inovação e Tecnologia",
"description": "Technology trends",
"followersCount": 3210
}
],
"nextCursor": "abc123xyz"
}
Description
This endpoint allows you to search channels on WhatsApp using free text. The search can be filtered by categories and supports pagination to navigate through results.URL Parameters
WhatsApp unique authenticated session ID
Request Body
Text to search in channels (name or description)
Array of categories to filter the search (optional)
Response
Array of found channels
Cursor for the next page of results
{
"text": "tecnologia",
"categories": ["tech", "news"],
"page": {
"limit": 10,
"startCursor": ""
}
}
{
"channels": [
{
"id": "123456789@newsletter",
"name": "Tech News Brasil",
"description": "Technology news",
"followersCount": 5420
},
{
"id": "987654321@newsletter",
"name": "Inovação e Tecnologia",
"description": "Technology trends",
"followersCount": 3210
}
],
"nextCursor": "abc123xyz"
}
Status Codes
200- Search performed successfully400- Invalid parameters or missing search text401- Unauthorized500- Internal server error
Usage Example
curl -X POST https://api.wappfy.com.br/api/my-session/channels/search/by-text \
-H "Content-Type: application/json" \
-d '{
"text": "tecnologia",
"categories": ["tech"],
"page": {
"limit": 10
}
}'
const session = 'my-session';
const response = await fetch(`https://api.wappfy.com.br/api/${session}/channels/search/by-text`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'tecnologia',
categories: ['tech'],
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-text',
json={
'text': 'tecnologia',
'categories': ['tech'],
'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
