curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v2/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v2/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v2/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://services.pref.rio/app-busca-search/api/v2/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 => [
"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://services.pref.rio/app-busca-search/api/v2/search"
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://services.pref.rio/app-busca-search/api/v2/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v2/search")
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{
"collections": [
"<string>"
],
"filtered_count": 123,
"metadata": {},
"page": 123,
"per_page": 123,
"results": [
{
"collection": "<string>",
"data": {},
"id": "<string>",
"score_info": {
"final_score": 123,
"hybrid_score": 123,
"passed_threshold": true,
"recency_factor": 123,
"text_match_normalized": 123,
"threshold_applied": "<string>",
"threshold_value": 123,
"vector_similarity": 123
},
"type": "<string>"
}
],
"search_type": "keyword",
"total_count": 123
}{}{}Busca unificada multi-coleção (v2)
Executa busca em múltiplas coleções configuradas (services, courses, jobs). Suporta keyword, semantic e hybrid search. Retorna documentos com estrutura unificada incluindo campo ‘collection’ e ‘type’.
curl --request GET \
--url https://services.pref.rio/app-busca-search/api/v2/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/app-busca-search/api/v2/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/app-busca-search/api/v2/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://services.pref.rio/app-busca-search/api/v2/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 => [
"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://services.pref.rio/app-busca-search/api/v2/search"
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://services.pref.rio/app-busca-search/api/v2/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/app-busca-search/api/v2/search")
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{
"collections": [
"<string>"
],
"filtered_count": 123,
"metadata": {},
"page": 123,
"per_page": 123,
"results": [
{
"collection": "<string>",
"data": {},
"id": "<string>",
"score_info": {
"final_score": 123,
"hybrid_score": 123,
"passed_threshold": true,
"recency_factor": 123,
"text_match_normalized": 123,
"threshold_applied": "<string>",
"threshold_value": 123,
"vector_similarity": 123
},
"type": "<string>"
}
],
"search_type": "keyword",
"total_count": 123
}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Texto da busca
Tipo de busca: keyword, semantic, hybrid
Número da página (mínimo: 1)
Resultados por página (máximo: 100)
Incluir documentos inativos (aplica-se apenas a coleções com filtro de status)
Alpha para busca hybrid (0-1). Alpha=0.3 significa 30% texto + 70% vetor.
Score mínimo para busca keyword (0-1, filtra text_match normalizado)
Score mínimo para busca semantic (0-1, filtra por similaridade vetorial)
Score mínimo para busca hybrid (0-1, filtra score híbrido)
Override dos campos de busca (comma-separated). Ex: titulo,descricao,conteudo
Override dos pesos de busca (comma-separated). Ex: 4,2,1
Filtrar busca por collections específicas (comma-separated). Ex: prefrio_services_base,hub_search. Se não especificado, busca em todas.
Response
OK
Which collections were searched
Após aplicar thresholds
Para AI search
Show child attributes
Show child attributes
keyword, semantic, hybrid, ai Total original do Typesense (across all collections)
