API Reference

The NicheMatcher API is a REST API hosted on Vercel. All protected endpoints require a valid Clerk JWT in the Authorization: Bearer <token> header.

Base URL:https://nichematcher.com
MethodEndpointAuthDescription
GET
/api/health
—
Service health check. Returns status and timestamp.
POST
/api/niches/match
✓
Run an AI niche analysis. Streams results via SSE.
GET
/api/niches/categories
✓
List all 4,200+ business categories.
GET
/api/history
✓
Paginated query history. Supports ?limit, ?offset, ?q.
GET
/api/history/{niche}
✓
Most recent analysis for a specific niche slug.
GET
/api/export/excel
✓
Export a niche analysis as Excel (.xlsx).
GET
/api/export/csv
✓
Export a niche analysis as CSV.
GET
/api/export/pdf
✓
Export a niche analysis as PDF.
GET
/api/crm/leads
✓
List CRM leads for the active organisation.
POST
/api/crm/leads/{id}/activity
✓
Log an activity (call, email, meeting) on a lead.
GET
/api/opportunities
✓
List opportunities for the active user.
POST
/api/ai/multi-query
✓
Run a niche query across multiple AI providers in parallel. Requires org:admin; prompt max 4000 chars, output clamped to 2000 tokens.
GET
/api/ai/providers
✓
List available AI providers and their status.
GET
/api/users/me
✓
Get the current authenticated user's profile.
GET
/api/admin/dashboard
✓
System health and AI cost tracking. Requires org:admin.

Full interactive docs coming soon. Questions? Contact us →