A Brave Search API proxy for Hack Club members.
- Web search with news, videos, discussions, and more
- Image search
- Request logging and usage statistics
- OAuth authentication via Hack Club
- Clone the repository
- Install dependencies:
bun install - Copy
.env.exampleto.envand fill in the values - Run database migrations:
bun run db:push - Start the development server:
bun run dev
DATABASE_URL=postgresql://...
BASE_URL=http://localhost:3000
PORT=3000
HACK_CLUB_CLIENT_ID=...
HACK_CLUB_CLIENT_SECRET=...
BRAVE_SEARCH_API_KEY=...
NODE_ENV=development
ENFORCE_IDV=falseAll endpoints require authentication via Bearer token or x-subscription-token header.
GET /res/v1/web/search?q=...- Web searchGET /res/v1/images/search?q=...- Image searchGET /res/v1/stats- Usage statisticsGET /res/v1/openapi.json- OpenAPI specification
# Bearer token
curl "https://search.hackclub.com/res/v1/web/search?q=hack+club" \
-H "Authorization: Bearer YOUR_API_KEY"
# x-subscription-token header
curl "https://search.hackclub.com/res/v1/web/search?q=hack+club" \
-H "x-subscription-token: YOUR_API_KEY"bun run dev # Start dev server
bun run typecheck # Run TypeScript checks
bun run lint # Run linterMIT