Branch #03 docs/api/03-search.md

05. Search Router (Tavily / Brave / SerpAPI)

Branch #03 — Thu thập tri thức web thời gian thực cho tác vụ doanh nghiệp.

Endpoints

POST
https://bizgpt.vn/wp-json/search/router/v1/query

Tìm kiếm web có tóm tắt

Auth: Bearer

POST
https://bizgpt.vn/wp-json/search/router/v1/extract

Rút trích nội dung từ URL

Auth: Bearer

POST
https://bizgpt.vn/wp-json/search/router/v1/crawl

Crawl domain theo scope

Auth: Bearer

GET
https://bizgpt.vn/wp-json/search/router/v1/health

Health search router

Auth: Public

Method Path Auth Mô tả
POST https://bizgpt.vn/wp-json/search/router/v1/query Bearer Tìm kiếm web có tóm tắt
POST https://bizgpt.vn/wp-json/search/router/v1/extract Bearer Rút trích nội dung từ URL
POST https://bizgpt.vn/wp-json/search/router/v1/crawl Bearer Crawl domain theo scope
GET https://bizgpt.vn/wp-json/search/router/v1/health Public Health search router

Query Examples

POST Tìm kiếm web có tóm tắt
curl -X POST "https://bizgpt.vn/wp-json/search/router/v1/query" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"query":"xu hướng ecommerce 2026","max_results":10}'
const res = await fetch('https://bizgpt.vn/wp-json/search/router/v1/query', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"query":"xu hướng ecommerce 2026","max_results":10}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/search/router/v1/query"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"query":"xu hướng ecommerce 2026","max_results":10}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
POST Rút trích nội dung từ URL
curl -X POST "https://bizgpt.vn/wp-json/search/router/v1/extract" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"sample":true}'
const res = await fetch('https://bizgpt.vn/wp-json/search/router/v1/extract', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"sample":true}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/search/router/v1/extract"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"sample":true}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
POST Crawl domain theo scope
curl -X POST "https://bizgpt.vn/wp-json/search/router/v1/crawl" -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d '{"sample":true}'
const res = await fetch('https://bizgpt.vn/wp-json/search/router/v1/crawl', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer biz-YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"sample":true}),
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/search/router/v1/crawl"
headers = {'Authorization': 'Bearer biz-YOUR_KEY', 'Content-Type': 'application/json'}
payload = '{"sample":true}'
res = requests.request("POST", url, headers=headers, data=payload)
print(res.json())
GET Health search router
curl -X GET "https://bizgpt.vn/wp-json/search/router/v1/health"
const res = await fetch('https://bizgpt.vn/wp-json/search/router/v1/health', {
  method: 'GET',
});
const data = await res.json();
console.log(data);
import requests
url = "https://bizgpt.vn/wp-json/search/router/v1/health"
headers = {}
res = requests.get(url, headers=headers)
print(res.json())

Use Cases

  • Nghiên cứu thị trường, đối thủ, xu hướng theo ngữ cảnh ngành.
  • Lấy dữ liệu fresh cho nội dung marketing theo chiến dịch.
  • Làm nguồn cho prompt planner và rerank pipeline.

Implementation Steps

  1. Dùng query ngắn gọn nhưng có intent rõ ràng.
  2. Ràng buộc domain khi cần an toàn nguồn dữ liệu.
  3. Gộp với rerank trước khi đưa vào model trả lời cuối.

Quick Start cURL

bash
curl -X POST https://bizgpt.vn/wp-json/search/router/v1/query -H "Authorization: Bearer biz-YOUR_KEY" -H "Content-Type: application/json" -d "{\"query\":\"xu hướng ecommerce 2026\",\"max_results\":10}"
Canonical Spec

docs/api/03-search.md