Chuyển đến nội dung
Skillpedia
Thu thập dữ liệu web33k · #8730

brightdata-local-search

Skill này làm gì

Skill này giúp AI của bạn thiết lập và chạy một công cụ tìm kiếm web cục bộ bằng Bright Data. Nó dành cho lập trình viên muốn có kết quả tìm kiếm từ các công cụ tìm kiếm qua công cụ riêng của mình.

Khi nào nên dùng

  • ✓Khi bạn muốn chạy tìm kiếm web qua công cụ tìm kiếm cục bộ của riêng mình.
  • ✓Khi bạn cần kết quả tìm kiếm được xếp hạng và làm sạch từ nhiều công cụ tìm kiếm.
  • ✓Khi bạn đang thiết lập SERP API của Bright Data cho một dự án.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/brightdata-local-search/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/brightdata-local-search/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thiết lập một máy chủ tìm kiếm cục bộ với Bright Data để tôi có thể tìm kiếm web từ ứng dụng của mình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent sao chép dự án unfancy-search, thêm khóa Bright Data và khóa Anthropic tùy chọn, rồi khởi chạy bằng Docker hoặc Node.js. Sau đó nó dùng các endpoint cục bộ để chạy tìm kiếm.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Bright Data Local Search

Run powerful web searches locally using Bright Data's SERP API. This skill sets up the unfancy-search pipeline — a local search engine with query expansion, multi-engine SERP retrieval, RRF reranking, deduplication, and domain clustering.

Important: This skill uses the LOCAL version only. Do not use the hosted endpoint.

Prerequisites

Setup

Step 1: Clone and Configure

git clone https://github.com/yaronbeen/unfancy-search.git
cd unfancy-search
cp .env.example .env

Step 2: Set Environment Variables

Edit .env with your credentials:

BRIGHT_DATA_API_TOKEN=your_brightdata_token
BRIGHT_DATA_SERP_ZONE=serp_api1
ANTHROPIC_API_KEY=your_anthropic_key   # Optional: enables AI query expansion

Get your Bright Data token from: https://brightdata.com (SERP API section)

Step 3: Start the Local Server

Docker (recommended):

docker compose up -d
# Server runs at http://localhost:3000

Node.js:

pnpm install
pnpm dev
# Server runs at http://localhost:3000

API Endpoints

All requests go to http://localhost:3000:

Endpoint Method Description
/api/search POST Start a search job
/api/search-status/{jobId} GET Poll for results
/api/baseline POST Trigger baseline collection
/api/baseline-status/{id} GET Poll baseline progress

Running a Search

Step 1: Submit Search

curl -X POST http://localhost:3000/api/search \
  -H "Content-Type: application/json" \
  -d '{"query": "your search term"}'

The response returns a jobId.

Step 2: Poll for Results

curl http://localhost:3000/api/search-status/{jobId}

Poll every 3 seconds until status is "done".

Search Parameters

Parameter Type Default Description
query string required Search query
expand boolean false Enable AI query expansion via Claude
research boolean false Research mode (12 sub-queries for max coverage)
engines string[] all SERP engines to use
geo string — Geographic region filter
count number 10 Max results (up to 10)
includeDomains string[] — Only include results from these domains
excludeDomains string[] — Exclude results from these domains

Search Modes

  • Basic (expand: false): Single query, fastest, no AI cost
  • Expanded (expand: true): Claude Haiku generates 3 sub-queries for broader coverage
  • Research (research: true): 12 sub-queries for maximum coverage

Usage Examples

Basic Search from an Agent

# Start search
JOB_ID=$(curl -s -X POST http://localhost:3000/api/search \
  -H "Content-Type: application/json" \
  -d '{"query": "best practices for API rate limiting"}' | jq -r '.jobId')

# Poll until done
while true; do
  RESULT=$(curl -s http://localhost:3000/api/search-status/$JOB_ID)
  STATUS=$(echo $RESULT | jq -r '.status')
  if [ "$STATUS" = "done" ]; then
    echo $RESULT | jq '.results'
    break
  fi
  sleep 3
done

Research Mode with Domain Filtering

curl -X POST http://localhost:3000/api/search \
  -H "Content-Type: application/json" \
  -d '{
    "query": "kubernetes scaling strategies",
    "research": true,
    "excludeDomains": ["pinterest.com", "quora.com"]
  }'

Adding Search to an Existing Agent

To give your Claude Code agent search capabilities:

  1. Ensure the local server is running (docker compose up -d in the unfancy-search directory)
  2. Your agent can use curl or fetch to query http://localhost:3000/api/search
  3. Parse the ranked results to ground responses with real web data

Response Format

Results include:

  • Ranked URLs with RRF scores
  • Domain clustering (grouped by source)
  • Cost transparency (per-search expense breakdown)
  • Raw and unique result counts
  • Search duration

Troubleshooting

Issue Solution
Server won't start Verify Docker is running or Node.js 18+ installed
No results returned Check BRIGHT_DATA_API_TOKEN is valid and SERP API zone is active
Query expansion not working Verify `
Câu hỏi thường gặp

Tôi cần chuẩn bị gì để bắt đầu?

Bạn cần tài khoản Bright Data có quyền truy cập SERP API, và Docker hoặc Node.js 18 trở lên.

Nó có dùng dịch vụ được lưu trữ không?

Không. Skill yêu cầu chỉ dùng phiên bản cục bộ và không dùng endpoint được lưu trữ.

Có bắt buộc dùng AI để mở rộng truy vấn không?

Không. Khóa Anthropic là tùy chọn và chỉ bật tính năng mở rộng truy vấn bằng AI khi được đặt.

Chi tiết

Mô tả gốc của tác giả

Set up and run local web searches using Bright Data SERP API with the unfancy-search pipeline (query expansion, SERP retrieval, RRF reranking).

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8730
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự