Search
The Directory API offers three search methods to find businesses and products. Choose the method that best fits your use case.
All search endpoints require the search permission scope.
Search Methods
| Method | Endpoint | Best For |
|---|---|---|
| Keyword Search | GET /v1/search | Fast text matching by name/description |
| Semantic Search | GET /v1/semantic-search | AI-powered natural language queries using vector embeddings |
| Hybrid Search | GET /v1/hybrid-search | Keyword-first with automatic semantic fallback |
GET
/v1/searchKeyword search across businesses and products
search
GET
/v1/semantic-searchAI-powered vector similarity search
search
GET
/v1/hybrid-searchKeyword-first with semantic fallback
search
Keyword Search
The basic keyword search endpoint performs text matching on business names and descriptions. It searches both businesses and products simultaneously.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query string |
type | string | No | Filter by type: business, product, or all (default: all) |
category_id | uuid | No | Filter by category |
region_id | uuid | No | Filter by region |
limit | integer | No | Results per page (default: 20) |
offset | integer | No | Results to skip |
Example
curl "https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-api/v1/search?q=furniture&type=business&limit=10" \
-H "X-API-Key: your-key"Response
{
"data": {
"businesses": [
{ "id": "uuid", "name": "PT Furniture Jaya", "slug": "pt-furniture-jaya", "description": "..." }
],
"products": [
{ "id": "uuid", "name": "Executive Desk", "slug": "executive-desk", "price": 5500000 }
]
},
"pagination": { "total": 25, "limit": 10, "offset": 0, "has_more": true }
}Last updated on February 23, 2026